Author: chromatic
Date: Fri Mar 28 11:39:50 2008
New Revision: 26596

Modified:
   trunk/languages/pheme/config/makefiles/root.in
   trunk/languages/pheme/lib/pheme.g

Log:
[Pheme] Converted grammar from pgc to Perl6Grammar.

Modified: trunk/languages/pheme/config/makefiles/root.in
==============================================================================
--- trunk/languages/pheme/config/makefiles/root.in      (original)
+++ trunk/languages/pheme/config/makefiles/root.in      Fri Mar 28 11:39:50 2008
@@ -4,6 +4,7 @@
 PERL     = @perl@
 RM_F     = @rm_f@
 PARROT   = ../../[EMAIL PROTECTED]@
+TOOL_DIR = ../..
 PGE_DIR  = ../../compilers/pge
 TGE_DIR  = ../../compilers/tge
 CP       = @cp@
@@ -12,7 +13,8 @@
 all: pheme.pbc
 
 lib/pheme_grammar_gen.pir: lib/pheme.g
-       $(PARROT) $(PGE_DIR)/pgc.pir --output=lib/pheme_grammar_gen.pir 
lib/pheme.g
+       $(PARROT) $(TOOL_DIR)/runtime/parrot/library/PGE/Perl6Grammar.pbc \
+        --output=lib/pheme_grammar_gen.pir lib/pheme.g
 
 lib/ASTGrammar.pir: lib/pge2past.tg
        $(PARROT) $(TGE_DIR)/tgc.pir --output=lib/ASTGrammar.pir lib/pge2past.tg

Modified: trunk/languages/pheme/lib/pheme.g
==============================================================================
--- trunk/languages/pheme/lib/pheme.g   (original)
+++ trunk/languages/pheme/lib/pheme.g   Fri Mar 28 11:39:50 2008
@@ -2,7 +2,7 @@
 
 rule TOP { <list>+ }
 
-rule list { \( [ <special_form> | <application> | <cons> ] \) }
+rule list { '(' [ <special_form> | <application> | <cons> ] ')' }
 
 rule special_form { <special> <list_item>+ }
 
@@ -13,16 +13,16 @@
 # quoted_string has to come first
 rule list_item { <quoted_string> | <atom> | <list> | <empty_list> }
 
-token empty_list { <quote>? \(\) }
+token empty_list { <quote>? '()' }
 
 token atom { [ <symbol_tag> | <quote> ]? <-[\ \n\r\(\)]>+ }
 
 token quoted_string { <PGE::Text::bracketed: "> }
 
-token quote { ' }
+token quote { \' }
 
-token symbol_tag { \# }
+token symbol_tag { '#' }
 
-token ws { [ [ ; \N+ ]? \s+ ]* }
+token ws { [ [ ';' \N+ ]? \s+ ]* }
 
-token special { (if | cond | define | lambda | quote) }
+token special { ('if' | 'cond' | 'define' | 'lambda' | 'quote') }

Reply via email to