]> granicus.if.org Git - re2c/commit
Lexer: unified handling of various re2c directives.
authorUlya Trofimovich <skvadrik@gmail.com>
Sat, 2 Apr 2016 16:25:23 +0000 (17:25 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Sat, 2 Apr 2016 16:25:23 +0000 (17:25 +0100)
commit7280f0ea5c0cf4c5b6a591e34dcfc0d792c3ba94
treec5de3b76922a3f56a50565adcaae681d354442cc
parent96278bffee42c98d4afc327e7ef4bbf0134ddc88
Lexer: unified handling of various re2c directives.

Now when lexer encounters the beginning of a new directive, it
dumps all the intermediate code to the output.

Before this commit re2c lexer dumped intermediate code on each
newline that occured in the input.

So this commit affects two aspects:
    - Intermediate code is dumped much less often: it's good for
      performance, but it becomes more probable that the intermediate
      code will occasionally occupy too much buffer space and incur
      buffer resize.
    - Some re2c directives ignored characters right before the
      (on the same line). These unfortunate characters are no longer
      ignored.
re2c/bootstrap/src/parse/lex.cc
re2c/src/codegen/output.cc
re2c/src/codegen/output.h
re2c/src/parse/lex.re