GNU Flex, multiline rule
Posted
by Simone Margaritelli
on Stack Overflow
See other posts from Stack Overflow
or by Simone Margaritelli
Published on 2010-04-24T15:30:35Z
Indexed on
2010/04/24
15:33 UTC
Read the original article
Hit count: 479
Hi there i have a flex rule inside my lexer definition :
operators "[]"|"[]="|"[]<"|".."|"."|".="|"+"|"+="|"-"|"-="|"/"|"/="|"*"|"*="|"%"|"%="|"++"|"--"|"^"|"^="|"~"|"&"|"&="|"|"|"|="|"<<"|"<<="|">>"|"!"|"<"|">"|">="|"<="|"=="|"!="|"&&"|"||"|"~="
Is there any way to split this ruole on more lines to keep it clearer? I tried with \ just like macros but it does not seem to be accepted by flex :(
PS: I don't want to split the rule in more sub-rules, but only split its regex in more lines to keep the code clearer.
© Stack Overflow or respective owner