Giter Club home page Giter Club logo

flexbison's People

Contributors

mbbill avatar shawnyangcis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flexbison's Issues

Ambiguous grammar in fb3-2.y?

Sorry, if this is a dumb question. But the stmt part in fb3-2.y seems like ambiguous, but why does bison accept it?

stmt: IF exp THEN list           { $$ = newflow('I', $2, $4, NULL); }
   | IF exp THEN list ELSE list  { $$ = newflow('I', $2, $4, $6); }
   | WHILE exp DO list           { $$ = newflow('W', $2, $4, NULL); }
   | exp
;

Fails to build on Debian testing

$ make -f Makefile.ch9
flex -opurewc.lex.c purewc.l
cc -g -c -o purewc.lex.o purewc.lex.c
purewc.l:32:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
int argc;
^~~~
cc -g -o purewc purewc.lex.c
purewc.l:32:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
int argc;
^~~~
flex -opurecalc.lex.c purecalc.l
bison -vd purecalc.y
cc -g -c -o purecalc.lex.o purecalc.lex.c
In file included from purecalc.l:14:0:
purecalc.tab.h:86:21: warning: ‘struct pcdata’ declared inside parameter list will not be visible outside of this definition or declaration
int yyparse (struct pcdata *pp);
^~~~~~
cc -g -c -o purecalc.tab.o purecalc.tab.c
purecalc.tab.c:143:21: warning: ‘struct pcdata’ declared inside parameter list will not be visible outside of this definition or declaration
int yyparse (struct pcdata *pp);
^~~~~~
purecalc.tab.c:1024:1: error: conflicting types for ‘yyparse’
yyparse (struct pcdata *pp)
^~~~~~~
purecalc.tab.c:143:5: note: previous declaration of ‘yyparse’ was here
int yyparse (struct pcdata *pp);
^~~~~~~
purecalc.tab.c: In function ‘yyparse’:
purecalc.tab.c:1193:16: error: too few arguments to function ‘yylex’
yychar = yylex (&yylval);
^~~~~
In file included from purecalc.y:26:0:
purecalc.lex.h:321:12: note: declared here
extern int yylex
^~~~~
: recipe for target 'purecalc.tab.o' failed
make: *** [purecalc.tab.o] Error 1
$ cc --version
cc (Debian 6.2.1-5) 6.2.1 20161124
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ flex --version
flex 2.6.1
$ bison --version
bison (GNU Bison) 3.0.4
Written by Robert Corbett and Richard Stallman.

Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.