help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

yyscan_t was not declared in this scope


From: Jack Bates
Subject: yyscan_t was not declared in this scope
Date: Tue, 28 Feb 2017 13:54:41 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0

Hi, I'd like to include the header file that Bison generates in another C file, where I implement my actions -- so as to use the token type macros. Meanwhile I've used Flex to implement a reentrant scanner, so the first argument to yyparse() is a yyscan_t:

  %parse-param { yyscan_t scanner }

However, in addition to the token type macros, the header file contains the yyparse declaration:

  int yyparse(yyscan_t scanner);

So when I try to compile it, I get the following error:

TsConfigGrammar.h:125:20: error: ‘yyscan_t’ was not declared in this scope

I can think of a couple ways around this -- what's the recommended solution?

Thanks!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]