You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@labs.apache.org by el...@apache.org on 2006/12/04 19:10:41 UTC

svn commit: r482271 - /labs/dungeon/MetaGrammar.txt

Author: elecharny
Date: Mon Dec  4 10:10:40 2006
New Revision: 482271

URL: http://svn.apache.org/viewvc?view=rev&rev=482271
Log:
Added the Meta grammar, which is the grammar for the BNF grammar

Added:
    labs/dungeon/MetaGrammar.txt

Added: labs/dungeon/MetaGrammar.txt
URL: http://svn.apache.org/viewvc/labs/dungeon/MetaGrammar.txt?view=auto&rev=482271
==============================================================================
--- labs/dungeon/MetaGrammar.txt (added)
+++ labs/dungeon/MetaGrammar.txt Mon Dec  4 10:10:40 2006
@@ -0,0 +1,27 @@
+<grammar>     ::= SPS <production> <productions> ;
+<productions> ::= SPS <production> <productions> | # ;
+<production>  ::= <prod>  | <regexp> ;
+<prod>        ::= <vn> SPS AFFECT SPS <rhs> SPS SEMI ;
+<regexp>      ::= IDENT SPS ASSIGN SPS QUOTE LEX QUOTE SPS SEMI ;
+<rhs>         ::= <vt> SPS <rule> SPS <rhs-e> | <vn> SPS <rule> SPS <rhs-e> | <epsilon> ;
+<rhs-e>       ::= BAR SPS <rhs> | # ;
+<rule>        ::= <vt> SPS <rule> | <vn> SPS <rule> | # ;
+<vn>          ::= LESSER IDENT GREATER <code-e> ;
+<vt>          ::= QUOTE LEX QUOTE <code-e> | IDENT <code-e> ;
+<epsilon>     ::= EPSILON <code-e> ;
+<code-e>      ::= SPS ACTION SPS <code-num> SPS ACTION SPS | # ;
+<code-num>    ::= CODE | NUM ;
+
+AFFECT     ::= '::=';
+SPS        ::= '(\n|\s)*';
+LESSER     ::= '<';
+GREATER    ::= '>';
+IDENT      ::= '[a-zA-Z]([a-z-A-Z0-9_-])*';
+SEMI       ::= ';';
+QUOTE      ::= '\'';
+LEX        ::= '([^']|'')+';
+EPSILON    ::= '#';
+BAR        ::= '|';
+ACTION     ::= '@@'
+CODE       ::= '(.*@@)';
+NUM        ::= '[1-9]([0-9]*)';



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org