[jboss-cvs] jboss-seam ...
Gavin King
gavin.king at jboss.com
Fri Jan 12 03:59:13 EST 2007
User: gavin
Date: 07/01/12 03:59:13
Modified: jboss-seam seam-text.g
Log:
refactor
Revision Changes Path
1.10 +11 -10 jboss-seam/seam-text.g
(In the diff below, changes in quantity of whitespace are not shown.)
Index: seam-text.g
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/seam-text.g,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- seam-text.g 12 Jan 2007 08:37:30 -0000 1.9
+++ seam-text.g 12 Jan 2007 08:59:13 -0000 1.10
@@ -27,15 +27,18 @@
startRule: ( (heading)? text (heading text)* )?
;
-text: ( (paragraph|list|preformatted|quoted|html) (newline)* )+
+text: ( (paragraph|special|html) (newline)* )+
;
-line: (plain|formatted) (plain|formatted|inlineTag)*
+special: (preformatted|quoted|list) newlineOrEof
;
paragraph: { append("<p>\n"); } (line newline)+ { append("</p>\n"); } newlineOrEof
;
+line: (plain|formatted) (plain|formatted|inlineTag)*
+ ;
+
plain: word|punctuation|escape|space
;
@@ -104,13 +107,11 @@
preformatted: QUOTE { append("<pre>"); }
(word|punctuation|specialChars|htmlSpecialChars|space|newline)*
QUOTE { append("</pre>"); }
- newlineOrEof
;
-quoted: DOUBLEQUOTE { append("<quote><p>"); }
+quoted: DOUBLEQUOTE { append("<quote>"); }
line (newline line)*
- DOUBLEQUOTE { append("</p></quote>"); }
- newlineOrEof
+ DOUBLEQUOTE { append("</quote>"); }
;
heading: ( h1 | h2 | h3 ) newlineOrEof
@@ -125,7 +126,7 @@
h3: PLUS PLUS PLUS { append("<h3>"); } line { append("</h3>"); }
;
-list: ( olist | ulist ) newlineOrEof
+list: olist | ulist
;
olist: { append("<ol>\n"); } (olistLine newline)+ { append("</ol>\n"); }
@@ -152,7 +153,7 @@
html: openTag (attribute)* ( ( tagContent htmlText closeTagWithContent ) | closeTagWithNoContent )
;
-htmlText: (plain|formatted|list|preformatted|quoted|html|newline)*
+htmlText: (plain|formatted|(list newline)|preformatted|quoted|html|newline)*
;
inlineTag: openTag (attribute)* ( ( tagContent inlineTagText closeTagWithContent ) | closeTagWithNoContent )
More information about the jboss-cvs-commits
mailing list