[jboss-cvs] jboss-seam ...

Christian Bauer christian at hibernate.org
Wed Dec 19 10:07:40 EST 2007


  User: cbauer  
  Date: 07/12/19 10:07:40

  Modified:    jboss-seam  seam-text.g
  Log:
  JBSEAM-2409, Removed SLASH from seam text grammar and updated examples
  
  Revision  Changes    Path
  1.44      +27 -21    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.43
  retrieving revision 1.44
  diff -u -b -r1.43 -r1.44
  --- seam-text.g	19 Dec 2007 13:42:04 -0000	1.43
  +++ seam-text.g	19 Dec 2007 15:07:40 -0000	1.44
  @@ -116,6 +116,14 @@
       protected String unorderedListItemOpenTag() {
           return "<li class=\"seamTextUnorderedListItem\">";
       }
  +
  +    protected String emphasisOpenTag() {
  +        return "<i class=\"seamTextEmphasis\">";
  +    }
  +
  +    protected String emphasisCloseTag() {
  +        return "</i>";
  +    }
   }
   
   startRule: (newline)* ( (heading (newline)* )? text (heading (newline)* text)* )?
  @@ -143,13 +151,15 @@
   plain: word|punctuation|escape|space|link|macro
       ;
     
  -formatted: bold|underline|italic|monospace|superscript|deleted
  +formatted: underline|emphasis|monospace|superscript|deleted
       ;
   
   word: an:ALPHANUMERICWORD { append( an.getText() ); } | uc:UNICODEWORD { append( uc.getText() ); }
       ;
   
  -punctuation: p:PUNCTUATION { append( p.getText() ); } | sq:SINGLEQUOTE { append( sq.getText() ); }
  +punctuation: p:PUNCTUATION { append( p.getText() ); }
  +           | sq:SINGLEQUOTE { append( sq.getText() ); }
  +           | s:SLASH { append( s.getText() ); }
       ;
       
   escape: ESCAPE ( specialChars | moreSpecialChars | evenMoreSpecialChars | htmlSpecialChars )
  @@ -157,7 +167,6 @@
       
   specialChars:
             st:STAR { append( st.getText() ); } 
  -        | sl:SLASH { append( sl.getText() ); } 
           | b:BAR { append( b.getText() ); } 
           | h:HAT { append( h.getText() ); }
           | p:PLUS { append( p.getText() ); }
  @@ -224,28 +233,24 @@
           sq:SINGLEQUOTE      { append(sq.getText()); } |
           an:ALPHANUMERICWORD { append(an.getText()); } |
           p:PUNCTUATION       { append(p.getText()); } |
  +        s:SLASH             { append(s.getText()); } |
           space | specialChars )*
       ;
   
  -bold: STAR { append("<b>"); }
  -      (plain|underline|italic|monospace|superscript|deleted|newline)+
  -      STAR { append("</b>"); }
  +emphasis: STAR { append( emphasisOpenTag() ); }
  +      (plain|underline|monospace|superscript|deleted|newline)+
  +      STAR { append( emphasisCloseTag() ); }
       ;
       
   underline: UNDERSCORE { append("<u>"); }
  -           (plain|bold|italic|monospace|superscript|deleted|newline)+
  +           (plain|emphasis|monospace|superscript|deleted|newline)+
              UNDERSCORE { append("</u>"); }
       ;
       
  -italic: SLASH { append("<i>"); }
  -        (plain|bold|underline|monospace|superscript|deleted|newline)+
  -        SLASH { append("</i>"); }
  -    ;
       
   monospace: BAR { append("<tt>"); }
              (word | punctuation | space 
             | st:STAR { append( st.getText() ); }
  -          | sl:SLASH { append( sl.getText() ); }
             | h:HAT { append( h.getText() ); }
             | p:PLUS { append( p.getText() ); }
             | eq:EQ { append( eq.getText() ); }
  @@ -260,17 +265,17 @@
       ;
       
   superscript: HAT { append("<sup>"); }
  -             (plain|bold|underline|italic|monospace|deleted|newline)+
  +             (plain|emphasis|underline|monospace|deleted|newline)+
                HAT { append("</sup>"); }
       ;
       
   deleted: TWIDDLE { append("<del>"); }
  -         (plain|bold|underline|italic|monospace|superscript|newline)+
  +         (plain|emphasis|underline|monospace|superscript|newline)+
            TWIDDLE { append("</del>"); }
       ;
       
   quoted: DOUBLEQUOTE { append("<q>"); }
  -        (plain|bold|underline|italic|monospace|superscript|deleted|newline)+
  +        (plain|emphasis|underline|monospace|superscript|deleted|newline)+
           DOUBLEQUOTE { append("</q>"); }
       ;
   
  @@ -340,6 +345,7 @@
   attributeValue: ( AMPERSAND { append("&amp;"); } |
                   an:ALPHANUMERICWORD { append( an.getText() ); } |
                   p:PUNCTUATION { append( p.getText() ); } |
  +                s:SLASH { append( s.getText() ); } |
                   space | specialChars )*
       ;
       
  
  
  



More information about the jboss-cvs-commits mailing list