[svn:parrot] r39382 - branches/pmc_pct/compilers/pmcc/src/parser
bacek at svn.parrot.org
bacek at svn.parrot.org
Thu Jun 4 12:57:27 UTC 2009
Author: bacek
Date: Thu Jun 4 12:57:27 2009
New Revision: 39382
URL: https://trac.parrot.org/parrot/changeset/39382
Log:
Simplify c_type parsing to be just list of identifiers
Modified:
branches/pmc_pct/compilers/pmcc/src/parser/actions.pm
branches/pmc_pct/compilers/pmcc/src/parser/grammar.pg
Modified: branches/pmc_pct/compilers/pmcc/src/parser/actions.pm
==============================================================================
--- branches/pmc_pct/compilers/pmcc/src/parser/actions.pm Thu Jun 4 12:56:32 2009 (r39381)
+++ branches/pmc_pct/compilers/pmcc/src/parser/actions.pm Thu Jun 4 12:57:27 2009 (r39382)
@@ -162,7 +162,7 @@
method c_argument($/) {
#say("c_argument");
my $past := PAST::Var.new(
- :name(~$<identifier>[0]),
+ :name(~$<identifier>),
:returns(~$<c_type>)
);
make $past;
Modified: branches/pmc_pct/compilers/pmcc/src/parser/grammar.pg
==============================================================================
--- branches/pmc_pct/compilers/pmcc/src/parser/grammar.pg Thu Jun 4 12:56:32 2009 (r39381)
+++ branches/pmc_pct/compilers/pmcc/src/parser/grammar.pg Thu Jun 4 12:57:27 2009 (r39382)
@@ -171,11 +171,7 @@
# Very-very simplified C type. E.g. "void", "PMC *", etc
rule c_type {
- [
- | 'struct' <identifier>
- | 'unsigned' <identifier>
- | <identifier>
- ]
+ <identifier>+
'*'*
{*}
}
More information about the parrot-commits
mailing list