in reply to Re:x2 Parsing CCL (Common Command Language) commands
in thread Parsing CCL (Common Command Language) commands
Thank you for alle the surgestions!
Edgar A. Murphy, Captain in U.S. Air Force (1949)
print@_{sort keys %_},$/if%_=split//,'= & *a?b:e\f/h^h!j+n,o@o;r$s-t%t#u'
This REALLY says all about my relations to parsers! :-(
I've gone for the YAPP and taken the Calp.yp example and replaced the grammer with the CCL grammer (leaving out the "Set" statement for now). Compiled it using:
with one message:yapp -v myParser.yp
Then I've written a test:1 shift/reduce conflict
All this gives is a:use MyParser; $parser=new MyParser(); $value=$parser->YYParse(yylex => \&lexer_sub, yyerror => \&error_sub +); $nberr=$parser->YYNberr(); $parser->YYData->{DATA}= [ 'a and ( b or c)' ]; $data=$parser->YYData->{DATA}[0];
Syntax error. Can't locate object method "new" via package "MyParser" (perhaps you f +orgot to l oad "MyParser"?) at myparser.pl line 2, <STDIN> line 1.
- How do I really activate this parser?
- How do I add my functions to process the searching?
Edgar A. Murphy, Captain in U.S. Air Force (1949)
|
---|
In Section
Seekers of Perl Wisdom