http://www.perlmonks.org?node_id=1010400


in reply to Re^3: How does perl's lexer and parser cooperate?
in thread How does perl's lexer and parser cooperate?

Got it, thanks again!

But I've got another doubt, what's the difference between ival&i_tkval, pval&p_tkval in YYSTYPE?

update

I've just checked other symbols like GRAMBLOCK,

it should be parsed by Perl_parse_block in toke.c, which is called as parse_block ,

but the strange thing is : they're never ever called from anywhere.

so when will yyparse got token GRAMBLOCK from yylex ?

Replies are listed 'Best First'.
Re^5: How does perl's lexer and parser cooperate?
by dave_the_m (Monsignor) on Dec 27, 2012 at 19:10 UTC
    what's the difference between ival&i_tkval, pval&p_tkval
    Not a lot. It's basically a hack to make perly.y function both normally and under -Dmad.
    they're never ever called from anywhere
    GRAMBLOCK etc are part of recently added parsing API. They're not called by normal perl parsing, only if someone directly calls one of the API functions such as parse_block().

    Dave.