diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-06-08 20:38:37 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-06-08 20:38:37 -0700 |
commit | 3783930365c3e91aae780f4f8728f1a029012539 (patch) | |
tree | 7e45be134ae816114c5f41fb38c3f3faa1a79b16 /parser.h | |
parent | f791ed11cf3a801990f26a0ed7c0455c05df59df (diff) | |
download | txr-3783930365c3e91aae780f4f8728f1a029012539.tar.gz txr-3783930365c3e91aae780f4f8728f1a029012539.tar.bz2 txr-3783930365c3e91aae780f4f8728f1a029012539.zip |
parser: new *read-unknown-structs* variable.
* parser.c (read_unknown_structs_s): New symbol variable.
(parser_common_init): Initialize read_unknown_structs flag
member of the parser structure from the new special variable.
(parse_init): Initialize read_unknown_struct_s variable.
Register the *read-unknown-structs* dynamic variable.
* parser.h (struct parser): New member, read_unknown_structs.
(read_unknown_structs_s): Declared.
* parser.y (struct): Generate the struct literal syntax not
only for quasiquoted structures, but for structures with an
unknown type name, if the read_unkonwn_structs flag is set.
* txr.1: Documented.
* share/txr/stdlib/doc-syms.tl: Regenerated.
* y.tab.c.shipped: Regenerated.
Diffstat (limited to 'parser.h')
-rw-r--r-- | parser.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -65,6 +65,7 @@ struct parser { struct yy_token tok_pushback[4]; int tok_idx; int rec_source_loc; + int read_unknown_structs; }; #endif @@ -74,7 +75,7 @@ extern const int have_yydebug; extern const wchar_t *spec_file; extern val form_to_ln_hash; extern val parser_s, unique_s, circref_s; -extern val rec_source_loc_s; +extern val rec_source_loc_s, read_unknown_structs_s; extern val json_s; void yydebug_onoff(int); void yyerror(scanner_t *scanner, parser_t *, const char *s); |