Session
Internals of Rx
Mark-Jason Dominus, Chief Programmer, Plover Systems Co.
Track: Perl Conference 5
Date: Thursday, July 26
Time: 11:15am
- 11:45am
Location: Grande Ballroom B
In 1999-2000 Mark-Jason Dominus wrote the back-end internals of the ActiveState graphical regex debugger, named 'Rx'.
In this presentation he discusses the history of the project from the 1998 original concept through to the present including the prototype Perl-only implementation and the eventual ActiveState XS version – the advantages and disadvantages of both approaches – and a postmortem. He also discusses the internals of Perl's regex engine in detail, where it is relevant to the operation of the debugger, and concludes by suggesting the future of the work and additional debugger features not yet added.
Outline:
- Basic Idea of the Debugger
- The bizarre (?{...}) hack
- Lexical instrumentation of regexes
- The proof-of-concept demo debuggger
- Demonstration of prototype regex debugger with Tk interface
- Technical problems resulting from Tk
- Problems with lexical instrumentation technique
- Alternatives to lexical instrumentation technique
- Overview of regex internals
- Sregexes and Bregexes
- Regex compiled bytecode
- Code pointers
- Instrumentation of bytecode
- Optimizations
- C-XS-Perl-XS-Perl-XS glue
- Offset annotation problems
- Perl 5.7.0 offset annotation patch
- Future development
- Mike Lambert's work on lexical instrumentation
- Improved annotations
- Ideas
- Conclusion
- Sometimes a bizarre hack is a big win