Skip to content

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

@collinsmith

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>>               {  }

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