Thanks to visit codestin.com
Credit goes to github.com

Skip to content

r|!r does not always match everything #567

@lsf37

Description

@lsf37

Original bug report:

hello,
I found an issue with the negation operator "!"
With the following specification, string "baba" is not matched
by either EXP ou !EXP .

Pascal Hennequin

%%
%standalone
%{
void ECHO(String cat) { System.out.print("["+cat+":"+yytext()+"]"); }
%}

EXP = ( [^a] [^]* [^a] )
ALL = {EXP} | ! {EXP}  

%%
{ALL}  { ECHO("1"); }
baba   { ECHO("2"); }

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