I am trying to write lexer with racket , and I am using parser-tools/lex and parser-tools/lex-sre. and I would like to create Token for strings - but Because the lexer selection is not greedy if I have :
"this is" .... "cool"
it will be one token instead of
StringToken ,Tokens....,StringToken .
How can I fix it and make it lazy/greedy in the selection ? Until now I have that :
[
(:
#\"
(repetition
0
+inf.0
(complement
(or
#\newline
whitespace
)
)
)
#\")
(begin (token-STRING lexeme ))
]
But it doesn't do the job so good Like I said .
Thanks Idan.M .