lives-group / APEG

2 stars 0 forks source link

Unexpected behaviour of Any opperator #43

Open Rafael7991 opened 1 year ago

Rafael7991 commented 1 year ago

This grammar accepts inputs that it should not.

apeg testfunction;

start: teste<0,1, resp>;

teste[int x, int y] returns z : { z = x+y; } strN<z*2> ;

strN[int n] : ( {? n > 0 } CHAR { n = n - 1; } )* {? n == 0 } !_ ;

CHAR : _ ;