From af8729499466e0edd22d42648a714bb584856cf7 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 11 Apr 2017 06:59:33 -0700 Subject: Bugfix: missing usr:end and usr:single symbols. When TXR pattern language code is canned in the context of an alternative *package* which uses the usr package, the scanner will throw false errors on @(end) and @(single). This is because these symbols don't exist in the usr package and will get interned in the current package. The scanner will then complain that they are not in the usr package. * match.c (syms_init): Intern end and single in the usr package, but don't store the return value in any variable. --- match.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/match.c b/match.c index b187e13b..6a0d6ea2 100644 --- a/match.c +++ b/match.c @@ -4760,6 +4760,12 @@ static void syms_init(void) data_s = intern(lit("data"), user_package); fuzz_s = intern(lit("fuzz"), user_package); counter_k = intern(lit("counter"), keyword_package); + + /* These symbols must exist when TXR code is parsed + * in the context of an alternative package, rather than usr. + */ + intern(lit("end"), user_package); + intern(lit("single"), user_package); } static void dir_tables_init(void) -- cgit v1.2.3