leg compiler: use switch optimization

This commit is contained in:
Michael Teichgräber 2011-06-29 20:04:44 +02:00
parent ec93c2ee28
commit d5e7262b62
2 changed files with 2 additions and 1 deletions

View File

@ -47,7 +47,7 @@ VCS-PULLFLAGS =
# #
LEG = ./peg/leg/leg LEG = ./peg/leg/leg
%.leg.go: %.leg $(LEG) %.leg.go: %.leg $(LEG)
$(LEG) $< $(LEG) -switch $<
$(LEG): $(LEG):
if(! test -d peg); then make peg; fi if(! test -d peg); then make peg; fi

View File

@ -105,6 +105,7 @@ type Doc struct {
%YYSTYPE *element %YYSTYPE *element
%switchexcl(HtmlBlock Code Title RefTitle)
Doc = a:StartList ( Block { a = cons($$, a) } )* Doc = a:StartList ( Block { a = cons($$, a) } )*
{ p.tree = reverse(a) } { p.tree = reverse(a) }