[svn:parrot] r38326 - branches/pmc_pct/compilers/pmc/src/parser
bacek at svn.parrot.org
bacek at svn.parrot.org
Fri Apr 24 15:28:27 UTC 2009
Author: bacek
Date: Fri Apr 24 15:28:26 2009
New Revision: 38326
URL: https://trac.parrot.org/parrot/changeset/38326
Log:
Add little bit brains to parser as cotto++ suggested.
Modified:
branches/pmc_pct/compilers/pmc/src/parser/grammar.pg
Modified: branches/pmc_pct/compilers/pmc/src/parser/grammar.pg
==============================================================================
--- branches/pmc_pct/compilers/pmc/src/parser/grammar.pg Fri Apr 24 15:27:40 2009 (r38325)
+++ branches/pmc_pct/compilers/pmc/src/parser/grammar.pg Fri Apr 24 15:28:26 2009 (r38326)
@@ -61,6 +61,7 @@
rule body {
[ <class_init> | <vtable> | <method> | <multi> ]*
{*}
+ || <.panic: "Unexpected PMC content">
}
# PMC can have class_init function.
@@ -70,13 +71,14 @@
}
rule vtable {
- 'VTABLE' <c_signature> <c_body>
+ 'VTABLE' || <c_signature> <c_body>
{*}
}
rule method {
- 'METHOD' <identifier> '(' <parrot_c_arguments> ')' <c_body>
+ 'METHOD' || <identifier> '(' <parrot_c_arguments> ')' <c_body>
{*}
+ || <.panic: "Malformed METHOD definition">
}
rule multi {
More information about the parrot-commits
mailing list