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

Compilation error #10

Open
GoogleCodeExporter opened this issue Jul 23, 2015 · 4 comments
Open

Compilation error #10

GoogleCodeExporter opened this issue Jul 23, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. make in /src/

What is the expected output? What do you see instead?
* Expected correct compilation
* Got:

../src/parser/replacefoly.pl ../src/parser/fol.y bison
flex -o../src/parser/follex.cpp ../src/parser/follex.y 
bison ../src/parser/fol.y;
../src/parser/fol.y:2485.3-15: warning: extra characters in character literal 
[-Wother]
   'x^2 + x + 3'
   ^^^^^^^^^^^^^
mv -f fol.tab.c  ../src/parser/fol.cpp
../src/parser/replacefolcpp.pl ../src/parser/fol.cpp
g++ -g -w -Wno-deprecated -Wall -I. -I../src/util -I../src/logic 
-I../src/parser -I../src/learnwts -I../src/learnstruct -I../src/infer 
-I../src/liftedinfer/bridge/includes -I../src/liftedinfer/common/includes 
-I../src/liftedinfer/liftedblockedgibbs/includes 
-I../src/liftedinfer/liftedimportancesampling/includes 
-I../src/liftedinfer/liftedweightedmodelcounting/includes 
-I../src/liftedinfer/tests -o ../bin/obj/fol.o -c ../src/parser/fol.cpp
In file included from ../src/parser/fol.y:106:0:
../src/parser/follex.y: In function ‘int yylex()’:
../src/parser/follex.y:165:10: error: ‘ZZ_INCLUDE’ was not declared in this 
scope
   return ZZ_INCLUDE;
          ^
In file included from ../src/parser/fol.y:106:0:
../src/parser/follex.y:201:10: error: ‘ZZ_IMPLY’ was not declared in this 
scope
   return ZZ_IMPLY;
          ^
In file included from ../src/parser/fol.y:106:0:
../src/parser/follex.y:210:10: error: ‘ZZ_EQUIV’ was not declared in this 
scope
   return ZZ_EQUIV;
          ^
In file included from ../src/parser/fol.y:106:0:
../src/parser/follex.y:219:10: error: ‘ZZ_EXIST’ was not declared in this 
scope
   return ZZ_EXIST;
          ^
In file included from ../src/parser/fol.y:106:0:
../src/parser/follex.y:228:10: error: ‘ZZ_FORALL’ was not declared in this 
scope
   return ZZ_FORALL;
          ^
In file included from ../src/parser/fol.y:106:0:
../src/parser/follex.y:272:10: error: ‘ZZ_NUM’ was not declared in this 
scope
   return ZZ_NUM;  
          ^
In file included from ../src/parser/fol.y:106:0:
../src/parser/follex.y:281:10: error: ‘ZZ_NUM’ was not declared in this 
scope
   return ZZ_NUM;
          ^
In file included from ../src/parser/fol.y:106:0:
../src/parser/follex.y:290:10: error: ‘ZZ_NUM’ was not declared in this 
scope
   return ZZ_NUM;
          ^
In file included from ../src/parser/fol.y:106:0:
../src/parser/follex.y:299:44: error: ‘ZZ_CONSTANT’ was not declared in 
this scope
   if (zzdomain->isConstant(yytext)) return ZZ_CONSTANT;
                                            ^
../src/parser/follex.y:300:10: error: ‘ZZ_STRING’ was not declared in this 
scope
   return ZZ_STRING;
          ^
In file included from ../src/parser/fol.y:106:0:
../src/parser/follex.y:312:12: error: ‘ZZ_TYPE’ was not declared in this 
scope
     return ZZ_TYPE;
            ^
../src/parser/follex.y:317:12: error: ‘ZZ_PREDICATE’ was not declared in 
this scope
     return ZZ_PREDICATE; 
            ^
../src/parser/follex.y:322:12: error: ‘ZZ_FUNCTION’ was not declared in 
this scope
     return ZZ_FUNCTION;
            ^
../src/parser/follex.y:327:12: error: ‘ZZ_CONSTANT’ was not declared in 
this scope
     return ZZ_CONSTANT;
            ^
../src/parser/follex.y:330:10: error: ‘ZZ_VARIABLE’ was not declared in 
this scope
   return ZZ_VARIABLE;
          ^
In file included from ../src/parser/fol.y:106:0:
../src/parser/follex.y:415:10: error: ‘ZZ_DOTDOTDOT’ was not declared in 
this scope
   return ZZ_DOTDOTDOT;
          ^
make: *** [../bin/obj/fol.o] Error 1

What version of the product are you using? On what operating system?
Latest version, Ubuntu 14.04

Please provide any additional information below.


Original issue reported on code.google.com by Rein...@gmail.com on 15 Aug 2014 at 8:28

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

OK seems to be incompatibility issue with bison 3+, downgrading to 2.7 fixes it

Original comment by Rein...@gmail.com on 14 Sep 2014 at 7:48

@GoogleCodeExporter
Copy link
Author

I had the same error on Windows. 
I disabled the perl regeneration of follex.cpp in the makefile.
Then I replaced all ZZ_* with their integer values in the follex.cpp and then 
it compiled successfully on Windows and Cygwin.

Original comment by Tonch...@gmail.com on 21 Jan 2015 at 11:02

Attachments:

@GoogleCodeExporter
Copy link
Author

I had the same error on Windows.
Modify the fol.y add then it compiled successfully on Windows and Cygwin.

sample:

%{
#define YYSTYPE int
#define YYDEBUG 1
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
  enum yytokentype
  {
    ZZ_NUM = 258,
    ZZ_DOTDOTDOT = 259,
    ZZ_STRING = 260,
    ZZ_INCLUDE = 261,
    ZZ_PREDICATE = 262,
    ZZ_FUNCTION = 263,
    ZZ_CONSTANT = 264,
    ZZ_VARIABLE = 265,
    ZZ_TYPE = 266,
    ZZ_FORALL = 267,
    ZZ_EXIST = 268,
    ZZ_EQUIV = 269,
    ZZ_IMPLY = 270
  };
#endif
%}

Original comment by suiyaola...@gmail.com on 16 Mar 2015 at 1:04

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

No branches or pull requests

1 participant