Yes you are right. I forgot that in java you put regex in strings. In action script RE syntax is:
myVariable = /abc/i
So even this syntax is valid:
myVariable = /"/
The problem is that it is similar to math expressions like 2/3/4.
Because of it I can't define it as TOKEN (and have problems with strings too).
I think the same syntax is in javascript and in ruby maybe in other languages too. Thats why I'm looking for same grammar similar to AS to learn how this problem can be solved.
Thank you
Krzysztof
On Wed, Apr 15, 2009 at 16:00, Randall R Schulz
<rschulz@...> wrote:
On Wednesday April 15 2009, Krzysztof Langner wrote:
> Hello,
>
> I'm working on grammar for ActionScript language. ...
>
> Since there are regular expression in java I was looking
> for examples in java 1.5 grammar. No luck.
Java doesn't have a special RE syntax. They're encoded in
and compiled from plain old strings.
Also, since you mention ActionScript (of which I know nothing),
I'll point out that there are a great many different surface
syntaxes for notating regular expressions.
> Since I don't want to reinvent wheel :-), anyone knows where I can
> find grammar for javacc with regular expression parsing?
Specifically the REs of ActionScript?
> Thank you in advance
> Krzysztof
Randall Schulz
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...