diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2011-09-27 13:29:49 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2011-09-27 13:29:49 -0700 |
commit | 0a4e0f2ff76761efe933d4ccae4c17efa286f4e3 (patch) | |
tree | bb5230f4d00084d5216438f56df0779efc1391b7 /match.c | |
parent | 2722c5140685064be3df771eb9c0e0feff4fded0 (diff) | |
download | txr-0a4e0f2ff76761efe933d4ccae4c17efa286f4e3.tar.gz txr-0a4e0f2ff76761efe933d4ccae4c17efa286f4e3.tar.bz2 txr-0a4e0f2ff76761efe933d4ccae4c17efa286f4e3.zip |
* lib.c (eof_s): New symbol variable.
(obj_init): New variable initialized.
* lib.h (eof_s): Declared.
* match.c (match_files): New @(eof) directive explicitly
matches end of data.
* txr.1: Updated.
Diffstat (limited to 'match.c')
-rw-r--r-- | match.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1707,6 +1707,14 @@ repeat_spec_same_data: if ((spec = rest(spec)) == nil) break; goto repeat_spec_same_data; + } else if (sym == eof_s) { + if (data) { + debugf(lit("eof failed to match at ~a"), num(data_lineno), nao); + return nil; + } + if ((spec = rest(spec)) == nil) + break; + goto repeat_spec_same_data; } else { val func = uw_get_func(sym); |