cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From step...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/chaperon/samples/stylesheets quote2page.xsl
Date Thu, 11 Dec 2003 11:21:36 GMT
stephan     2003/12/11 03:21:36

  Modified:    src/blocks/chaperon/samples/grammars quote.grm quote.xgrm
                        quote.xlex
               src/blocks/chaperon/samples/stylesheets quote2page.xsl
  Log:
  Update grammar for CSV files, old grammar had a shift/reduce conflict.
  
  Revision  Changes    Path
  1.2       +13 -5     cocoon-2.1/src/blocks/chaperon/samples/grammars/quote.grm
  
  Index: quote.grm
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/chaperon/samples/grammars/quote.grm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- quote.grm	9 Mar 2003 00:02:54 -0000	1.1
  +++ quote.grm	11 Dec 2003 11:21:36 -0000	1.2
  @@ -1,19 +1,27 @@
   %ignore          "^#(.*)";
   %token Comma     "\,";
   %token Value     "[^\n\r\,]+";
  -%token SoftBreak "\r(\n?) | \n";
  +%token Break "\r(\n?) | \n";
   
   %start document;
   
   %%
   
  +// with optional last break
   document
  -  : document SoftBreak row
  -  | row SoftBreak
  -  | row
  +  : rows Break
  +  | rows
     ;
   
  +// each row seprated with one break
  +// and optional last space
  +rows
  +  : rows Break row
  +  | row
  +  ;
  +                                                                                      
                                                                                        
  +// values separated by spaces
   row
  -  : row Comma Value 
  +  : row Comma Value
     | Value
     ;
  
  
  
  1.2       +11 -7     cocoon-2.1/src/blocks/chaperon/samples/grammars/quote.xgrm
  
  Index: quote.xgrm
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/chaperon/samples/grammars/quote.xgrm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- quote.xgrm	9 Mar 2003 00:02:54 -0000	1.1
  +++ quote.xgrm	11 Dec 2003 11:21:36 -0000	1.2
  @@ -1,21 +1,25 @@
  -<?xml version="1.0" encoding="UTF-8"?>
  +<?xml version="1.0" encoding="ISO-8859-1"?>
  +
   <grammar xmlns="http://chaperon.sourceforge.net/schema/grammar/1.0">
   <!--This file was generated! Don't edit!-->
   <priority>
   <terminal symbol="Comma"/>
   <terminal symbol="Value"/>
  -<terminal symbol="SoftBreak"/>
  +<terminal symbol="Break"/>
   </priority>
   <production symbol="document">
  -<nonterminal symbol="document"/>
  -<terminal symbol="SoftBreak"/>
  -<nonterminal symbol="row"/>
  +<nonterminal symbol="rows"/>
  +<terminal symbol="Break"/>
   </production>
   <production symbol="document">
  +<nonterminal symbol="rows"/>
  +</production>
  +<production symbol="rows">
  +<nonterminal symbol="rows"/>
  +<terminal symbol="Break"/>
   <nonterminal symbol="row"/>
  -<terminal symbol="SoftBreak"/>
   </production>
  -<production symbol="document">
  +<production symbol="rows">
   <nonterminal symbol="row"/>
   </production>
   <production symbol="row">
  
  
  
  1.2       +6 -5      cocoon-2.1/src/blocks/chaperon/samples/grammars/quote.xlex
  
  Index: quote.xlex
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/chaperon/samples/grammars/quote.xlex,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- quote.xlex	9 Mar 2003 00:02:54 -0000	1.1
  +++ quote.xlex	11 Dec 2003 11:21:36 -0000	1.2
  @@ -1,11 +1,12 @@
  -<?xml version="1.0" encoding="UTF-8"?>
  +<?xml version="1.0" encoding="ISO-8859-1"?>
  +
   <lexicon xmlns="http://chaperon.sourceforge.net/schema/lexicon/1.0">
   <!--This file was generated! Don't edit!-->
   <lexeme>
   <concat>
   <bol/>
   <cstring content="#"/>
  -<concat minOccurs="0" maxOccurs="*">
  +<concat maxOccurs="*" minOccurs="0">
   <cclass exclusive="true">
   <cset code="10"/>
   <cset code="13"/>
  @@ -17,7 +18,7 @@
   <cstring content=","/>
   </lexeme>
   <lexeme symbol="Value">
  -<concat minOccurs="1" maxOccurs="*">
  +<concat maxOccurs="*" minOccurs="1">
   <cclass exclusive="true">
   <cset code="10"/>
   <cset code="13"/>
  @@ -25,11 +26,11 @@
   </cclass>
   </concat>
   </lexeme>
  -<lexeme symbol="SoftBreak">
  +<lexeme symbol="Break">
   <alt>
   <concat>
   <cstring code="13"/>
  -<concat minOccurs="0" maxOccurs="1">
  +<concat maxOccurs="1" minOccurs="0">
   <cstring code="10"/>
   </concat>
   </concat>
  
  
  
  1.3       +4 -0      cocoon-2.1/src/blocks/chaperon/samples/stylesheets/quote2page.xsl
  
  Index: quote2page.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/chaperon/samples/stylesheets/quote2page.xsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- quote2page.xsl	4 Oct 2003 01:51:58 -0000	1.2
  +++ quote2page.xsl	11 Dec 2003 11:21:36 -0000	1.3
  @@ -51,6 +51,10 @@
     </document>
    </xsl:template>
   
  + <xsl:template match="st:rows">
  +  <xsl:apply-templates select="st:row"/>
  + </xsl:template>
  +
    <xsl:template match="st:row">
     <tr>
      <td><xsl:number/></td>
  
  
  

Mime
View raw message