home: hub: minipeg

ref: df19b6dc50e821ae5f7ff96961d866bcff61839e
dir: /examples/rule.peg/

View raw version
start	<- abcd+

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

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); }