zaach / jison

Bison in JavaScript.
http://jison.org
4.36k stars 450 forks source link

Lexer: patterns that start with '^' match not only from beginning of the string #304

Open darvin opened 9 years ago

darvin commented 9 years ago

Lexer: patterns that start with '^' match not only from beginning of the string - that's different from flex behaviour

GerHobbelt commented 9 years ago

See also #67: given the way that the Jison lexer works, /^/ represents the start of the rest of the input which still needs to be lexed.

%options flex doesn't solve this issue; the work-around posted in #67 might work though (I never tested it as I've never had a need for this semantic meaning of /^.../