forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From je...@apache.org
Subject cvs commit: xml-forrest/src/resources/grammars wiki.grm wiki.xgrm wiki.xlex
Date Sun, 27 Apr 2003 11:26:06 GMT
jefft       2003/04/27 04:26:06

  Modified:    src/resources/grammars wiki.grm wiki.xgrm wiki.xlex
  Log:
  Revert to the 20030311 Wiki grammars, as the CVS HEAD versions don't seem to
  recognise subtitles.  The new wiki2document softbreak template seems to have
  fixed the whitespace problems.
  
  Revision  Changes    Path
  1.3       +9 -57     xml-forrest/src/resources/grammars/wiki.grm
  
  Index: wiki.grm
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/grammars/wiki.grm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- wiki.grm	27 Apr 2003 06:05:58 -0000	1.2
  +++ wiki.grm	27 Apr 2003 11:26:06 -0000	1.3
  @@ -1,5 +1,5 @@
   
  -%token line "\-\-\-\- (\-*)";
  +%token line "\-\-\-\- (\-+)";
   
   %token bulleteditem "\*+";
   
  @@ -10,9 +10,7 @@
   %token tabletitleitem  "\|\|";
   %token tablecolumnitem "\|";
   
  -%token titleitem "!!!";
  -%token subtitleitem "!!";
  -%token subsubtitleitem "!";
  +%token titleitem "!+";
   
   %token emitem "''";
   
  @@ -27,15 +25,11 @@
   
   %token link   "\[( [^\[\|\]]* \| )?   [^\[\|\]]* \]";
   
  -%token text  "([^\t\n\r\[\{\}\|\*\\\-_!#'] | _[^_\n\r] | \{[^\{\n\r] | \}[^\}\n\r] | '[^'\n\r]

  -                                             | \[\[ | \\[^\\\n\r] | \-{1,3}[^\-\n\r]?)
  -              ([^    \n\r\[\{\}\|\\\-_']     | _[^_\n\r] | \{[^\{\n\r] | \}[^\}\n\r] |
'[^'\n\r] 
  -                                             | \[\[ | \\[^\\\n\r] | \-{1,3}[^\-\n\r]? |
\|[^\|\ \t])*";
  +%token text  "([^\ \t\n\r\[\{\}\|\*_!#'] | _[^_] | \{[^\{] | \}[^\}] | '[^'] | \[\[)
  +              ([^    \n\r\[\{\}\|_']     | _[^_] | \{[^\{] | \}[^\}] | '[^'] | \[\[ | \|[^\|\
\t])*";
   
   %right softbreak "\r(\n?) | \n";
   
  -%right break "\\\\";
  -
   %right hardbreak "(\r(\n?) | \n) (\r(\n?) | \n)+";
   
   %ignore "[\ \t]+";
  @@ -55,55 +49,11 @@
     | title hardbreak paragraphs
     ;
   
  -title
  -  : titleitem textsequence
  -  ;
  -
   paragraphs  
     : paragraphs paragraph hardbreak
     | paragraphs paragraph 
     | paragraph hardbreak
     | paragraph
  -  | paragraphs subsection hardbreak
  -  | paragraphs subsection
  -  | subsection hardbreak
  -  | subsection
  -  ;
  -
  -subsection
  -  : subtitle subparagraphs
  -  | subtitle hardbreak subparagraphs
  -  ;
  -
  -subtitle
  -  : subtitleitem textsequence
  -  ;
  -
  -subparagraphs
  -  : subparagraphs paragraph hardbreak
  -  | subparagraphs paragraph
  -  | paragraph hardbreak
  -  | paragraph
  -  | subparagraphs subsubsection hardbreak
  -  | subparagraphs subsubsection
  -  | subsubsection hardbreak
  -  | subsubsection
  -  ;
  -
  -subsubsection
  -  : subsubtitle subsubparagraphs
  -  | subsubtitle hardbreak subsubparagraphs
  -  ;
  -
  -subsubtitle
  -  : subsubtitleitem textsequence
  -  ;
  -
  -subsubparagraphs
  -  : subsubparagraphs paragraph hardbreak
  -  | subsubparagraphs paragraph
  -  | paragraph hardbreak
  -  | paragraph
     ;
   
   paragraph 
  @@ -184,13 +134,15 @@
     : tablecolumnitem textblock
     ;
     
  +title 
  +  : titleitem textsequence
  +  ;
  +
   textsequence 
     : textsequence textblock softbreak
     | textsequence textblock 
     | textblock softbreak  
  -  | textblock
  -  | textsequence textblock break
  -  | textblock break
  +  | textblock           
     ; 
   
   textblock 
  
  
  
  1.3       +8 -111    xml-forrest/src/resources/grammars/wiki.xgrm
  
  Index: wiki.xgrm
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/grammars/wiki.xgrm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- wiki.xgrm	27 Apr 2003 06:05:58 -0000	1.2
  +++ wiki.xgrm	27 Apr 2003 11:26:06 -0000	1.3
  @@ -1,6 +1,6 @@
  -<?xml version="1.0" encoding="ISO-8859-1"?>
  +<?xml version="1.0" encoding="UTF-8"?>
   <grammar xmlns="http://chaperon.sourceforge.net/schema/grammar/1.0">
  -<!--This file was generated! Don't edit!-->
  +  <!--This file was generated! Don't edit!-->
     <priority>
       <terminal symbol="line"/>
       <terminal symbol="bulleteditem"/>
  @@ -10,8 +10,6 @@
       <terminal symbol="tabletitleitem"/>
       <terminal symbol="tablecolumnitem"/>
       <terminal symbol="titleitem"/>
  -    <terminal symbol="subtitleitem"/>
  -    <terminal symbol="subsubtitleitem"/>
       <terminal symbol="emitem"/>
       <terminal symbol="codeopenitem"/>
       <terminal symbol="codecloseitem"/>
  @@ -21,12 +19,10 @@
       <terminal symbol="link"/>
       <terminal symbol="text"/>
       <terminal symbol="softbreak"/>
  -    <terminal symbol="break"/>
       <terminal symbol="hardbreak"/>
     </priority>
  -  <associativity type="right" symbol="softbreak"/>
  -  <associativity type="right" symbol="break"/>
  -  <associativity type="right" symbol="hardbreak"/>
  +  <associativity symbol="softbreak" type="right"/>
  +  <associativity symbol="hardbreak" type="right"/>
     <production symbol="document">
       <nonterminal symbol="document"/>
       <nonterminal symbol="section"/>
  @@ -46,10 +42,6 @@
       <terminal symbol="hardbreak"/>
       <nonterminal symbol="paragraphs"/>
     </production>
  -  <production symbol="title">
  -    <terminal symbol="titleitem"/>
  -    <nonterminal symbol="textsequence"/>
  -  </production>
     <production symbol="paragraphs">
       <nonterminal symbol="paragraphs"/>
       <nonterminal symbol="paragraph"/>
  @@ -66,96 +58,6 @@
     <production symbol="paragraphs">
       <nonterminal symbol="paragraph"/>
     </production>
  -  <production symbol="paragraphs">
  -    <nonterminal symbol="paragraphs"/>
  -    <nonterminal symbol="subsection"/>
  -    <terminal symbol="hardbreak"/>
  -  </production>
  -  <production symbol="paragraphs">
  -    <nonterminal symbol="paragraphs"/>
  -    <nonterminal symbol="subsection"/>
  -  </production>
  -  <production symbol="paragraphs">
  -    <nonterminal symbol="subsection"/>
  -    <terminal symbol="hardbreak"/>
  -  </production>
  -  <production symbol="paragraphs">
  -    <nonterminal symbol="subsection"/>
  -  </production>
  -  <production symbol="subsection">
  -    <nonterminal symbol="subtitle"/>
  -    <nonterminal symbol="subparagraphs"/>
  -  </production>
  -  <production symbol="subsection">
  -    <nonterminal symbol="subtitle"/>
  -    <terminal symbol="hardbreak"/>
  -    <nonterminal symbol="subparagraphs"/>
  -  </production>
  -  <production symbol="subtitle">
  -    <terminal symbol="subtitleitem"/>
  -    <nonterminal symbol="textsequence"/>
  -  </production>
  -  <production symbol="subparagraphs">
  -    <nonterminal symbol="subparagraphs"/>
  -    <nonterminal symbol="paragraph"/>
  -    <terminal symbol="hardbreak"/>
  -  </production>
  -  <production symbol="subparagraphs">
  -    <nonterminal symbol="subparagraphs"/>
  -    <nonterminal symbol="paragraph"/>
  -  </production>
  -  <production symbol="subparagraphs">
  -    <nonterminal symbol="paragraph"/>
  -    <terminal symbol="hardbreak"/>
  -  </production>
  -  <production symbol="subparagraphs">
  -    <nonterminal symbol="paragraph"/>
  -  </production>
  -  <production symbol="subparagraphs">
  -    <nonterminal symbol="subparagraphs"/>
  -    <nonterminal symbol="subsubsection"/>
  -    <terminal symbol="hardbreak"/>
  -  </production>
  -  <production symbol="subparagraphs">
  -    <nonterminal symbol="subparagraphs"/>
  -    <nonterminal symbol="subsubsection"/>
  -  </production>
  -  <production symbol="subparagraphs">
  -    <nonterminal symbol="subsubsection"/>
  -    <terminal symbol="hardbreak"/>
  -  </production>
  -  <production symbol="subparagraphs">
  -    <nonterminal symbol="subsubsection"/>
  -  </production>
  -  <production symbol="subsubsection">
  -    <nonterminal symbol="subsubtitle"/>
  -    <nonterminal symbol="subsubparagraphs"/>
  -  </production>
  -  <production symbol="subsubsection">
  -    <nonterminal symbol="subsubtitle"/>
  -    <terminal symbol="hardbreak"/>
  -    <nonterminal symbol="subsubparagraphs"/>
  -  </production>
  -  <production symbol="subsubtitle">
  -    <terminal symbol="subsubtitleitem"/>
  -    <nonterminal symbol="textsequence"/>
  -  </production>
  -  <production symbol="subsubparagraphs">
  -    <nonterminal symbol="subsubparagraphs"/>
  -    <nonterminal symbol="paragraph"/>
  -    <terminal symbol="hardbreak"/>
  -  </production>
  -  <production symbol="subsubparagraphs">
  -    <nonterminal symbol="subsubparagraphs"/>
  -    <nonterminal symbol="paragraph"/>
  -  </production>
  -  <production symbol="subsubparagraphs">
  -    <nonterminal symbol="paragraph"/>
  -    <terminal symbol="hardbreak"/>
  -  </production>
  -  <production symbol="subsubparagraphs">
  -    <nonterminal symbol="paragraph"/>
  -  </production>
     <production symbol="paragraph">
       <nonterminal symbol="bulletedlist"/>
     </production>
  @@ -277,30 +179,25 @@
       <terminal symbol="tablecolumnitem"/>
       <nonterminal symbol="textblock"/>
     </production>
  -  <production symbol="textsequence">
  +  <production symbol="title">
  +    <terminal symbol="titleitem"/>
       <nonterminal symbol="textsequence"/>
  -    <nonterminal symbol="textblock"/>
  -    <terminal symbol="softbreak"/>
     </production>
     <production symbol="textsequence">
       <nonterminal symbol="textsequence"/>
       <nonterminal symbol="textblock"/>
  -  </production>
  -  <production symbol="textsequence">
  -    <nonterminal symbol="textblock"/>
       <terminal symbol="softbreak"/>
     </production>
     <production symbol="textsequence">
  +    <nonterminal symbol="textsequence"/>
       <nonterminal symbol="textblock"/>
     </production>
     <production symbol="textsequence">
  -    <nonterminal symbol="textsequence"/>
       <nonterminal symbol="textblock"/>
  -    <terminal symbol="break"/>
  +    <terminal symbol="softbreak"/>
     </production>
     <production symbol="textsequence">
       <nonterminal symbol="textblock"/>
  -    <terminal symbol="break"/>
     </production>
     <production symbol="textblock">
       <terminal symbol="link"/>
  
  
  
  1.3       +19 -95    xml-forrest/src/resources/grammars/wiki.xlex
  
  Index: wiki.xlex
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/grammars/wiki.xlex,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- wiki.xlex	27 Apr 2003 06:05:58 -0000	1.2
  +++ wiki.xlex	27 Apr 2003 11:26:06 -0000	1.3
  @@ -1,19 +1,19 @@
  -<?xml version="1.0" encoding="ISO-8859-1"?>
  +<?xml version="1.0" encoding="UTF-8"?>
   <lexicon xmlns="http://chaperon.sourceforge.net/schema/lexicon/1.0">
  -<!--This file was generated! Don't edit!-->
  +  <!--This file was generated! Don't edit!-->
     <lexeme symbol="line">
       <concat>
         <cstring content="-"/>
         <cstring content="-"/>
         <cstring content="-"/>
         <cstring content="-"/>
  -      <concat maxOccurs="*" minOccurs="0">
  +      <concat minOccurs="1" maxOccurs="*">
           <cstring content="-"/>
         </concat>
       </concat>
     </lexeme>
     <lexeme symbol="bulleteditem">
  -    <concat maxOccurs="*" minOccurs="1">
  +    <concat minOccurs="1" maxOccurs="*">
         <cstring content="*"/>
       </concat>
     </lexeme>
  @@ -43,21 +43,10 @@
       <cstring content="|"/>
     </lexeme>
     <lexeme symbol="titleitem">
  -    <concat>
  -      <cstring content="!"/>
  -      <cstring content="!"/>
  -      <cstring content="!"/>
  -    </concat>
  -  </lexeme>
  -  <lexeme symbol="subtitleitem">
  -    <concat>
  -      <cstring content="!"/>
  +    <concat minOccurs="1" maxOccurs="*">
         <cstring content="!"/>
       </concat>
     </lexeme>
  -  <lexeme symbol="subsubtitleitem">
  -    <cstring content="!"/>
  -  </lexeme>
     <lexeme symbol="emitem">
       <concat>
         <cstring content="'"/>
  @@ -87,7 +76,7 @@
         <cstring content="{"/>
         <cstring content="{"/>
         <cstring content="{"/>
  -      <concat maxOccurs="*" minOccurs="0">
  +      <concat minOccurs="0" maxOccurs="*">
           <concat>
             <concat minOccurs="0" maxOccurs="2">
               <cstring content="}"/>
  @@ -105,9 +94,9 @@
     <lexeme symbol="anchor">
       <concat>
         <cstring content="["/>
  -      <concat maxOccurs="1" minOccurs="0">
  +      <concat minOccurs="0" maxOccurs="1">
           <concat>
  -          <concat maxOccurs="*" minOccurs="0">
  +          <concat minOccurs="0" maxOccurs="*">
               <cclass exclusive="true">
                 <cset content="["/>
                 <cset content="|"/>
  @@ -118,7 +107,7 @@
           </concat>
         </concat>
         <cstring content="#"/>
  -      <concat maxOccurs="*" minOccurs="0">
  +      <concat minOccurs="0" maxOccurs="*">
           <cclass exclusive="true">
             <cset content="["/>
             <cset content="|"/>
  @@ -131,9 +120,9 @@
     <lexeme symbol="link">
       <concat>
         <cstring content="["/>
  -      <concat maxOccurs="1" minOccurs="0">
  +      <concat minOccurs="0" maxOccurs="1">
           <concat>
  -          <concat maxOccurs="*" minOccurs="0">
  +          <concat minOccurs="0" maxOccurs="*">
               <cclass exclusive="true">
                 <cset content="["/>
                 <cset content="|"/>
  @@ -143,7 +132,7 @@
             <cstring content="|"/>
           </concat>
         </concat>
  -      <concat maxOccurs="*" minOccurs="0">
  +      <concat minOccurs="0" maxOccurs="*">
           <cclass exclusive="true">
             <cset content="["/>
             <cset content="|"/>
  @@ -157,6 +146,7 @@
       <concat>
         <alt>
           <cclass exclusive="true">
  +          <cset content=" "/>
             <cset code="9"/>
             <cset code="10"/>
             <cset code="13"/>
  @@ -165,8 +155,6 @@
             <cset content="}"/>
             <cset content="|"/>
             <cset content="*"/>
  -          <cset content="\"/>
  -          <cset content="-"/>
             <cset content="_"/>
             <cset content="!"/>
             <cset content="#"/>
  @@ -176,60 +164,32 @@
             <cstring content="_"/>
             <cclass exclusive="true">
               <cset content="_"/>
  -            <cset code="10"/>
  -            <cset code="13"/>
             </cclass>
           </concat>
           <concat>
             <cstring content="{"/>
             <cclass exclusive="true">
               <cset content="{"/>
  -            <cset code="10"/>
  -            <cset code="13"/>
             </cclass>
           </concat>
           <concat>
             <cstring content="}"/>
             <cclass exclusive="true">
               <cset content="}"/>
  -            <cset code="10"/>
  -            <cset code="13"/>
             </cclass>
           </concat>
           <concat>
             <cstring content="'"/>
             <cclass exclusive="true">
               <cset content="'"/>
  -            <cset code="10"/>
  -            <cset code="13"/>
             </cclass>
           </concat>
           <concat>
             <cstring content="["/>
             <cstring content="["/>
           </concat>
  -        <concat>
  -          <cstring content="\"/>
  -          <cclass exclusive="true">
  -            <cset content="\"/>
  -            <cset code="10"/>
  -            <cset code="13"/>
  -          </cclass>
  -        </concat>
  -        <concat>
  -          <concat minOccurs="1" maxOccurs="3">
  -            <cstring content="-"/>
  -          </concat>
  -          <concat maxOccurs="1" minOccurs="0">
  -            <cclass exclusive="true">
  -              <cset content="-"/>
  -              <cset code="10"/>
  -              <cset code="13"/>
  -            </cclass>
  -          </concat>
  -        </concat>
         </alt>
  -      <concat maxOccurs="*" minOccurs="0">
  +      <concat minOccurs="0" maxOccurs="*">
           <alt>
             <cclass exclusive="true">
               <cset code="10"/>
  @@ -238,8 +198,6 @@
               <cset content="{"/>
               <cset content="}"/>
               <cset content="|"/>
  -            <cset content="\"/>
  -            <cset content="-"/>
               <cset content="_"/>
               <cset content="'"/>
             </cclass>
  @@ -247,32 +205,24 @@
               <cstring content="_"/>
               <cclass exclusive="true">
                 <cset content="_"/>
  -              <cset code="10"/>
  -              <cset code="13"/>
               </cclass>
             </concat>
             <concat>
               <cstring content="{"/>
               <cclass exclusive="true">
                 <cset content="{"/>
  -              <cset code="10"/>
  -              <cset code="13"/>
               </cclass>
             </concat>
             <concat>
               <cstring content="}"/>
               <cclass exclusive="true">
                 <cset content="}"/>
  -              <cset code="10"/>
  -              <cset code="13"/>
               </cclass>
             </concat>
             <concat>
               <cstring content="'"/>
               <cclass exclusive="true">
                 <cset content="'"/>
  -              <cset code="10"/>
  -              <cset code="13"/>
               </cclass>
             </concat>
             <concat>
  @@ -280,26 +230,6 @@
               <cstring content="["/>
             </concat>
             <concat>
  -            <cstring content="\"/>
  -            <cclass exclusive="true">
  -              <cset content="\"/>
  -              <cset code="10"/>
  -              <cset code="13"/>
  -            </cclass>
  -          </concat>
  -          <concat>
  -            <concat minOccurs="1" maxOccurs="3">
  -              <cstring content="-"/>
  -            </concat>
  -            <concat maxOccurs="1" minOccurs="0">
  -              <cclass exclusive="true">
  -                <cset content="-"/>
  -                <cset code="10"/>
  -                <cset code="13"/>
  -              </cclass>
  -            </concat>
  -          </concat>
  -          <concat>
               <cstring content="|"/>
               <cclass exclusive="true">
                 <cset content="|"/>
  @@ -315,35 +245,29 @@
       <alt>
         <concat>
           <cstring code="13"/>
  -        <concat maxOccurs="1" minOccurs="0">
  +        <concat minOccurs="0" maxOccurs="1">
             <cstring code="10"/>
           </concat>
         </concat>
         <cstring code="10"/>
       </alt>
     </lexeme>
  -  <lexeme symbol="break" assoc="right">
  -    <concat>
  -      <cstring content="\"/>
  -      <cstring content="\"/>
  -    </concat>
  -  </lexeme>
     <lexeme symbol="hardbreak" assoc="right">
       <concat>
         <alt>
           <concat>
             <cstring code="13"/>
  -          <concat maxOccurs="1" minOccurs="0">
  +          <concat minOccurs="0" maxOccurs="1">
               <cstring code="10"/>
             </concat>
           </concat>
           <cstring code="10"/>
         </alt>
  -      <concat maxOccurs="*" minOccurs="1">
  +      <concat minOccurs="1" maxOccurs="*">
           <alt>
             <concat>
               <cstring code="13"/>
  -            <concat maxOccurs="1" minOccurs="0">
  +            <concat minOccurs="0" maxOccurs="1">
                 <cstring code="10"/>
               </concat>
             </concat>
  @@ -353,7 +277,7 @@
       </concat>
     </lexeme>
     <lexeme>
  -    <concat maxOccurs="*" minOccurs="1">
  +    <concat minOccurs="1" maxOccurs="*">
         <cclass>
           <cset content=" "/>
           <cset code="9"/>
  
  
  

Mime
View raw message