New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Macro error on regexp negation (!) [sf#55] #57
Comments
Commented by deadsea on 2002-09-18 14:33 UTC |
Commented by lsf37 on 2002-09-25 13:18 UTC I can't completely reproduce the error. If I run JFlex (1.3.5) on If I run the example, I get: kleing@kosh:> jflex Test.flex Warning : Macro "operatorChar" has been declared but never Warning : Macro "illegalOperator" has been declared but The result seems to be ok according to the spec (although I Rule can never be matched: This warning is correct, though, because the rule above it ( As a quick fix for the warnings, I've attached a replacement for Is this the error you meant, or is it something completely |
Updated by lsf37 on 2002-09-25 13:18 UTC
|
Commented by lsf37 on 2002-09-25 13:20 UTC |
Updated by lsf37 on 2002-09-25 13:20 UTC
|
Updated by lsf37 on 2004-04-12 12:26 UTC
|
Reported by deadsea on 2002-09-18 14:33 UTC
I tried to create a lexer for SQL which is an
interesting beast.
SQL has a rule that says operators can be any
combination of certain characters except for
combinations that would start a comment.
I tried to implement this using the regexp negation
feature of JFlex but I get a macro error. I'm trying
to do the the expression that matches everything of a
not matched by b as specified in the user manual: !(!a|b)
I create a very loose definition of an operator (a) and
then a definition for things that look they they are an
operator, but aren't (b).
I am attaching a test case that demonstrates this.
If you modify it to compile, you can run:
jflex Test.jflex
javac Test.java
java Test
(I'm using JFlex 1.3.5)
The text was updated successfully, but these errors were encountered: