projects
/
wix.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
08af352
)
update metagrammar
author
adam
<adam@megacz.com>
Thu, 10 Apr 2008 16:36:46 +0000
(09:36 -0700)
committer
adam
<adam@megacz.com>
Thu, 10 Apr 2008 16:36:46 +0000
(09:36 -0700)
darcs-hash:
20080410163646
-5007d-
90af6b9a31e49c66159449b5f734435d4cb9123c
.gz
src/wix.g
patch
|
blob
|
history
diff --git
a/src/wix.g
b/src/wix.g
index
8289970
..
003cd36
100644
(file)
--- 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
Section:: = SectionHeader
| SectionHeader (nl|br) >> Pars <<
> SectionHeader (nl|br) Pars
-SectionHeader:: = (^"=" [=]++) ws (Text &~ ... "\n" ...)
+SectionHeader:: = (^"=" [=]++) ws (Text & ~[\n]*)
Pars:: = (Par <<* & indent.Balanced &~ "=" ...) */ br
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 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 glyph
- > `TextWS (Word:: sym)
+ > `TextWS sym
> `Text (WS:: br) >> (Pars -> <<) // subparagraph
href = url.Email
> `Text (WS:: br) >> (Pars -> <<) // subparagraph
href = url.Email
@@
-82,25
+82,28
@@
Ordinal:: = `("":: [0-9]*) ( [1] "st"
styled = Underline:: "__" Text "__"
| Footnote:: "((" Text "))"
styled = Underline:: "__" Text "__"
| Footnote:: "((" Text "))"
- | TT:: "[[" ws (Text &~ ... "]]" ...) ws "]]"
+ | TT:: "[[" ws (Text & ((~[\]]! | "]" -> ~[\]])*)) ws "]]"
| Strikethrough:: "!!" Text "!!"
| Superscript:: "^^" Atom
| Subscript:: ",," Atom
| Strikethrough:: "!!" Text "!!"
| Superscript:: "^^" Atom
| Subscript:: ",," Atom
- | Bold:: "++" (Text &~ ... "++" ...) "++"
- | Highlight:: "##" (Text &~ ... "##" ...) "##"
- | Math:: "$$" (~[$] | ([$] -> ~[$]))+ "$$"
+ | Bold:: "++" (Text & ((~[\+]! | "+" -> ~[\+])*)) "++"
+ | Highlight:: "##" (Text & ((~[\#]! | "#" -> ~[\#])*)) "##"
+ | Math:: "$$" (~[\$] | ([\$] -> ~[\$]))+ "$$"
| Keyword:: "!" Atom
| Keyword:: "!" Atom
- | Italic:: "**" (Text &~ ... "**" ...) "**"
+ | Italic:: "**" (Text & ((~[\*]! | "*" -> ~[\*])*)) "**"
glyph = ^"(e)" | ^"(r)" | ^"(c)" | ^"(tm)" | ^"--"
| ^"..." | ^"<-" | ^"<=" | ^"=>" | ^"<->"
| ^"<=>" | ^"<-" | ^"^o"
// ^"->"
glyph = ^"(e)" | ^"(r)" | ^"(c)" | ^"(tm)" | ^"--"
| ^"..." | ^"<-" | ^"<=" | ^"=>" | ^"<->"
| ^"<=>" | ^"<-" | ^"^o"
// ^"->"
+
+
+
// Chars ///////////////////////////////////////////////////////////////
// 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]
hws! = [ \r>>]
ws! = (hws* "\n")? hws* -> ~[ \n\r]