« Return to Thread: Grammar for parsing regular expression

Grammar for parsing regular expression

by Krzysztof Langner :: Rate this Message:

Reply to Author | View in Thread

Hello,

I'm working on grammar for ActionScript language. I learned a lot from java grammar include with javacc examples.
Now I want to parse regular expression. My first idea was to create token similar to string token, but it looks that it isn't possible to decide was is regex and what is math expression on the token level.

Since there are regular expression in java I was looking for examples in java 1.5 grammar.
No luck.

Since I don't want to reinvent wheel :-), anyone knows where I can find grammar for javacc with regular expression parsing?

Thank you in advance
Krzysztof

 « Return to Thread: Grammar for parsing regular expression