Changeset 8e153e in git
- Timestamp:
- Apr 17, 2000, 9:21:24 AM (23 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
- Children:
- 1d46f5b70e82c10c361435b8f012c15e4259c91f
- Parents:
- ad25acec8dc31a886e076a58c7936b36b268bda8
- Location:
- modules/modgen
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/modgen/grammar.y
rad25ace r8e153e 1 1 /* 2 * $Id: grammar.y,v 1.1 1 2000-03-30 06:35:44 krueger Exp $2 * $Id: grammar.y,v 1.12 2000-04-17 07:21:24 krueger Exp $ 3 3 */ 4 4 … … 19 19 20 20 int sectnum = 1; 21 int iseof = 0; 21 22 extern moddef module_def; 22 23 extern int yylineno; … … 34 35 void yyerror(char * fmt) 35 36 { 37 if(!iseof) printf("%s at line %d\n", fmt, yylineno); 36 38 } 37 39 … … 92 94 part1: initmod sect1 sect1end 93 95 { 96 if(do_create_makefile)mod_create_makefile(&module_def); 97 if(write_intro(&module_def)) { 98 return(myyyerror("Error while creating files\n")); 99 } 100 } 101 | sect1 sect1end 102 { 103 write_mod_init(&module_def, module_def.fmtfp); 104 if(do_create_makefile)mod_create_makefile(&module_def); 105 if(write_intro(&module_def)) { 106 return(myyyerror("Error while creating files\n")); 107 } 108 } 109 | sect1end 110 { 111 write_mod_init(&module_def, module_def.fmtfp); 94 112 if(do_create_makefile)mod_create_makefile(&module_def); 95 113 if(write_intro(&module_def)) { -
modules/modgen/main.cc
rad25ace r8e153e 123 123 do { 124 124 i=yyparse(); 125 if(!i) printf("FINISH? (%d)\n", i); 126 else 127 if(debug)printf("NEXT LOOP at line %d (%s) %d\n", yylineno, yytext, i); 125 switch(i) { 126 case 0: 127 printf("FINISH? %s (%d)\n", yytext, yylineno); break; 128 case 1: 129 if(debug>2) 130 printf("NEXT LOOP at line %d (%s) %d\n", yylineno, yytext, i); 131 if(strlen(yytext)) 132 printf("something went wrong at line %d\n", yylineno); 133 break; 134 default: 135 break; 136 } 128 137 } 129 138 while (!i); -
modules/modgen/scanner.l
rad25ace r8e153e 3 3 * Computer Algebra System SINGULAR * 4 4 ****************************************/ 5 /* $Id: scanner.l,v 1.1 0 2000-03-30 06:35:45krueger Exp $ */5 /* $Id: scanner.l,v 1.11 2000-04-17 07:21:24 krueger Exp $ */ 6 6 #include <stdio.h> 7 7 #include <string.h> … … 28 28 # define YYLP_MISS_BR2 11 29 29 # define YYLP_MISS_BR3 12 30 31 extern int iseof; 30 32 31 33 int offset = 0; … … 316 318 317 319 <<EOF>> { sectnum = 0; 320 iseof=1; 318 321 return SECT3END; 319 322 /*yyterminate();*/ … … 438 441 extern "C" { 439 442 int yywrap() { 440 printf("===================== yywrap() =====================\n");441 443 return 1; 442 444 }
Note: See TracChangeset
for help on using the changeset viewer.