Skip to content

[Bug] Macro error on regexp negation (!) [sf#55] #57

@lsf37

Description

@lsf37

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugNot working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions