PageRenderTime 15ms CodeModel.GetById 11ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/vendor/peg/examples/accept.peg

http://github.com/feyeleanor/RubyGoLightly
Unknown | 8 lines | 5 code | 3 blank | 0 comment | 0 complexity | 40db27eee58f2340b92a5f5eb83f1c35 MD5 | raw file
1start	<- abcd+
2
3abcd	<- 'a' { printf("A %d\n", yypos); } bc { printf("ABC %d\n", yypos); } &{YYACCEPT}
4	 / 'b' { printf("B %d\n", yypos); } cd { printf("BCD %d\n", yypos); } &{YYACCEPT}
5
6bc	<- 'b' { printf("B %d\n", yypos); } 'c' { printf("C %d\n", yypos); }
7
8cd	<- 'c' { printf("C %d\n", yypos); } 'd' { printf("D %d\n", yypos); }