diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-04-21 06:56:23 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-04-21 06:56:23 -0700 |
commit | 4e647f4d27827d2918e519cb3f52583d2bbb2a59 (patch) | |
tree | 4de914375260f4ccfdecef3ce64ec1de3adef575 /parser.h | |
parent | 0ba765092f20424828a520d6ccda1c313dab08f0 (diff) | |
download | txr-4e647f4d27827d2918e519cb3f52583d2bbb2a59.tar.gz txr-4e647f4d27827d2918e519cb3f52583d2bbb2a59.tar.bz2 txr-4e647f4d27827d2918e519cb3f52583d2bbb2a59.zip |
Continuing implementation of buffers.
* Makefile (OBJS): New objects itypes.o and buf.o.
* buf.c, buf.h: New files.
* itypes.c, itypes.h: New files.
* lib.c (obj_print_impl): Handle BUF via buf_print and
buf_pprint.
(init): Call itypes_init and buf_init.
* parser.h (end_of_buflit): Declared.
* parser.l (BUFLIT): New exclusive state.
(grammar): New rules for recognizing start of buffer
literal and its interior.
(end_of_buflit): New function.
* parser.y (HASH_B_QUOTE): New token.
(buflit, buflit_items, buflit_item): New nonterminals
and corresponding grammar rules.
(i_expr, n_expr): These symbols now generate a buflit;
a buffer literal is a kind of expression.
(yybadtoken): Handle HASH_B_QUOTE case.
Diffstat (limited to 'parser.h')
-rw-r--r-- | parser.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -78,6 +78,7 @@ void yyerrorf(scanner_t *scanner, val s, ...); void yybadtoken(parser_t *, int tok, val context); void end_of_regex(scanner_t *scanner); void end_of_char(scanner_t *scanner); +void end_of_buflit(scanner_t *scanner); #ifdef SPACE int yylex(YYSTYPE *yylval_param, yyscan_t yyscanner); #endif |