home: hub: minipeg

ref: fd42edfe6fc500c76edbb047c6b3cd86d000c576
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); }