diff options
| author | Mengchi Zhang <[email protected]> | 2019-05-28 13:14:40 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-05-28 13:14:40 -0400 |
| commit | fb0618bb6905e70ad4055c1a2f7b1012508efaac (patch) | |
| tree | b302badc1adeddb1e270cec2dbcf7c2f07ed980e /libcuda/cuobjdump.l | |
| parent | 112e85e32c08e9fa0a34bb0ec262d8e95df61e6b (diff) | |
| parent | 895f18504daf849071936b0f3b97e07dd3878fa3 (diff) | |
Merge pull request #5 from echoedit/dev
Dev
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..eccc1f2 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, struct cuobjdump_parser* parser, const char* msg); +#define YY_DECL int cuobjdump_lex \ + (YYSTYPE * yylval_param , yyscan_t yyscanner, struct 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, struct cuobjdump_parser* parser, const char* msg) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; printf(" %s near \"%s\"",msg, yytext); |
