diff --git a/Makefile b/Makefile index 6395f84..03ba9ac 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,7 @@ VCS-PULLFLAGS = # LEG = ./peg/leg/leg %.leg.go: %.leg $(LEG) - $(LEG) $< + $(LEG) -switch $< $(LEG): if(! test -d peg); then make peg; fi diff --git a/parser.leg b/parser.leg index bd80bb4..cd513ac 100644 --- a/parser.leg +++ b/parser.leg @@ -105,6 +105,7 @@ type Doc struct { %YYSTYPE *element +%switchexcl(HtmlBlock Code Title RefTitle) Doc = a:StartList ( Block { a = cons($$, a) } )* { p.tree = reverse(a) }