Thank you kindly, it solved my problem with lex/yacc code and I am already
enjoing a 400 times speed increase - as compared to Parse::Yapp or byacc -
generated code! Next thing to learn is how to return nice hashes back from
the C code :)
Thanks,
Vlad
On Wed, 3 Jan 2001, Brian Ingerson wrote:
> It's a symbol clash with perl. Change yyparse to my_yyparse and it
> works. I wanted to make Inline warn about this situation, but decided to
> defer it to a later release. I documented it instead. Use the following
> command to get a list of symbols to avoid:
>
> nm /usr/bin/perl
>
> You can also use the 'PREFIX="my_"' option to bind the function to
> yyparse in Perl.
>
> Brian
>
> PS Neil Watkiss (Inline::Python) is looking into doing this yacc stuff
> as well. I'm sure he'll get back to you soon with some ideas. He works
> fast :)
>
> >
> > #!/usr/bin/perl
> >
> > use Inline C => 'DATA';
> >
> > print "res: ", parse_it(), "\n";
> >
> > __END__
> >
> > __C__
> >
> > int yyparse() {
> > return 0;
> > }
> >
> > int parse_it() {
> >
> > yyparse();
> > return 0;
> > }
> >
>
> --
> perl -le 'use Inline C=>q{SV*JAxH(char*x){return newSVpvf
> ("Just Another %s Hacker",x);}};print JAxH+Perl'
>