note
e_bachmann
Thank you for alle the surgestions!
<p>
print@_{sort keys %_},$/if%_=split//,'= & *a?b:e\f/h^h!j+n,o@o;r$s-t%t#u'
<br>
This REALLY says all about my relations to parsers! :-(
<p>
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:
<code>
yapp -v myParser.yp
</code>
with one message:
<code>
1 shift/reduce conflict
</code>
Then I've written a test:
<code>
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];
</code>
All this gives is a:
<code>
Syntax error.
Can't locate object method "new" via package "MyParser" (perhaps you forgot to l
oad "MyParser"?) at myparser.pl line 2, <STDIN> line 1.
</code>
<ul>
<li>How do I really activate this parser?</li>
<li>How do I add my functions to process the searching? </li>
</ul>
<small>
<a href="http://www.e-bachmann.dk/humor/murphy.htm">
"If there are two or more ways to do something and one of them can lead to a disaster, then one or more persons will do it"</a> <br>
Edgar A. Murphy, Captain in U.S. Air Force (1949)
</small>
205979
205997