yacc problem
yacc -d policy_parse.y
policy_parse.y:344.4: parse error, unexpected "|"
make[1]: *** [y.tab.c] Error 1
I have suddenly started getting the above error on building selinux-small after upgrading to the latest bison.
I upgraded from bison 1.35 to 1.50 ("yacc" == "bison -y" on my system).
I have attached the policy_parse.y file I am using to avoid confusion about which patches I have installed.
Signature · 4 lines
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark http://www.coker.com.au/postal/ Postal SMTP/POP benchmark http://www.coker.com.au/~russell/ My home page
Quoted 11 lines · Russell Coker
yacc -d policy_parse.y
policy_parse.y:344.4: parse error, unexpected "|"
make[1]: *** [y.tab.c] Error 1I have suddenly started getting the above error on building selinux-small after upgrading to the latest bison.
I upgraded from bison 1.35 to 1.50 ("yacc" == "bison -y" on my system).
I have attached the policy_parse.y file I am using to avoid confusion about which patches I have installed.
Yes, there is a spurious semicolon in the yacc file. The attached patch (also committed to sf CVS) removes it. Thanks.
--
Stephen D. Smalley, NAI Labs
[email protected]
Index: selinux/module/checkpolicy/policy_parse.y
===================================================================
RCS file: /cvsroot/selinux/nsa/selinux/module/checkpolicy/policy_parse.y,v retrieving revision 1.5
module/checkpolicy/policy_parse.y +0 -1
@@ -341,7 +341,6 @@ | T2 op { if (insert_separator(1)) return -1; } names_push { $$ = (int) define_cexpr(CEXPR_NAMES, CEXPR_TYPE | CEXPR_TARGET, $2); if ($$ == 0) return -1; } - ; | SAMEUSER { $$ = (int) define_cexpr(CEXPR_ATTR, CEXPR_USER, CEXPR_EQ); if ($$ == 0) return -1; }