ANTLR PCRE Grammar to JS Target
问题 I'm trying to build Bart Kiers' ANTLR PCRE grammar (see: http://big-o.nl/apps/pcreparser/pcre/PCREParser.html) to a JS target. The only way I get get it to build is with global backtracking and memoization and it's generating code that is invalid here is the grammar: grammar PCRE; options { language=JavaScript; backtrack=true; memoize=true; } parse : regexAtom* EOF ; ... and the rest of the grammar as seen: http://big-o.nl/apps/pcreparser/pcre/PCREParser.html The lexer is generating code that