Author: bernhard
Date: Wed Oct 26 13:00:39 2005
New Revision: 9578

Modified:
   trunk/languages/m4/src/input.pir
   trunk/languages/m4/t/regex/004_pge.t
Log:
Minor adaptions to recent PGE changes.
Proper escaping of the 'comment rule'.
Most m4 tests are passing again.


Modified: trunk/languages/m4/src/input.pir
==============================================================================
--- trunk/languages/m4/src/input.pir    (original)
+++ trunk/languages/m4/src/input.pir    Wed Oct 26 13:00:39 2005
@@ -78,7 +78,7 @@ TOOO: recognize nested quoted strings
   rulesub_in_state['string'] = rulesub
   rulesub = p6rule( "^(<-[`#_a..zA..Z]>)" )
   rulesub_in_state['simple'] = rulesub
-  rulesub = p6rule( "^(\#\N*\n)" )
+  rulesub = p6rule( '^(\#\N*\n)' )
   rulesub_in_state['comment'] = rulesub
 
 .end
@@ -204,7 +204,7 @@ Uses regular expressions for finding tok
   ( captures ) = match."get_array"()
   token_from = match.'from'()
   token_to = match.'to'()
-  token_data = captures[0;0]   
+  token_data = captures[0]   
   #token_data = substr input_string, token_from, token_to, ''      # TODO 
nibble at input without replacing input_string
   substr input_string, token_from, token_to, ''      # TODO nibble at input 
without replacing input_string
 

Modified: trunk/languages/m4/t/regex/004_pge.t
==============================================================================
--- trunk/languages/m4/t/regex/004_pge.t        (original)
+++ trunk/languages/m4/t/regex/004_pge.t        Wed Oct 26 13:00:39 2005
@@ -13,15 +13,16 @@ pir_output_is( << 'END_PIR', << 'END_OUT
 
 .sub 'test' :main
     load_bytecode "PGE.pbc"
+    load_bytecode "PGE/Dumper.pbc"
 
-    .local pmc p6rule
-    p6rule = find_global "PGE", "p6rule"            # get the compiler
+    .local pmc p6rule_compile
+    p6rule_compile = find_global "PGE", "p6rule"            # get the compiler
 
     .local string pattern       
     pattern = "^(<[_a..zA..Z]><[_a..zA..Z0..9]>*)"  # capture the complete id
 
     .local pmc word_rulesub                     
-    word_rulesub = p6rule(pattern)                  # compile the pattern to a 
rulesub
+    word_rulesub = p6rule_compile(pattern)                  # compile the 
pattern to a rulesub
 
     .local string target
     target = "Hello World"                          # target string
@@ -43,10 +44,10 @@ match_success:
     .local pmc captures
     ( captures ) = match."get_array"()
 
-    .local pmc captures_0_0
-    captures_0_0 = captures[0;0]                    # TODO will the blow up 
when the match failed?
+    .local pmc captures_0
+    captures_0 = captures[0]                    # TODO will the blow up when 
the match failed?
     print "The first capture is: "
-    print captures_0_0 
+    print captures_0 
     print "\n"
 
     goto end_main

Reply via email to