diff options
| author | Mengchi Zhang <[email protected]> | 2019-05-27 17:27:58 -0400 |
|---|---|---|
| committer | Mengchi Zhang <[email protected]> | 2019-05-27 17:27:58 -0400 |
| commit | 913865e6ac7d0f7c12faeb8430dc5724fdc4be80 (patch) | |
| tree | 3829491145e7650736d37741d263e8af7e9f2be6 /libcuda/cuobjdump.l | |
| parent | 112e85e32c08e9fa0a34bb0ec262d8e95df61e6b (diff) | |
Move some cuobjdump parser variables
Signed-off-by: Mengchi Zhang <[email protected]>
Diffstat (limited to 'libcuda/cuobjdump.l')
| -rw-r--r-- | libcuda/cuobjdump.l | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libcuda/cuobjdump.l b/libcuda/cuobjdump.l index 9359281..26fbb55 100644 --- a/libcuda/cuobjdump.l +++ b/libcuda/cuobjdump.l @@ -30,6 +30,7 @@ %{ #include <stdio.h> #include <string.h> +#include "cuobjdump.h" #include "cuobjdump_parser.h" #define YY_NEVER_INTERACTIVE 1 @@ -38,7 +39,9 @@ #define YYDEBUG 1 -void cuobjdump_error(yyscan_t yyscanner, const char* msg); +void cuobjdump_error(yyscan_t yyscanner, cuobjdump_parser* parser, const char* msg); +#define YY_DECL int cuobjdump_lex \ + (YYSTYPE * yylval_param , yyscan_t yyscanner, cuobjdump_parser* parser) %} %option stack @@ -153,10 +156,10 @@ newlines {newline}+ <<EOF>> BEGIN(INITIAL);return 0; /*No other rule matched. Throw an error*/ -. cuobjdump_error(yyscanner, "Invalid token"); +. cuobjdump_error(yyscanner, parser, "Invalid token"); %% -void cuobjdump_error(yyscan_t yyscanner, const char* msg) +void cuobjdump_error(yyscan_t yyscanner, cuobjdump_parser* parser, const char* msg) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; printf(" %s near \"%s\"",msg, yytext); |
