forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nicola...@apache.org
Subject cvs commit: xml-forrest/src/core/context/resources/chaperon/grammars egrm.xegrm error.xlex java.egrm grm.xgrm grm.xlex java.grm java.xgrm javadoc.grm link.xlex mathexp.xgrm mathexp.xlex quote.grm quote.xgrm quote.xlex regex.xgrm regex.xlex
Date Fri, 23 Jan 2004 09:49:58 GMT
nicolaken    2004/01/23 01:49:58

  Modified:    src/core/context/resources/chaperon/grammars grm.xgrm
                        grm.xlex java.grm java.xgrm javadoc.grm link.xlex
                        mathexp.xgrm mathexp.xlex quote.grm quote.xgrm
                        quote.xlex regex.xgrm regex.xlex
  Added:       src/core/context/resources/chaperon/grammars egrm.xegrm
                        error.xlex java.egrm
  Log:
  Update chaperon block
  
  Revision  Changes    Path
  1.2       +5 -3      xml-forrest/src/core/context/resources/chaperon/grammars/grm.xgrm
  
  Index: grm.xgrm
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/core/context/resources/chaperon/grammars/grm.xgrm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- grm.xgrm	28 Nov 2003 11:04:29 -0000	1.1
  +++ grm.xgrm	23 Jan 2004 09:49:58 -0000	1.2
  @@ -1,7 +1,5 @@
   <?xml version="1.0" standalone="no"?>
  -<!DOCTYPE grammar PUBLIC "-//Chaperon//DTD grammar 2.0//EN" "grammar-v20.dtd">
  -
  -<grammar>
  +<grammar xmlns="http://chaperon.sourceforge.net/schema/grammar/1.0">
   
    <production symbol="grammar">
     <nonterminal symbol="token_decls"/><terminal symbol="delimiter"/>
  @@ -85,6 +83,10 @@
   
    <production symbol="production_def">
     <nonterminal symbol="ids"/>
  + </production>
  +
  + <production symbol="production_def">
  +  <!-- empty definition -->
    </production>
   
    <production symbol="production_def">
  
  
  
  1.2       +1 -3      xml-forrest/src/core/context/resources/chaperon/grammars/grm.xlex
  
  Index: grm.xlex
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/core/context/resources/chaperon/grammars/grm.xlex,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- grm.xlex	28 Nov 2003 11:04:29 -0000	1.1
  +++ grm.xlex	23 Jan 2004 09:49:58 -0000	1.2
  @@ -1,7 +1,5 @@
   <?xml version="1.0" standalone="no"?>
  -<!DOCTYPE lexicon PUBLIC "-//Chaperon//DTD lexicon 2.0//EN" "lexicon-v20.dtd">
  -
  -<lexicon>
  +<lexicon xmlns="http://chaperon.sourceforge.net/schema/lexicon/1.0">
   
    <lexeme symbol="token_decl">
     <alt>
  
  
  
  1.2       +4 -3      xml-forrest/src/core/context/resources/chaperon/grammars/java.grm
  
  Index: java.grm
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/core/context/resources/chaperon/grammars/java.grm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- java.grm	28 Nov 2003 11:04:29 -0000	1.1
  +++ java.grm	23 Jan 2004 09:49:58 -0000	1.2
  @@ -90,7 +90,7 @@
   %token OP_SHRR  "\>\>\>";
   %token ASS_OP   "\+= | \-= | \*= | /= | &= | \|= | \^= | \%= | \<\<= | \>\>=
