From 00f48306d2472899066fe27dc731dac631ceacbc Mon Sep 17 00:00:00 2001 From: "Sven M. Hallberg" <pesco@khjk.org> Date: Sun, 9 Feb 2020 02:37:53 +0100 Subject: [PATCH] remove all uses of TOK() from object syntax this is allowed because objects no longer need to consume leading whitespace and all delimiter rules have been made explicit. --- pdf.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pdf.c b/pdf.c index 686cd7b..091e8dd 100644 --- a/pdf.c +++ b/pdf.c @@ -539,21 +539,21 @@ init_parser(struct Env *aux) * objects */ - H_ARULE(ref, SEQ(npair, wel,ws, KW("R"))); - H_RULE(null, KW("null")); - H_RULE(boole, CHX(TOK(LIT("true")), TOK(LIT("false")))); + H_ARULE(ref, SEQ(npair, wel,ws, LIT("R"))); + H_RULE(null, LIT("null")); + H_RULE(boole, CHX(LIT("true"), LIT("false"))); /* numbers */ - H_ARULE(intg, TOK(SEQ(h_optional(sign), nat))); + H_ARULE(intg, SEQ(h_optional(sign), nat)); H_RULE(realnn, CHX(SEQ(digits, period, digits), /* 12.3 */ SEQ(digits, period, empty), /* 123. */ SEQ(empty, period, digits))); /* .123 */ - H_ARULE(real, TOK(SEQ(h_optional(sign), realnn))); + H_ARULE(real, SEQ(h_optional(sign), realnn)); /* names */ H_ARULE(nesc, SEQ(hash, hdigit, hdigit)); H_ARULE(nstr, h_many(CHX(nchar, nesc))); /* '/' is valid */ - H_RULE(name, TOK(h_right(slash, nstr))); + H_RULE(name, h_right(slash, nstr)); /* strings */ H_RULE(snest, h_indirect()); -- GitLab