Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(315)

Side by Side Diff: tools/re2c/code.c

Issue 10289003: Merge https://github.com/yasm/yasm/commit/2bd66514b6b100887c19d8598da38347b3cff40e (Closed) Base URL: http://git.chromium.org/chromium/deps/yasm/patched-yasm.git@master
Patch Set: Merge https://github.com/yasm/yasm/commit/2bd66514b6b100887c19d8598da38347b3cff40e Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include <stdlib.h> 1 #include <stdlib.h>
2 #include <string.h> 2 #include <string.h>
3 #include <ctype.h> 3 #include <ctype.h>
4 #include "tools/re2c/substr.h" 4 #include "tools/re2c/substr.h"
5 #include "tools/re2c/globals.h" 5 #include "tools/re2c/globals.h"
6 #include "tools/re2c/dfa.h" 6 #include "tools/re2c/dfa.h"
7 #include "tools/re2c/parse.h" 7 #include "tools/re2c/parse.h"
8 8
9 static void useLabel(size_t value) { 9 static void useLabel(size_t value) {
10 while (value >= vUsedLabelAlloc) { 10 while (value >= vUsedLabelAlloc) {
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 start_label = label; 837 start_label = label;
838 838
839 Action_new_Enter(d->head, label++); 839 Action_new_Enter(d->head, label++);
840 840
841 for(s = d->head; s; s = s->next) 841 for(s = d->head; s; s = s->next)
842 s->label = label++; 842 s->label = label++;
843 843
844 nOrgOline = oline; 844 nOrgOline = oline;
845 maxFillIndexes = vFillIndexes; 845 maxFillIndexes = vFillIndexes;
846 orgVFillIndexes = vFillIndexes; 846 orgVFillIndexes = vFillIndexes;
847 tmpo = fopen("re2c.tmp", "wt"); 847 tmpo = tmpfile();
848 for(s = d->head; s; s = s->next){ 848 for(s = d->head; s; s = s->next){
849 int readCh = 0; 849 int readCh = 0;
850 State_emit(s, tmpo, &readCh); 850 State_emit(s, tmpo, &readCh);
851 Go_genGoto(&s->go, tmpo, s, s->next, &readCh); 851 Go_genGoto(&s->go, tmpo, s, s->next, &readCh);
852 } 852 }
853 fclose(tmpo); 853 fclose(tmpo);
854 remove("re2c.tmp");
855 maxFillIndexes = vFillIndexes; 854 maxFillIndexes = vFillIndexes;
856 vFillIndexes = orgVFillIndexes; 855 vFillIndexes = orgVFillIndexes;
857 oline = nOrgOline; 856 oline = nOrgOline;
858 857
859 fputs("\n", o); 858 fputs("\n", o);
860 oline++; 859 oline++;
861 if (!iFlag) 860 if (!iFlag)
862 fprintf(o, "#line %u \"%s\"\n", oline++, outputFileName); 861 fprintf(o, "#line %u \"%s\"\n", oline++, outputFileName);
863 862
864 if (!hasFillLabels) { 863 if (!hasFillLabels) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 if (bitmap_brace) { 901 if (bitmap_brace) {
903 fputs("}\n", o); 902 fputs("}\n", o);
904 oline++; 903 oline++;
905 } 904 }
906 905
907 BitMap_first = NULL; 906 BitMap_first = NULL;
908 907
909 free(saves); 908 free(saves);
910 free(rules); 909 free(rules);
911 } 910 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698