Changeset 53701 in vbox for trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_lex.l
- Timestamp:
- Jan 2, 2015 12:43:14 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_lex.l
r53699 r53701 55 55 result = (int)fread(buf, 1, max_size, yypcb->pcb_fileptr); \ 56 56 if (!result && ferror(yypcb->pcb_fileptr)) \ 57 YY_FATAL_ERROR("input in flex scanner failed"); \ 57 longjmp(yypcb->pcb_jmpbuf, EDT_FIO); \ 58 /*YY_FATAL_ERROR("input in flex scanner failed");*/ \ 58 59 } else { \ 59 60 size_t off = yypcb->pcb_strptr - yypcb->pcb_string; \ … … 65 66 memcpy(buf, yypcb->pcb_strptr, result); \ 66 67 yypcb->pcb_strptr += result; \ 67 fprintf(stderr, "yy_input -> %d '%.*s'\n", result, result, buf); /* REMOVE ME*/ \68 /*fprintf(stderr, "yy_input -> %d '%.*s'\n", result, result, buf);*/ \ 68 69 } else { \ 69 70 buf[0] = '\0'; \ 70 result = (YYSTATE) == S0; \71 fprintf(stderr, "yy_input -> %d\n", result); /* REMOVE ME*/ \71 result = 0; \ 72 /*fprintf(stderr, "yy_input -> %d\n", result);*/ \ 72 73 } \ 73 74 } \ … … 519 520 tok = DT_TOK_DIV; 520 521 521 unput(c);522 if (c != EOF) unput(c); 522 523 return (tok); 523 524 } … … 599 600 <S0>{RGX_WS} ; /* discard */ 600 601 <S0>"\\"\n ; /* discard */ 601 /* VBOX - START */602 <S0>"\0" {603 fprintf(stderr, "<S0>\\0\n");604 return (DT_TOK_EOF);605 }606 /* VBOX - END */607 602 <S0>. yyerror("syntax error near \"%c\"\n", yytext[0]); 608 603 … … 610 605 <S1>"*/" BEGIN(yypcb->pcb_cstate); 611 606 /* VBOX - START */ 612 <S1> "\0"yyerror("end-of-file encountered before matching */\n");607 <S1><<EOF>> yyerror("end-of-file encountered before matching */\n"); 613 608 /* VBOX - END */ 614 609 <S1>.|\n ; /* discard */ … … 671 666 672 667 <S2>{RGX_WS} ; /* discard */ 673 /* VBOX - START */674 <S2>"\0" {675 fprintf(stderr, "<S2>\\0\n");676 return (DT_TOK_EOF);677 }678 /* VBOX - END */679 668 <S2>. yyerror("syntax error near \"%c\"\n", yytext[0]); 680 669 … … 707 696 708 697 /* VBOX - BEGIN */ 709 <S3> "\0"yyerror("end-of-file encountered before end of control line\n");698 <S3><<EOF>> yyerror("end-of-file encountered before end of control line\n"); 710 699 /* VBOX - END */ 711 700 <S3>. yyerror("syntax error near \"%c\"\n", yytext[0]); … … 767 756 #ifndef USING_FLEX 768 757 yysptr = yysbuf; 758 #else 759 yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE)); 769 760 #endif 770 761 } … … 838 829 if ((c1 = input()) == c0) 839 830 ttok = DT_TOK_IDENT; 840 unput(c1);831 if (c1 != EOF) unput(c1); 841 832 break; 842 833 … … 844 835 if ((c1 = input()) != c0) 845 836 ttok = DT_TOK_IDENT; 846 unput(c1);837 if (c1 != EOF) unput(c1); 847 838 break; 848 839 case '[': … … 859 850 } 860 851 861 unput(c0);852 if (c0 != EOF) unput(c0); 862 853 return (ttok); 863 854 }
Note:
See TracChangeset
for help on using the changeset viewer.