What does %prec '.' mean here in yacc?

10,701

It declares that the construct has the same precedence as the '.' operator, which have been specified earlier.

Share:
10,701
assem
Author by

assem

Updated on August 23, 2022

Comments

  • assem
    assem over 1 year
    notype_declarator:
          notype_declarator '(' parmlist_or_identifiers  %prec '.'
            { $$ = build_nt (CALL_EXPR, $1, $3, NULL_TREE); }
    

    Anyone familiar with yacc rules?

  • assem
    assem about 13 years
    Which symbol do you refer to by that construct?
  • geekosaur
    geekosaur about 13 years
    The whole expression before the %prec, actually. It's telling yacc how to disambiguate that branch of the parse tree relative to other similar branches.