mdhender / cook

Peter Miller's cook
GNU General Public License v3.0
7 stars 4 forks source link

YACC grammar throws warnings #19

Open mdhender opened 2 years ago

mdhender commented 2 years ago

Actually, a lot of warnings

bison -y -d common/sub/expr_gram.y
common/sub/expr_gram.y:52.19-24: warning: POSIX yacc reserves %type to nonterminals [-Wyacc]
   52 | %type <lv_number> NUMBER expr
      |                   ^~~~~~
sed -e 's/[yY][yY]/sub_expr_gram_/g' y.tab.c > \
        common/sub/expr_gram.yacc.c
sed -e 's/[yY][yY]/sub_expr_gram_/g' y.tab.h > \
        common/sub/expr_gram.yacc.h
rm y.tab.c y.tab.h
gcc -D _DEFAULT_SOURCE -g -O2 -I. -c common/sub/expr_gram.yacc.c
bison -y -d cook/builtin/expr_parse.y
cook/builtin/expr_parse.y:51.25-30: warning: POSIX yacc reserves %type to nonterminals [-Wyacc]
   51 | %type   <lv_integer>    NUMBER
      |                         ^~~~~~
sed -e 's/[yY][yY]/builtin_expr_parse_/g' y.tab.c > \
        cook/builtin/expr_parse.yacc.c
sed -e 's/[yY][yY]/builtin_expr_parse_/g' y.tab.h > \
        cook/builtin/expr_parse.yacc.h
rm y.tab.c y.tab.h
gcc -D _DEFAULT_SOURCE -g -O2 -I. -c cook/builtin/expr_lex.c
bison -y -d cook/hashline.y
cook/hashline.y:867.21-33: warning: POSIX yacc reserves %type to nonterminals [-Wyacc]
  867 | %type <lv_word>     HASHLINE_WORD
      |                     ^~~~~~~~~~~~~
sed -e 's/[yY][yY]/hashline_/g' y.tab.c > cook/hashline.yacc.c
sed -e 's/[yY][yY]/hashline_/g' y.tab.h > cook/hashline.yacc.h
rm y.tab.c y.tab.h
gcc -D _DEFAULT_SOURCE -g -O2 -I. -c cook/hashline.yacc.c
bison -y -d cook/parse.y
cook/parse.y:139.21-25: warning: POSIX yacc reserves %type to nonterminals [-Wyacc]
  139 | %type <lv_position> COLON
      |                     ^~~~~
cook/parse.y:149.21-29: warning: POSIX yacc reserves %type to nonterminals [-Wyacc]
  149 | %type <lv_position> SEMICOLON
      |                     ^~~~~~~~~
cook/parse.y:155.21-24: warning: POSIX yacc reserves %type to nonterminals [-Wyacc]
  155 | %type <lv_word>     WORD
      |                     ^~~~
sed -e 's/[yY][yY]/parse_/g' y.tab.c > cook/parse.yacc.c
sed -e 's/[yY][yY]/parse_/g' y.tab.h > cook/parse.yacc.h
rm y.tab.c y.tab.h
gcc -D _DEFAULT_SOURCE -g -O2 -I. -c cook/lex.c
bison -y -d cook/fingerprint/gram.y
cook/fingerprint/gram.y:60.24-29: warning: POSIX yacc reserves %type to nonterminals [-Wyacc]
   60 | %type <lv_string>      STRING
      |                        ^~~~~~
cook/fingerprint/gram.y:61.24-29: warning: POSIX yacc reserves %type to nonterminals [-Wyacc]
   61 | %type <lv_number>      NUMBER
      |                        ^~~~~~
sed -e 's/[yY][yY]/fingerprint_gram_/g' y.tab.c > \
        cook/fingerprint/gram.yacc.c
sed -e 's/[yY][yY]/fingerprint_gram_/g' y.tab.h > \
        cook/fingerprint/gram.yacc.h
rm y.tab.c y.tab.h
gcc -D _DEFAULT_SOURCE -g -O2 -I. -c cook/fingerprint/gram.yacc.c
CONFIG_FILES=script/cook_rsh:script/cook_rsh.in CONFIG_HEADERS= /bin/sh \
        ./config.status
config.status: creating script/cook_rsh
config.status: WARNING:  'script/cook_rsh.in' seems to ignore the --datarootdir setting
bison -y -d make2cook/gram.y
make2cook/gram.y:107.17-23: warning: POSIX yacc reserves %type to nonterminals [-Wyacc]
  107 | %type <lv_line> COMMAND COMMENT IF WORD define_head define_word
      |                 ^~~~~~~
make2cook/gram.y:107.25-31: warning: POSIX yacc reserves %type to nonterminals [-Wyacc]
  107 | %type <lv_line> COMMAND COMMENT IF WORD define_head define_word
      |                         ^~~~~~~
make2cook/gram.y:107.33-34: warning: POSIX yacc reserves %type to nonterminals [-Wyacc]
  107 | %type <lv_line> COMMAND COMMENT IF WORD define_head define_word
      |                                 ^~
make2cook/gram.y:107.36-39: warning: POSIX yacc reserves %type to nonterminals [-Wyacc]
  107 | %type <lv_line> COMMAND COMMENT IF WORD define_head define_word
      |                                    ^~~~
make2cook/gram.y:108.17-31: warning: POSIX yacc reserves %type to nonterminals [-Wyacc]
  108 | %type <lv_line> COMMAND_COMMENT
      |                 ^~~~~~~~~~~~~~~
make2cook/gram.y: warning: 2 shift/reduce conflicts [-Wconflicts-sr]
bison -y -d make2cook/vargram.y
make2cook/vargram.y:187.19-23: warning: POSIX yacc reserves %type to nonterminals [-Wyacc]
  187 | %type <lv_string> PLAIN
      |                   ^~~~~
make2cook/vargram.y: warning: 2 shift/reduce conflicts [-Wconflicts-sr]
make2cook/vargram.y: warning: 10 reduce/reduce conflicts [-Wconflicts-rr]
make2cook/vargram.y:369.7-370.20: warning: rule useless in parser due to conflicts [-Wother]
  369 |     : PLAIN
      |       ^~~~~
sed -e 's/[yY][yY]/vargram_/g' y.tab.c > make2cook/vargram.yacc.c
sed -e 's/[yY][yY]/vargram_/g' y.tab.h > make2cook/vargram.yacc.h
rm y.tab.c y.tab.h
gcc -D _DEFAULT_SOURCE -g -O2 -I. -c make2cook/vargram.yacc.c
hoxnox commented 2 years ago

Did you succeded to build with these warnings? I'm actually not...