I get a huge regular expression to recognize block comments (started and ended by anananas):
Lex.x.txt
Alex does produce a valid lexer from this, but this takes a rather long time.
I wonder whether Alex could be optimized by introducing sharing into the regular expressions and thus reuse automata generated from subexpressions (rather than computing them again).
From this LBNF file, compiled with BNFC-2.8.4,
I get a huge regular expression to recognize block comments (started and ended by
anananas
): Lex.x.txtAlex does produce a valid lexer from this, but this takes a rather long time.
I wonder whether Alex could be optimized by introducing sharing into the regular expressions and thus reuse automata generated from subexpressions (rather than computing them again).