i'm using re2c 0.10.5 and i can't match beginning of string properly.
For example, I defined:
[aA] w "=" { return ATTRKEYWORD;}
[bB] w "=" { return BWKEYWORD;}
where w is defined as:
w = s*;
but if i've the string
b=my string a=foobar
I'll get the ATTRKEYWORD when I should not, since it's starting with b=, i'd like to get BWKEYWORD.
According to http://re2c.org/manual.html, ^ is not the beginning of new line.
Which means
[^aA] w "=" { return ATTRKEYWORD;}
[^bB] w "=" { return BWKEYWORD;}
is still not working for my problem.
Any solution?
This finds the attribute keyword.
Here's the output.