Hey there, sorry about not responding. My mailer hid this message from
me. I was actually about to reply asking what the deal was. ;)
chromatic wrote:
On Tuesday 03 October 2006 13:41, Aaron Sherman wrote:
This contains the Makefile, README, .pg grammar, a -harness.pir that
executes the parser on a sample string and dumps the parse tree and a
-stress.pir that runs 50,000 trial runs to see how fast PGE is (not too
shabby is the answer, as it comes in at about 1/2 the time of a P::RD
version for the simple example, and gets a bigger lead the more complex
the input expression).
I can't get this to work. If I run 'make' in the target directory, I get a
PASM file (with the .pir) extension. Then if I run either of the PIR files,
I get:
$ parrot wptest-harness.pir
error:imcc:syntax error, unexpected LABEL, expecting $end
in file 'wptest.pir' line 3
That's odd. I double-checked the diffs to make sure I didn't send out an
old version. This code works fine on my box, which I just updated to
r14904. For me, line 3 of wptest.pir is "main:". Should that be a syntax
error?
That's the very first line of code output by:
../../../parrot -o wptest.pir ../../../compilers/pge/pgc.pir wptest.pg
so if there's a problem with it, I'm not sure that I could actually fix
it. Any pointers appreciated!
Here's what I get:
$ ../../../parrot wptest-harness.pir
Parsing simple expression: 1+(1+1)
Match results begin:
"VAR1" => PMC 'PGE::Match' => "1+(1+1)" @ 0 {
<expr> => PMC 'PGE::Match' => "+" @ 1 {
<type> => "infix:+"
[0] => PMC 'PGE::Match' => "1" @ 0 {
<number> => PMC 'PGE::Match' => "1" @ 0
<type> => "term:"
}
[1] => PMC 'PGE::Match' => "(1+1)" @ 2 {
<expr> => PMC 'PGE::Match' => "1+1" @ 3 {
<expr> => PMC 'PGE::Match' => "+" @ 4 {
<type> => "infix:+"
[0] => PMC 'PGE::Match' => "1" @ 3 {
<number> => PMC 'PGE::Match' => "1" @ 3
<type> => "term:"
}
[1] => PMC 'PGE::Match' => "1" @ 5 {
<number> => PMC 'PGE::Match' => "1" @ 5
<type> => "term:"
}
}
}
<type> => "term:"
}
}
}
match complete