Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile error: redefinition of enumerator #1

Open
BaseMax opened this issue Aug 3, 2020 · 0 comments
Open

Makefile error: redefinition of enumerator #1

BaseMax opened this issue Aug 3, 2020 · 0 comments

Comments

@BaseMax
Copy link

BaseMax commented Aug 3, 2020

Hi,

[max@base compiler]$ make
bison -d parser.y
parser.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
flex lexer.l
clang -Wall -g   -c -o lex.yy.o lex.yy.c
In file included from lexer.l:2:
parser.y:15:5: warning: declaration does not declare anything [-Wmissing-declarations]
    struct AST;
    ^
parser.y:16:5: warning: declaration does not declare anything [-Wmissing-declarations]
    struct list;
    ^
2 warnings generated.
clang -Wall -g   -c -o parser.tab.o parser.tab.c
parser.tab.c:131:5: error: redefinition of enumerator 'RETURN'
    RETURN = 262,                  /* RETURN  */
    ^
./ast.h:12:19: note: previous definition is here
    ARRAY_ACCESS, RETURN,
                  ^
parser.tab.c:132:5: error: redefinition of enumerator 'WHILE'
    WHILE = 263,                   /* WHILE  */
    ^
./ast.h:13:5: note: previous definition is here
    WHILE, IF_THEN,
    ^
parser.y:15:5: warning: declaration does not declare anything [-Wmissing-declarations]
    struct AST;
    ^
parser.y:16:5: warning: declaration does not declare anything [-Wmissing-declarations]
    struct list;
    ^
2 warnings and 2 errors generated.
make: *** [<builtin>: parser.tab.o] Error 1

Regards,
Max

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant