diff options
author | Will Estes <wlestes@users.sourceforge.net> | 2001-11-14 21:13:06 +0000 |
---|---|---|
committer | Will Estes <wlestes@users.sourceforge.net> | 2001-11-14 21:13:06 +0000 |
commit | 5218a435351f94ea39422e1ebe809d4bad1b365d (patch) | |
tree | 269395cb4beb4690c4c6357d2232e794bac2ef04 /tests/test-bison-yylval/parser.y | |
parent | b9d1d8c8ae8cd7744df2607e60eeec1de4d83280 (diff) |
more from the same batch
Diffstat (limited to 'tests/test-bison-yylval/parser.y')
-rw-r--r-- | tests/test-bison-yylval/parser.y | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/tests/test-bison-yylval/parser.y b/tests/test-bison-yylval/parser.y index 8dfebd8..1e9517a 100644 --- a/tests/test-bison-yylval/parser.y +++ b/tests/test-bison-yylval/parser.y @@ -12,12 +12,8 @@ #define YYPARSE_PARAM scanner #define YYLEX_PARAM scanner - int yyerror(char* msg); -extern int testlex_init(void**); -extern int testlex_destroy(void**); -extern int testset_in(FILE*,void*); -extern int testlex(); + /* A dummy function. A check against seg-faults in yylval->str. */ int process_text(char* s) { @@ -38,6 +34,7 @@ int process_text(char* s) { long unused; char * str; } + %token <str> TAGNAME TEXT %token LT %token GT @@ -60,16 +57,3 @@ int yyerror(char* msg) { fprintf(stderr,"%s\n",msg); return 0; } - - -int main ( int argc, char** argv ) -{ - void* scanner; - /*yydebug =1;*/ - testlex_init ( &scanner ); - testset_in(stdin,scanner); - testparse ( scanner ); - testlex_destroy ( scanner ); - return 0; -} - |