| \>\>\>=";
   
  -%token EQ    "\=";
  +%right EQ    "\=";
   %token GT    "\>";
   %token LT    "\<";
   %token NOT   "\!";
  @@ -457,7 +457,8 @@
   	;
   
   StaticInitializer
  -	: STATIC Block
  +	:         STATIC Block
  +  | JAVADOC STATIC Block
   	;
   
   NonStaticInitializer
  @@ -583,7 +584,7 @@
   	;
   
   PrimaryExpression
  -	: QualifiedName 
  +	: QualifiedName %prec DOPEN
   	| NotJustName 
   	;
   
  
  
  
  1.2       +4 -4      xml-forrest/src/core/context/resources/chaperon/grammars/java.xgrm
  
  Index: java.xgrm
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/core/context/resources/chaperon/grammars/java.xgrm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- java.xgrm	28 Nov 2003 11:04:29 -0000	1.1
  +++ java.xgrm	23 Jan 2004 09:49:58 -0000	1.2
  @@ -1,5 +1,7 @@
  -<?xml version="1.0" encoding="ISO-8859-1"?>
  +<?xml version="1.0" encoding="US-ASCII"?>
  +
   <grammar xmlns="http://chaperon.sourceforge.net/schema/grammar/1.0">
  +<!--This file was generated! Don't edit!-->
   <priority>
   <terminal symbol="DOPEN"/>
   <terminal symbol="DCLOSE"/>
  @@ -104,8 +106,6 @@
   <terminal symbol="MULTILINECOMMENT"/>
   <terminal symbol="SINGLELINECOMMENT"/>
   </priority>
  -<associativity type="right" symbol="DOT"/>
  -<associativity type="right" symbol="ELSE"/>
   <production symbol="TypeSpecifier">
   <nonterminal symbol="TypeName"/>
   </production>
  @@ -116,7 +116,7 @@
   <production symbol="TypeName">
   <nonterminal symbol="PrimitiveType"/>
   </production>
  -<production symbol="TypeName" precedence="DOT">
  +<production symbol="TypeName">
   <nonterminal symbol="QualifiedName"/>
   </production>
   <production symbol="ClassNameList">
  
  
  
  1.2       +4 -4      xml-forrest/src/core/context/resources/chaperon/grammars/javadoc.grm
  
  Index: javadoc.grm
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/core/context/resources/chaperon/grammars/javadoc.grm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- javadoc.grm	28 Nov 2003 11:04:29 -0000	1.1
  +++ javadoc.grm	23 Jan 2004 09:49:58 -0000	1.2
  @@ -1,13 +1,13 @@
  -%token ASTERISK     "\*";
  +%ignore      "\*";
   //%token DOT          "\.";
   %token TEXT         "[^\ \t\*\r\n@\<\>] ([^\*\r\n@\<\>]* [^\ \*\r\n@\<\>])?";
   %token TAG          "\< (/?) [A-Za-z][A-Za-z0-9]* 
                               ([\ \t\r\n]+ [A-Za-z][A-Za-z0-9]*=\"[^\"]*\")* 
                           [\ \t\r\n]* (/?) \>";
   %token PROPERTYNAME "@[A-Za-z][A-Za-z0-9]*";
  -%token SPACES       "(\ )+";
  -%token TAB          "\t";
  -%token EOL          "\r(\n)?|\n";
  +%ignore       "(\ )+";
  +%ignore          "\t";
  +%ignore          "\r(\n)?|\n";
   
   %start JavaDoc;
   
  
  
  
  1.2       +1 -3      xml-forrest/src/core/context/resources/chaperon/grammars/link.xlex
  
  Index: link.xlex
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/core/context/resources/chaperon/grammars/link.xlex,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- link.xlex	28 Nov 2003 11:04:29 -0000	1.1
  +++ link.xlex	23 Jan 2004 09:49:58 -0000	1.2
  @@ -1,7 +1,5 @@
   <?xml version="1.0"?>
  -<!DOCTYPE lexicon PUBLIC "-//Chaperon//DTD lexicon 2.0//EN" "lexicon-v20.dtd">
  -
  -<lexicon>
  +<lexicon xmlns="http://chaperon.sourceforge.net/schema/lexicon/1.0">
    <!-- (([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))? -->
    <lexeme symbol="link">
     <concat>
  
  
  
  1.2       +1 -3      xml-forrest/src/core/context/resources/chaperon/grammars/mathexp.xgrm
  
  Index: mathexp.xgrm
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/core/context/resources/chaperon/grammars/mathexp.xgrm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- mathexp.xgrm	28 Nov 2003 11:04:29 -0000	1.1
  +++ mathexp.xgrm	23 Jan 2004 09:49:58 -0000	1.2
  @@ -1,7 +1,5 @@
   <?xml version="1.0"?>
  -<!DOCTYPE grammar PUBLIC "-//Chaperon//DTD grammar 2.0//EN" "grammar-v20.dtd">
  -
  -<grammar>
  +<grammar xmlns="http://chaperon.sourceforge.net/schema/grammar/1.0">
    <production symbol="E">
     <nonterminal symbol="E"/><terminal symbol="plus"/><nonterminal symbol="T"/>
    </production>
  
  
  
  1.2       +1 -3      xml-forrest/src/core/context/resources/chaperon/grammars/mathexp.xlex
  
  Index: mathexp.xlex
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/core/context/resources/chaperon/grammars/mathexp.xlex,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- mathexp.xlex	28 Nov 2003 11:04:29 -0000	1.1
  +++ mathexp.xlex	23 Jan 2004 09:49:58 -0000	1.2
  @@ -1,7 +1,5 @@
   <?xml version="1.0"?>
  -<!DOCTYPE lexicon PUBLIC "-//Chaperon//DTD lexicon 2.0//EN" "lexicon-v20.dtd">
  -
  -<lexicon>
  +<lexicon xmlns="http://chaperon.sourceforge.net/schema/lexicon/1.0">
    <lexeme symbol="plus">
     <cclass><cset content="+-"/></cclass>
    </lexeme>
  
  
  
  1.2       +13 -5     xml-forrest/src/core/context/resources/chaperon/grammars/quote.grm
  
  Index: quote.grm
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/core/context/resources/chaperon/grammars/quote.grm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- quote.grm	28 Nov 2003 11:04:29 -0000	1.1
  +++ quote.grm	23 Jan 2004 09:49:58 -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       +10 -7     xml-forrest/src/core/context/resources/chaperon/grammars/quote.xgrm
  
  Index: quote.xgrm
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/core/context/resources/chaperon/grammars/quote.xgrm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- quote.xgrm	28 Nov 2003 11:04:29 -0000	1.1
  +++ quote.xgrm	23 Jan 2004 09:49:58 -0000	1.2
  @@ -1,21 +1,24 @@
  -<?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      xml-forrest/src/core/context/resources/chaperon/grammars/quote.xlex
  
  Index: quote.xlex
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/core/context/resources/chaperon/grammars/quote.xlex,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- quote.xlex	28 Nov 2003 11:04:29 -0000	1.1
  +++ quote.xlex	23 Jan 2004 09:49:58 -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.2       +1 -2      xml-forrest/src/core/context/resources/chaperon/grammars/regex.xgrm
  
  Index: regex.xgrm
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/core/context/resources/chaperon/grammars/regex.xgrm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- regex.xgrm	28 Nov 2003 11:04:29 -0000	1.1
  +++ regex.xgrm	23 Jan 2004 09:49:58 -0000	1.2
  @@ -1,6 +1,5 @@
   <?xml version="1.0" standalone="no"?>
  -<!DOCTYPE grammar PUBLIC "-//Chaperon//DTD grammar 2.0//EN" "grammar-v20.dtd">
  -<grammar>
  +<grammar xmlns="http://chaperon.sourceforge.net/schema/grammar/1.0">
    <priority>
     <terminal symbol="plus"/>
    </priority>
  
  
  
  1.2       +1 -3      xml-forrest/src/core/context/resources/chaperon/grammars/regex.xlex
  
  Index: regex.xlex
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/core/context/resources/chaperon/grammars/regex.xlex,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- regex.xlex	28 Nov 2003 11:04:29 -0000	1.1
  +++ regex.xlex	23 Jan 2004 09:49:58 -0000	1.2
  @@ -1,7 +1,5 @@
   <?xml version="1.0" standalone="no"?>
  -<!DOCTYPE lexicon PUBLIC "-//Chaperon//DTD lexicon 2.0//EN" "lexicon-v20.dtd">
  -
  -<lexicon>
  +<lexicon xmlns="http://chaperon.sourceforge.net/schema/lexicon/1.0">
   
    <lexeme symbol="alt">
     <cstring content="|"/>
  
  
  
  1.1                  xml-forrest/src/core/context/resources/chaperon/grammars/egrm.xegrm
  
  Index: egrm.xegrm
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <grammar xmlns="http://chaperon.sourceforge.net/schema/grammar/2.0"                 
                                                                        
           start="grammar">
  
   <definition name="grammar">
    <sequence>
     <optional>
      <element name="ws"/>   
     </optional>
     <choice>
      <element name="definition"/>
      <element name="abbreviation"/>
      <element name="start"/>
     </choice>
     <zero-or-more>
      <element name="ws"/>
      <choice>
       <element name="definition"/>
       <element name="abbreviation"/>
       <element name="start"/>
      </choice>
     </zero-or-more>
     <optional>
      <element name="ws"/>
     </optional>
    </sequence>
   </definition>
  
   <definition name="definition">
    <sequence>
     <element name="name"/>
     <element name="ws"/>
     <char value=":"/>
     <element name="ws"/>
     <optional>
      <element name="regex"/>
     </optional>
     <element name="ws"/>
     <char value=";"/>
    </sequence>
   </definition>
  
   <definition name="name">
    <sequence>
     <class>
      <interval><char value="A"/><char value="Z"/></interval>
      <interval><char value="a"/><char value="z"/></interval>
     </class>
     <zero-or-more>
      <class>
       <interval><char value="A"/><char value="Z"/></interval>
       <interval><char value="a"/><char value="z"/></interval>
       <interval><char value="0"/><char value="9"/></interval>
       <char value="_"/>
       <char value="-"/>
      </class>
     </zero-or-more>
    </sequence>
   </definition>
  
   <definition name="abbreviation">
    <char value="%"/>
    <char value="a"/>
    <char value="b"/>
    <element name="ws"/>
    <element name="name"/>
    <element name="ws"/>
    <char value=":"/>
    <element name="ws"/>
    <element name="regex"/>
    <element name="ws"/>
    <char value=";"/>
   </definition>
  
   <definition name="start">
    <char value="%"/>
    <char value="s"/>
    <char value="t"/>
    <char value="a"/>
    <char value="r"/>
    <char value="t"/>
    <element name="ws"/>
    <element name="name"/>
    <element name="ws"/>
    <char value=";"/>
   </definition>
  
   <definition name="precedence">
    <element name="ws"/>
    <char value="%"/>
    <char value="p"/>
    <char value="r"/>
    <char value="e"/>
    <char value="c"/>
    <element name="ws"/>
    <element name="name"/>
   </definition>
  
   <definition name="regex">
    <choice>
     <element name="choice"/>
     <element name="sequence"/>
     <element name="quantifier"/>
    </choice>
   </definition>
  
   <definition name="choice">
    <sequence>
     <choice>
      <element name="sequence"/>
      <element name="quantifier"/>
     </choice>
     <one-or-more>
      <optional>
       <element name="precedence"/>
      </optional>
      <element name="ws"/>
      <char value="|"/>
      <element name="ws"/>
      <choice>
       <element name="sequence"/>
       <element name="quantifier"/>
      </choice>
      <optional>
       <element name="precedence"/>
      </optional>
     </one-or-more>
    </sequence>
   </definition>
  
   <definition name="sequence">
    <sequence>
     <element name="quantifier"/>
     <one-or-more>
      <element name="ws"/>
      <element name="quantifier"/>
     </one-or-more>
    </sequence>
   </definition>
  
   <definition name="quantifier">
    <choice>
     <element name="optional"/>
     <element name="one-or-more"/>
     <element name="zero-or-more"/>
     <element name="term"/>
    </choice>
   </definition>
  
   <definition name="optional">
    <sequence>
     <element name="term"/>
     <element name="ws"/>
     <char value="?"/>
    </sequence>
   </definition>
  
   <definition name="one-or-more">
    <sequence>
     <element name="term"/>
     <element name="ws"/>
     <char value="+"/>
    </sequence>
   </definition>
  
   <definition name="zero-or-more">
    <sequence>
     <element name="term"/>
     <element name="ws"/>
     <char value="*"/>
    </sequence>
   </definition>
  
   <definition name="term">
    <choice>
     <element name="class"/>
     <element name="string"/>
     <element name="nested"/>
     <element name="element"/>
     <element name="dot"/>
    </choice>
   </definition>
  
   <definition name="class">
    <sequence>
     <char value="["/>
     <optional>
      <element name="exclusive"/>
     </optional>
     <one-or-more>
      <choice>
       <element name="interval"/>
       <element name="class-char"/>
       <element name="masked-char"/>
      </choice>
     </one-or-more>
     <char value="]"/>
    </sequence>
   </definition>
  
   <definition name="exclusive">
    <char value="^"/>
   </definition>
  
   <definition name="string">
    <sequence>
     <char value="&#34;"/>
     <one-or-more>
      <choice>
       <element name="char"/>
       <element name="masked-char"/>
      </choice>
     </one-or-more>
     <char value="&#34;"/>
    </sequence>
   </definition>
  
   <definition name="char">
    <class exclusive="true">
     <char value="&#92;"/>
     <char value="&#10;"/>
     <char value="&#13;"/>
     <char value="&#34;"/>
    </class>
   </definition>
  
   <definition name="class-char">
    <class exclusive="true">
     <char value="&#92;"/>
     <char value="["/>
     <char value="]"/>
     <char value="-"/>
     <char value="&#10;"/>
     <char value="&#13;"/>
     <char value="&#32;"/>
     <char value="^"/>
    </class>
   </definition>
  
   <definition name="masked-char">
    <choice>
     <sequence>
      <char value="&#92;"/>
      <class exclusive="true">
       <char value="u"/>
      </class>
     </sequence>
     <sequence>
      <char value="&#92;"/>
      <char value="u"/>
      <class>
       <interval><char value="0"/><char value="9"/></interval>
       <interval><char value="a"/><char value="f"/></interval>
       <interval><char value="A"/><char value="F"/></interval>
      </class>
      <class>
       <interval><char value="0"/><char value="9"/></interval>
       <interval><char value="a"/><char value="f"/></interval>
       <interval><char value="A"/><char value="F"/></interval>
      </class>
      <class>
       <interval><char value="0"/><char value="9"/></interval>
       <interval><char value="a"/><char value="f"/></interval>
       <interval><char value="A"/><char value="F"/></interval>
      </class>
      <class>
       <interval><char value="0"/><char value="9"/></interval>
       <interval><char value="a"/><char value="f"/></interval>
       <interval><char value="A"/><char value="F"/></interval>
      </class>
     </sequence>
    </choice>
   </definition>
  
   <definition name="dot">
    <char value="."/>
   </definition>
  
   <definition name="interval">
    <sequence>
     <choice>
      <element name="class-char"/>
      <element name="masked-char"/>
     </choice>
     <char value="-"/>
     <choice>
      <element name="class-char"/>
      <element name="masked-char"/>
     </choice>
    </sequence>
   </definition>
  
   <definition name="nested">
    <sequence>
     <char value="("/>
     <element name="ws"/>
     <choice>
      <element name="choice"/>
      <element name="sequence"/>
      <element name="quantifier"/>
     </choice>
     <element name="ws"/>
     <char value=")"/>
    </sequence>
   </definition>
  
   <definition name="element">
    <sequence>
     <class>
      <interval><char value="A"/><char value="Z"/></interval>
      <interval><char value="a"/><char value="z"/></interval>
     </class>
     <zero-or-more>
      <class>
       <interval><char value="A"/><char value="Z"/></interval>
       <interval><char value="a"/><char value="z"/></interval>
       <interval><char value="0"/><char value="9"/></interval>
       <char value="_"/>
       <char value="-"/>
      </class>
     </zero-or-more>
    </sequence>
   </definition>
  
   <definition name="ws">
    <zero-or-more>
     <choice>
      <sequence>
       <char value="/"/>
       <char value="/"/>
       <zero-or-more>
        <class exclusive="true">
         <char value="&#10;"/>
         <char value="&#13;"/>
        </class>
       </zero-or-more>
       <one-or-more>
        <class>
         <char value="&#10;"/>
         <char value="&#13;"/>
        </class>
       </one-or-more>
      </sequence>
      <sequence>
       <char value="/"/>
       <char value="*"/>
       <zero-or-more>
        <choice>
         <class exclusive="true"><char value="*"/></class>
         <sequence><char value="*"/><class exclusive="true"><char value="/"/></class></sequence>
        </choice>
       </zero-or-more>
       <char value="*"/>
       <char value="/"/>
      </sequence>
      <class>
       <char value="&#10;"/>
       <char value="&#13;"/>
       <char value="&#9;"/>
       <char value="&#32;"/>
      </class>
     </choice>
    </zero-or-more>
   </definition>
  </grammar>
  
  
  
  
  1.1                  xml-forrest/src/core/context/resources/chaperon/grammars/error.xlex
  
  Index: error.xlex
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <lexicon xmlns="http://chaperon.sourceforge.net/schema/lexicon/1.0">
   <lexeme symbol="line">
    <alt>
     <concat>
      <bol/>
      <cclass maxOccurs="*" minOccurs="0" exclusive="true">
       <cset content="&#13;&#10;"/>
      </cclass>
      <alt>
       <concat>
        <cstring code="13"/>
        <cstring code="10" minOccurs="0"/>
       </concat>
       <cstring code="10"/>
      </alt>   
     </concat>
     <concat>
      <bol/>
      <cclass maxOccurs="*" minOccurs="1" exclusive="true">
       <cset content="&#13;&#10;"/>
      </cclass>
      <eol/>
     </concat>
    </alt>
   </lexeme>
  </lexicon>
  
  
  
  1.1                  xml-forrest/src/core/context/resources/chaperon/grammars/java.egrm
  
  Index: java.egrm
  ===================================================================
  /* Java Grammar */
  
  %ab HexDigit        : [0-9a-fA-F];
  %ab Digit           : [0-9];
  %ab OctalDigit      : [0-7];
  %ab TetraDigit      : [0-3];
  %ab NonZeroDigit    : [1-9];
  %ab Letter          : [a-zA-Z_];
  %ab AnyButSlash     : [^/];
  %ab AnyButAstr      : [^*];
  %ab UniEsc          : [\u0001];
  
  %ab OctEscape1      : "\\" OctalDigit;
  %ab OctEscape2      : "\\" OctalDigit OctalDigit;
  %ab OctEscape3      : "\\" TetraDigit OctalDigit OctalDigit;
  %ab OctEscape       : OctEscape1 | OctEscape2 | OctEscape3;
  
  %ab Escape          : [\\] [rnbft\\'"];
  %ab ULetter         : Letter | UniEsc;
  Identifier          : ULetter ( ULetter Digit )*;
  
  %ab IntSuffix       : "l" | "L";
  %ab DecimalNum      : NonZeroDigit Digit* IntSuffix? ;
  %ab OctalNum        : "0" OctalDigit* IntSuffix? ;
  %ab HexNum          : "0" ("x"|"X") HexDigit HexDigit* IntSuffix? ;
  %ab IntegerLiteral  : DecimalNum | OctalNum | HexNum;
                                                                                         
                                                                                       
  %ab Sign            : "+" | "-";
  %ab FlSuffix        : "f" | "F" | "d" | "D";
  %ab SignedInt       : Sign? Digit+ ;
  %ab Expo            : "e" | "E" ;
  %ab ExponentPart    : Expo SignedInt? ;
  %ab Float1          : Digit+ "." (Digit+)? ExponentPart? FlSuffix?;
  %ab Float2          : "." Digit+ ExponentPart? FlSuffix? ;
  %ab Float3          : Digit+ ExponentPart FlSuffix? ;
  %ab Float4          : Digit+ FlSuffix ;
  %ab FloatingPoint   : Float1 | Float2 | Float3 | Float4 ;
  
  %ab AnyChrChr       : [^\\'] ;
  %ab AnyStrChr       : [^\\"] ;
  %ab Character       : "'" (Escape | OctEscape | AnyChrChr)  "'" ;
  %ab String          : "\"" (Escape | OctEscape | AnyStrChr)* "\"";
  %ab Numeric         : IntegerLiteral | FloatingPoint ;
  
  LITERAL         : Numeric | Character | String ;
  
  IDENTIFIER      : ([a-zA-Z_] | [\u0001]) (([a-zA-Z_] | [\u0001]) | [0-9])*;
  
  OP_DIM          : "[" ([\r\n\t\ ] | ( "/" "\*" ([^\*] | "\*" [^/])* "\*" "/" |
                    "//" (.*)))* "]";
  
  %ab SPACES          : " "+;
  %ab TAB             : "\t";
  %ab EOL             : "\r" "\n"? | "\n" ;
  // JAVADOC           : "/**" ([^*] | [*] [^/])* "*/";
  
  JAVADOC : "/**" Description Property+ "*/";
  
  Description : ([\*\n\r\ \t]+ | DescriptionText)* ;
  DescriptionText : [A-Za-z<>%]+ ([\ \t]+ [A-Za-z<>%]+)* ;
  Property : "@" PropertyIdentifier [\ \t]+ Description ;
  PropertyIdentifier : [A-Za-z]+ ;
  
  %ab MULTILINECOMMENT  : "/*" [^*] ([^*] | "*" [^/])* "*/";
  %ab SINGLELINECOMMENT : "//" (.*);
  
  WS : (SPACES|TAB|EOL|JAVADOC|MULTILINECOMMENT|SINGLELINECOMMENT)*
     ;
  
  %start CompilationUnit;
  
  TypeSpecifier
    : TypeName Dims?
    ;
  
  TypeName
    : PrimitiveType
    | QualifiedName
    ;
  
  ClassNameList
    : QualifiedName (WS "," WS QualifiedName)*
    ;
  
  PrimitiveType
    : "boolean"
    | "char"
    | "byte"
    | "short"
    | "int"
    | "long"
    | "float"
    | "double"
    | "void"
    ;
  
  SemiColons
    : ";"
    | SemiColons ";"
    ;
  
  CompilationUnit
    : ProgramFile
    ;
  
  ProgramFile
    :  WS PackageStatement   (WS ImportStatements)? (WS TypeDeclarations)? WS
    | (WS PackageStatement)?  WS ImportStatements   (WS TypeDeclarations)? WS
    | (WS PackageStatement)? (WS ImportStatements)?  WS TypeDeclarations   WS
    ;
  
  PackageStatement
    : "package" WS QualifiedName WS SemiColons
    ;
  
  TypeDeclarations
    : TypeDeclarationOptSemi+
    ;
  
  TypeDeclarationOptSemi
    : TypeDeclaration SemiColons?
    ;
  
  ImportStatements
    : ImportStatement (WS ImportStatement)*
    ;
  
  ImportStatement
    : "import" WS QualifiedName ("." "*")? WS SemiColons
    ;
  
  QualifiedName
    : IDENTIFIER ("." IDENTIFIER)*
    ;
  
  TypeDeclaration
    : ClassHeader WS "{" (WS FieldDeclarations)? WS "}"
    ;
  
  ClassHeader
    : (Modifiers WS)? ClassWord WS IDENTIFIER (WS Extends)? (WS Interfaces)?
    ;
  
  Modifiers
    : Modifier ( WS Modifier )*
    ;
  
  Modifier
    : "abstract"
    | "final"
    | "public"
    | "protected"
    | "private"
    | "static"
    | "transient"
    | "volatile"
    | "native"
    | "synchronized"
    ;
  
  ClassWord
    : "class"
    | "interface"
    ;
  
  Interfaces
    : "implements" WS ClassNameList
    ;
  
  FieldDeclarations
    : FieldDeclaration ((WS SemiColons)? WS FieldDeclaration)*
    ;
  
  FieldDeclaration
    : FieldVariableDeclaration WS ";"
    | MethodDeclaration
    | ConstructorDeclaration
    | StaticInitializer
    | NonStaticInitializer
    | TypeDeclaration
    ;
  
  FieldVariableDeclaration
    : (Modifiers WS)? TypeSpecifier WS VariableDeclarators
    ;
  
  VariableDeclarators
    : VariableDeclarator (WS "," WS VariableDeclarator)*
    ;
  
  VariableDeclarator
    : DeclaratorName (WS "=" WS VariableInitializer)?
    ;
  
  VariableInitializer
    : Expression
    | "{" (WS ArrayInitializers)? WS "}"
    ;
  
  ArrayInitializers
    : VariableInitializer (WS "," WS VariableInitializer)*
    ;
  
  MethodDeclaration
    : (Modifiers WS)? TypeSpecifier WS MethodDeclarator (WS Throws)? WS MethodBody
    ;
  
  MethodDeclarator
    : DeclaratorName WS "(" (WS ParameterList)? WS ")"
    | MethodDeclarator OP_DIM
    ;
  
  ParameterList
    : Parameter (WS "," WS Parameter)*
    ;
  
  Parameter
    : "final"? TypeSpecifier WS DeclaratorName
    ;
  
  DeclaratorName
    : IDENTIFIER
    | DeclaratorName OP_DIM
    ;
  
  Throws
    : "throws" WS ClassNameList
    ;
  
  MethodBody
    : Block
    | ";"
    ;
  
  ConstructorDeclaration
    : Modifiers? ConstructorDeclarator Throws? Block
    ;
  
  ConstructorDeclarator
    : IDENTIFIER "(" ParameterList? ")"
    ;
  
  StaticInitializer
    : "static" Block
    ;
  
  NonStaticInitializer
    : Block
    ;
  
  Extends
    : "extends" TypeName ("," TypeName)*
    ;
  
  Block
    : "{" (WS LocalVariableDeclarationsAndStatements)? WS "}"
    ;
  
  LocalVariableDeclarationsAndStatements
    : LocalVariableDeclarationOrStatement (WS LocalVariableDeclarationOrStatement)*
    ;
  
  LocalVariableDeclarationOrStatement
    : LocalVariableDeclarationStatement
    | Statement
    ;
  
  LocalVariableDeclarationStatement
    : ("final" WS)? TypeSpecifier WS VariableDeclarators ";"
    ;
  
  Statement
    : EmptyStatement
    | LabelStatement
    | ExpressionStatement ";"
    | SelectionStatement
    | IterationStatement
    | JumpStatement
    | GuardingStatement
    | Block
    ;
  
  EmptyStatement
    : ";"
    ;
  
  LabelStatement
    : IDENTIFIER ":"
    | "case" ConstantExpression ":"
    | "default" ":"
    ;
  
  ExpressionStatement
    : Expression
    ;
  
  SelectionStatement
    : "if" WS "(" WS Expression WS ")" WS Statement 
    | "if" WS "(" WS Expression WS ")" WS Statement WS "else" WS Statement
    | "switch" WS "(" WS Expression WS ")" WS Block
    ;
  
  IterationStatement
    : "while" WS "(" WS Expression WS ")" WS Statement
    | "do" WS Statement WS "while" WS "(" WS Expression WS ")" WS ";"
    | "for" WS "(" WS ForInit WS ForExpr WS ForIncr WS ")" WS Statement
    | "for" WS "(" WS ForInit WS ForExpr            WS ")" WS Statement
    ;
  
  ForInit
    : ExpressionStatements WS ";"
    | LocalVariableDeclarationStatement
    | ";"
    ;
  
  ForExpr
    : Expression WS ";"
    | ";"
    ;
  
  ForIncr
    : ExpressionStatements
    ;
  
  ExpressionStatements
    : ExpressionStatement (WS "," WS ExpressionStatement)* 
    ;
  
  JumpStatement
    : "break"    (WS IDENTIFIER)? WS ";"
    | "continue" (WS IDENTIFIER)? WS ";"
    | "return"   (WS Expression)? WS ";"
    | "throw"     WS Expression   WS ";"
    ;
  
  GuardingStatement
    : "synchronized" WS "(" WS Expression WS ")" WS Statement
    | "try" WS Block             WS Finally
    | "try" WS Block WS Catches (WS Finally)?
    ;
  
  Catches
    : Catch (WS Catch)*
    ;
  
  Catch
    : CatchHeader WS Block
    ;
  
  CatchHeader
    : "catch" WS "(" WS TypeSpecifier (WS IDENTIFIER)? WS ")"
    ;
  
  Finally
    : "finally" WS Block
    ;
  
  PrimaryExpression
    : QualifiedName 
    | NotJustName 
    ;
  
  NotJustName
    : SpecialName 
    | NewAllocationExpression 
    | ComplexPrimary 
    ;
  
  ComplexPrimary
    : "(" WS Expression WS ")"
    | ComplexPrimaryNoParenthesis 
    ;
  
  ComplexPrimaryNoParenthesis
    : LITERAL
    | "true" | "false"
    | ArrayAccess
    | FieldAccess
    | MethodCall
    ;
  
  ArrayAccess
    : QualifiedName  WS "[" WS Expression WS "]"
    | ComplexPrimary WS "[" WS Expression WS "]"
    ;
  
  FieldAccess
    : NotJustName "." IDENTIFIER
    | RealPostfixExpression "." IDENTIFIER
    | QualifiedName "." "this"
    | QualifiedName "." "class"
    | PrimitiveType "." "class"
    ;
  
  MethodCall
    : MethodAccess WS "(" (WS ArgumentList)? WS ")"
    ;
  
  MethodAccess
    : ComplexPrimaryNoParenthesis
    | SpecialName
    | QualifiedName
    ;
  
  SpecialName
    : "this"
    | "super"
    | "null"
    ;
  
  ArgumentList
    : Expression (WS "," WS Expression)*
    ;
  
  NewAllocationExpression
    : (QualifiedName ".")? PlainNewAllocationExpression
    ;
  
  PlainNewAllocationExpression
     : ArrayAllocationExpression (WS "{" (WS ArrayInitializers)? WS "}")?
     | ClassAllocationExpression (WS "{" (WS FieldDeclarations)? WS "}")?
     ;
  
  ClassAllocationExpression
    : "new" WS TypeName WS "(" (WS ArgumentList)? WS ")"
    ;
  
  ArrayAllocationExpression
    : "new" WS TypeName WS DimExprs (WS Dims)?
    | "new" WS TypeName WS Dims
    ;
  
  DimExprs
    : DimExpr+
    ;
  
  DimExpr
    : "[" WS Expression WS "]"
    ;
  
  Dims
    : OP_DIM+
    ;
  
  PostfixExpression
    : PrimaryExpression 
    | RealPostfixExpression 
    ;
  
  RealPostfixExpression
    : PostfixExpression WS ("++"|"--")
    ;
  
  UnaryExpression
    : ("++"|"--") UnaryExpression
    | ("+"|"-")   CastExpression
    | LogicalUnaryExpression 
    ;
  
  LogicalUnaryExpression
    : PostfixExpression 
    | ("~"|"!") UnaryExpression
    ;
  
  CastExpression
    : UnaryExpression 
    | "(" WS PrimitiveTypeExpression WS ")" WS CastExpression
    | "(" WS ClassTypeExpression WS ")" WS CastExpression
    | "(" WS Expression WS ")" WS LogicalUnaryExpression
    ;
  
  PrimitiveTypeExpression
    : PrimitiveType Dims?
    ;
  
  ClassTypeExpression
    : QualifiedName Dims
    ;
  
  MultiplicativeExpression
    : CastExpression (WS ("*"|"/"|"%") WS CastExpression)*
    ;
  
  AdditiveExpression
    : MultiplicativeExpression (WS ("+"|"-") WS MultiplicativeExpression)*
    ;
  
  ShiftExpression 
    : AdditiveExpression (WS ("<<"|">>"|">>>") WS AdditiveExpression)*
    ;
  
  RelationalExpression
    : ShiftExpression (WS ("<"|">"|"<="|">=") WS ShiftExpression)*
    | RelationalExpression WS "instanceof" WS TypeSpecifier
    ;
  
  EqualityExpression
    : RelationalExpression  (WS ("==" | "!=") WS RelationalExpression)*
    ;
  
  AndExpression
    : EqualityExpression (WS "&" WS EqualityExpression)*
    ;
  
  ExclusiveOrExpression
    : AndExpression (WS "^" WS AndExpression)*
    ;
  
  InclusiveOrExpression
    : ExclusiveOrExpression (WS "|" WS ExclusiveOrExpression)*
    ;
  
  ConditionalAndExpression
    : InclusiveOrExpression (WS "&&" WS InclusiveOrExpression)*
    ;
  
  ConditionalOrExpression
    : ConditionalAndExpression (WS "||" WS ConditionalAndExpression)*
    ;
  
  ConditionalExpression
    : ConditionalOrExpression 
    | ConditionalOrExpression "?" Expression ":" ConditionalExpression
    ;
  
  AssignmentExpression
    : ConditionalExpression 
    | UnaryExpression WS AssignmentOperator WS AssignmentExpression
    ;
  
  AssignmentOperator
    : "="
    | "+=" | "-=" | "*=" | "/=" | "&=" | "|=" | "^=" | "%=" | "<<=" | ">>="
| ">>>="
    ;
  
  Expression
    : AssignmentExpression
    ;
  
  ConstantExpression
    : ConditionalExpression
    ;
   
  
  
  

Mime
View raw message