diff options
author | John Millaway <john43@users.sourceforge.net> | 2002-09-09 19:25:56 +0000 |
---|---|---|
committer | John Millaway <john43@users.sourceforge.net> | 2002-09-09 19:25:56 +0000 |
commit | b670bc6c09e8bd33f48db9f1db3782eac0b0b0b4 (patch) | |
tree | 6581909a842d6bc1ed15f0af17cee697600fe5c1 /misc.c | |
parent | a953d6fb60d4221ef08d90820f015fb58678b48a (diff) |
Table deserialization works for everything except --fast scanners.
Scanners can auto-verify serialized table integrity via --tables-verify.
Added tables API items to TODO list.
test-table-opts is becoming exhaustive (a good thing).
Diffstat (limited to 'misc.c')
-rw-r--r-- | misc.c | 31 |
1 files changed, 26 insertions, 5 deletions
@@ -302,12 +302,15 @@ void cshell (v, n, special_case_0) void dataend () { - if (datapos > 0) - dataflush (); + /* short circuit any output */ + if (gentables) { - /* add terminator for initialization; { for vi */ - outn (" } ;\n"); + if (datapos > 0) + dataflush (); + /* add terminator for initialization; { for vi */ + outn (" } ;\n"); + } dataline = 0; datapos = 0; } @@ -317,6 +320,10 @@ void dataend () void dataflush () { + /* short circuit any output */ + if (!gentables) + return; + outc ('\n'); if (++dataline >= NUMDATALINES) { @@ -474,6 +481,10 @@ void mark_prolog () void mk2data (value) int value; { + /* short circuit any output */ + if (!gentables) + return; + if (datapos >= NUMDATAITEMS) { outc (','); dataflush (); @@ -500,6 +511,10 @@ void mk2data (value) void mkdata (value) int value; { + /* short circuit any output */ + if (!gentables) + return; + if (datapos >= NUMDATAITEMS) { outc (','); dataflush (); @@ -834,7 +849,8 @@ void skelout () tablestoggle = false; } else if (cmd_match (CMD_TABLES_YYDMAP)) { - + if (tablesext && yydmap_buf.elts) + outn ((char *) (yydmap_buf.elts)); } else if (cmd_match (CMD_CPP_ONLY)) { /* only for C++ */ @@ -881,6 +897,11 @@ void skelout () void transition_struct_out (element_v, element_n) int element_v, element_n; { + + /* short circuit any output */ + if (!gentables) + return; + out_dec2 (" {%4d,%4d },", element_v, element_n); datapos += TRANS_STRUCT_PRINT_LENGTH; |