1 A few weeks ago I wrote about the comparison between regex-based lexers in Python and Javascript.
2 However, in the real world you’ll find that most lexers (particularly lexers for real programming languages) are not written that way.
3 if (c === '/' ) { var next_c = this .buf.charAt( this .pos + 1 ); if (next_c === '/' ) { return this ._process_comment(); } else { return {name: 'DI..