Skip to content

Pipe "|" action does not work for <<EOF>> rules #201

Description

@collinsmith

According to the JFlex manual, the grammar for a Rule is

Rule         ::= [StateList] ['^'] RegExp [LookAhead] Action 
               | [StateList] '<<EOF>>' Action
               | StateGroup 
Action       ::= '{' JavaCode '}' | '|'

However, if the action for an <<EOF>> rule is a pipe, then the generator fails. Below is a snippet which should reproduce the behavior.

Error

Unexpected character
<<EOF>>               |
 ^
1 error, 0 warnings.

Reproduction

<<EOF>>               |
...                   |
...                   {  }

Workaround

...                   |
...                   |
<<EOF>>               {  }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugNot working as intended

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions