From f810e5b65dd37e0f35457a4250587d43cd6572d8 Mon Sep 17 00:00:00 2001 From: adam Date: Thu, 10 Apr 2008 09:36:46 -0700 Subject: [PATCH] update metagrammar darcs-hash:20080410163646-5007d-90af6b9a31e49c66159449b5f734435d4cb9123c.gz --- src/wix.g | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/wix.g b/src/wix.g index 8289970..003cd36 100644 --- a/src/wix.g +++ b/src/wix.g @@ -15,7 +15,7 @@ Body:: = Section */ br Section:: = SectionHeader | SectionHeader (nl|br) >> Pars << > SectionHeader (nl|br) Pars -SectionHeader:: = (^"=" [=]++) ws (Text &~ ... "\n" ...) +SectionHeader:: = (^"=" [=]++) ws (Text & ~[\n]*) Pars:: = (Par <<* & indent.Balanced &~ "=" ...) */ br @@ -58,9 +58,9 @@ Text:: = `Text nl >> (Pars:: NonTextParagraph) > `TextWS Atom | `TextWS (Command:: "\\" ("":: [a-zA-Z0-9:]++ &~ "pre") Block) | `TextWS (Command:: "\\" ("":: [a-zA-Z0-9:]++ &~ "pre") -> ~"{") - | `TextWS (Quotes:: "\"" (Text &~ ... "\"" ...) "\"") + | `TextWS (Quotes:: "\"" (Text & ~[\"]*) "\"") | `TextWS glyph - > `TextWS (Word:: sym) + > `TextWS sym > `Text (WS:: br) >> (Pars -> <<) // subparagraph href = url.Email @@ -82,25 +82,28 @@ Ordinal:: = `("":: [0-9]*) ( [1] "st" styled = Underline:: "__" Text "__" | Footnote:: "((" Text "))" - | TT:: "[[" ws (Text &~ ... "]]" ...) ws "]]" + | TT:: "[[" ws (Text & ((~[\]]! | "]" -> ~[\]])*)) ws "]]" | Strikethrough:: "!!" Text "!!" | Superscript:: "^^" Atom | Subscript:: ",," Atom - | Bold:: "++" (Text &~ ... "++" ...) "++" - | Highlight:: "##" (Text &~ ... "##" ...) "##" - | Math:: "$$" (~[$] | ([$] -> ~[$]))+ "$$" + | Bold:: "++" (Text & ((~[\+]! | "+" -> ~[\+])*)) "++" + | Highlight:: "##" (Text & ((~[\#]! | "#" -> ~[\#])*)) "##" + | Math:: "$$" (~[\$] | ([\$] -> ~[\$]))+ "$$" | Keyword:: "!" Atom - | Italic:: "**" (Text &~ ... "**" ...) "**" + | Italic:: "**" (Text & ((~[\*]! | "*" -> ~[\*])*)) "**" glyph = ^"(e)" | ^"(r)" | ^"(c)" | ^"(tm)" | ^"--" | ^"..." | ^"<-" | ^"<=" | ^"=>" | ^"<->" | ^"<=>" | ^"<-" | ^"^o" // ^"->" + + + // Chars /////////////////////////////////////////////////////////////// -sym = "\\" ~tok.alphanum - | ~(tok.alphanum | [\r\n \\{}>><<]) +sym = Word:: "\\" ~tok.alphanum + | Word:: ~(tok.alphanum | [\r\n \\{}>><<]) hws! = [ \r>>] ws! = (hws* "\n")? hws* -> ~[ \n\r] -- 1.7.10.4