cparse: Solved. Errors with Linux emulator using GCC.
Run jspy.cpp:
~/j $ gcc jspy.cpp In file included from jspy.cpp:6: In file included from ./statements.h:6: ././cparse/shunting-yard.h:268:37: warning: 'const' qualifier on function type 'cparse::rWordParser_t' (aka 'void (const char *, const char **, cparse::rpnBuilder *)') has no effect [-Wignored-qualifiers] void add(const std::string& word, const rWordParser_t* parser) { ^~~~~~ ././cparse/shunting-yard.h:273:20: warning: 'const' qualifier on function type 'cparse::rWordParser_t' (aka 'void (const char *, const char **, cparse::rpnBuilder *)') has no effect [-Wignored-qualifiers] void add(char c, const rWordParser_t* parser) { ^~~~~~ In file included from jspy.cpp:6: ./statements.h:15:3: error: unknown type name 'packToken'; did you mean 'cparse::packToken'? packToken value; ^~~~~~~~~ cparse::packToken ././cparse/./packToken.h:9:7: note: 'cparse::packToken' declared here class packToken { ^ In file included from jspy.cpp:6: ./statements.h:19:15: error: unknown type name 'packToken'; did you mean 'cparse::packToken'? returnState(packToken value) : type(NORMAL), value(value) {} ^~~~~~~~~ cparse::packToken ././cparse/./packToken.h:9:7: note: 'cparse::packToken' declared here class packToken { ^ In file included from jspy.cpp:6: ./statements.h:20:39: error: unknown type name 'packToken'; did you mean 'cparse::packToken'? returnState(const returnType& type, packToken value, bool value_omitted = true) ^~~~~~~~~ cparse::packToken ././cparse/./packToken.h:9:7: note: 'cparse::packToken' declared here class packToken { ^ In file included from jspy.cpp:6: ./statements.h:17:39: error: use of undeclared identifier 'packToken'; did you mean 'cparse::packToken'? returnState() : type(NORMAL), value(packToken::None()) {} ^~~~~~~~~ cparse::packToken ././cparse/./packToken.h:9:7: note: 'cparse::packToken' declared here class packToken { ^ In file included from jspy.cpp:6: ./statements.h:18:59: error: use of undeclared identifier 'packToken'; did you mean 'cparse::packToken'? returnState(const returnType& type) : type(type), value(packToken::None()) {} ^~~~~~~~~ cparse::packToken ././cparse/./packToken.h:9:7: note: 'cparse::packToken' declared here class packToken { ^ In file included from jspy.cpp:6: ./statements.h:27:25: error: unknown type name 'TokenMap'; did you mean 'cparse::TokenMap'? TokenMap parent_scope) = 0; ^~~~~~~~ cparse::TokenMap ././cparse/./containers.h:66:8: note: 'cparse::TokenMap' declared here struct TokenMap : public Container<MapData_t>, public Iterable { ^ In file included from jspy.cpp:6: ./statements.h:28:29: error: unknown type name 'TokenMap'; did you mean 'cparse::TokenMap'? virtual returnState _exec(TokenMap scope) const = 0; ^~~~~~~~ cparse::TokenMap././cparse/./containers.h:66:8: note: 'cparse::TokenMap' declared here struct TokenMap : public Container<MapData_t>, public Iterable { ^ In file included from jspy.cpp:6: ./statements.h:33:16: error: unknown type name 'TokenMap'; did you mean 'cparse::TokenMap'? TokenMap parent_scope = &TokenMap::empty) { ^~~~~~~~ cparse::TokenMap ././cparse/./containers.h:66:8: note: 'cparse::TokenMap' declared here struct TokenMap : public Container<MapData_t>, public Iterable { ^ In file included from jspy.cpp:6: ./statements.h:37:20: error: unknown type name 'TokenMap'; did you mean 'cparse::TokenMap'? returnState exec(TokenMap scope) const { return _exec(scope); } ^~~~~~~~ cparse::TokenMap ././cparse/./containers.h:66:8: note: 'cparse::TokenMap' declared here struct TokenMap : public Container<MapData_t>, public Iterable { ^ In file included from jspy.cpp:6: ./statements.h:33:41: error: use of undeclared identifier 'TokenMap'; did you mean 'cparse::TokenMap'? TokenMap parent_scope = &TokenMap::empty) { ^~~~~~~~ cparse::TokenMap ././cparse/./containers.h:66:8: note: 'cparse::TokenMap' declared here struct TokenMap : public Container<MapData_t>, public Iterable { ^ In file included from jspy.cpp:6: ./statements.h:50:54: error: unknown type name 'TokenMap'; did you mean 'cparse::TokenMap'? void _compile(const char* code, const char** rest, TokenMap parent_scope); ^~~~~~~~ cparse::TokenMap ././cparse/./containers.h:66:8: note: 'cparse::TokenMap' declared here struct TokenMap : public Container<MapData_t>, public Iterable { ^ In file included from jspy.cpp:6: ./statements.h:51:21: error: unknown type name 'TokenMap'; did you mean 'cparse::TokenMap'? returnState _exec(TokenMap scope) const; ^~~~~~~~ cparse::TokenMap ././cparse/./containers.h:66:8: note: 'cparse::TokenMap' declared here struct TokenMap : public Container<MapData_t>, public Iterable { ^ In file included from jspy.cpp:6: ./statements.h:56:18: error: unknown type name 'TokenMap'; did you mean 'cparse::TokenMap'? TokenMap parent_scope = &TokenMap::empty) { ^~~~~~~~ cparse::TokenMap ././cparse/./containers.h:66:8: note: 'cparse::TokenMap' declared here struct TokenMap : public Container<MapData_t>, public Iterable { ^ In file included from jspy.cpp:6: ./statements.h:60:18: error: unknown type name 'TokenMap'; did you mean 'cparse::TokenMap'? TokenMap parent_scope = &TokenMap::empty) { ^~~~~~~~ cparse::TokenMap ././cparse/./containers.h:66:8: note: 'cparse::TokenMap' declared here struct TokenMap : public Container<MapData_t>, public Iterable { ^ In file included from jspy.cpp:6: ./statements.h:56:43: error: use of undeclared identifier 'TokenMap'; did you mean 'cparse::TokenMap'? TokenMap parent_scope = &TokenMap::empty) { ^~~~~~~~ cparse::TokenMap ././cparse/./containers.h:66:8: note: 'cparse::TokenMap' declared here struct TokenMap : public Container<MapData_t>, public Iterable { ^ In file included from jspy.cpp:6: ./statements.h:60:43: error: use of undeclared identifier 'TokenMap'; did you mean 'cparse::TokenMap'? TokenMap parent_scope = &TokenMap::empty) { ^~~~~~~~ cparse::TokenMap ././cparse/./containers.h:66:8: note: 'cparse::TokenMap' declared here struct TokenMap : public Container<MapData_t>, public Iterable { ^ In file included from jspy.cpp:6: ./statements.h:74:3: error: unknown type name 'calculator'; did you mean 'cparse::calculator'? calculator cond; ^~~~~~~~~~ cparse::calculator ././cparse/shunting-yard.h:401:7: note: 'cparse::calculator' declared here class calculator { ^ In file included from jspy.cpp:6: ./statements.h:79:54: error: unknown type name 'TokenMap'; did you mean 'cparse::TokenMap'? void _compile(const char* code, const char** rest, TokenMap parent_scope); ^~~~~~~~ cparse::TokenMap ././cparse/./containers.h:66:8: note: 'cparse::TokenMap' declared here struct TokenMap : public Container<MapData_t>, public Iterable { ^ In file included from jspy.cpp:6: ./statements.h:80:21: error: unknown type name 'TokenMap'; did you mean 'cparse::TokenMap'? returnState _exec(TokenMap scope) const; ^~~~~~~~ cparse::TokenMap ././cparse/./containers.h:66:8: note: 'cparse::TokenMap' declared here struct TokenMap : public Container<MapData_t>, public Iterable { ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 2 warnings and 20 errors generated.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 22 (13 by maintainers)
Hehe, I am glad to hear it worked.
Feel free to open more tickets if you have any further issues. I just didn’t investigate this one because the error message was mentioning files from another project and I would have no way to know whether the issue described in this error message was related to CParse, and if it was not I would have to do the investigation twice.
Hello @spelsinx, I am not blaming you or anything like that.
It is probably your first time submitting an issue in an open-source project, so there are some guidelines on how to do that, the main thing is that I don’t have a lot of time to investigate these issues since I am not paid for it, so I need as much help from you as possible.
So, the first thing that is important when creating these issues is to include as much information as you can about what steps you went through that resulted in the error you are seeing.
Because when I just compile it on my machine it works.
Things that you can share with me so I can better understand the problem and hopefully reproduce it on my own environment:
make? Can you copy-paste these commands here?I am asking these questions so I can try to reproduce the problem on my own environment and then fix it or at least help you fix it on your own environment.