home: hub: minipeg

ref: bc90c2ec4f3d8b0480c4cdb38e11dca49812fe1d
dir: /examples/accept.peg/

View raw version
start	<- abcd+

abcd	<- 'a' { printf("A %d\n", yypos); } bc { printf("ABC %d\n", yypos); } &{YYACCEPT}
	 / 'b' { printf("B %d\n", yypos); } cd { printf("BCD %d\n", yypos); } &{YYACCEPT}

bc	<- 'b' { printf("B %d\n", yypos); } 'c' { printf("C %d\n", yypos); }

cd	<- 'c' { printf("C %d\n", yypos); } 'd' { printf("D %d\n", yypos); }