[svn:parrot] r44852 - branches/ops_pct/compilers/opsc/src/Ops/Compiler
bacek at svn.parrot.org
bacek at svn.parrot.org
Wed Mar 10 10:17:47 UTC 2010
Author: bacek
Date: Wed Mar 10 10:17:44 2010
New Revision: 44852
URL: https://trac.parrot.org/parrot/changeset/44852
Log:
Use token/rule instead of 'regex' in Grammar.
Modified:
branches/ops_pct/compilers/opsc/src/Ops/Compiler/Grammar.pm
Modified: branches/ops_pct/compilers/opsc/src/Ops/Compiler/Grammar.pm
==============================================================================
--- branches/ops_pct/compilers/opsc/src/Ops/Compiler/Grammar.pm Wed Mar 10 07:46:37 2010 (r44851)
+++ branches/ops_pct/compilers/opsc/src/Ops/Compiler/Grammar.pm Wed Mar 10 10:17:44 2010 (r44852)
@@ -102,15 +102,15 @@
]
}
-regex macro_param {
+token macro_param {
'$' $<num>=[<digit>+]
}
-regex op_macro {
- <macro_type> <space>*? <macro_destination> <space>*? <macro_arg>
+rule op_macro {
+ <macro_type> <macro_destination> <macro_arg>
}
-regex macro_type {
+token macro_type {
[
| 'goto'
| 'expr'
@@ -118,7 +118,7 @@
]
}
-regex macro_destination {
+token macro_destination {
[
| 'OFFSET'
| 'ADDRESS'
@@ -126,11 +126,10 @@
]
}
-regex macro_arg {
+rule macro_arg {
#XXX; needs to match balanced parens
'('
[
- |
| <macro_param>
| $<macro_word>=[[ <alnum>+ | <punct> | <space>+ ]*? ]
]
More information about the parrot-commits
mailing list