What does %prec '.' mean here in yacc?
Asked Answered
C

2

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

Anyone familiar with yacc rules?

Crag answered 16/3, 2011 at 19:15 Comment(0)
B
10

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

Byelostok answered 16/3, 2011 at 19:16 Comment(2)
Which symbol do you refer to by that construct?Crag
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.Byelostok
D
0

yacc program for showing error for 1) redeclaration of variable 2) Assignment expression error 3) operator missing

Dav answered 27/10, 2015 at 6:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.