From 99cd4b9125ed5bd5f7e5b6756da4f4c0efdebca0 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 6 Jul 2022 17:03:22 -0300 Subject: Details --- lpcode.c | 5 ++--- makefile | 3 ++- re.html | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lpcode.c b/lpcode.c index 7d47a00..64ad8ac 100644 --- a/lpcode.c +++ b/lpcode.c @@ -365,9 +365,8 @@ static int getfirst (TTree *tree, const Charset *follow, Charset *firstset) { if (tocharset(sib1(tree), firstset)) { cs_complement(firstset); return 1; - } - /* else go through */ - } + } /* else */ + } /* FALLTHROUGH */ case TBehind: { /* instruction gives no new information */ /* call 'getfirst' only to check for math-time captures */ int e = getfirst(sib1(tree), follow, firstset); diff --git a/makefile b/makefile index 1e32195..a85f902 100644 --- a/makefile +++ b/makefile @@ -1,8 +1,9 @@ LIBNAME = lpeg LUADIR = ../lua/ -COPT = -O2 -DNDEBUG +# COPT = -O2 -DNDEBUG # COPT = -g +# COPT = -DLPEG_DEBUG CWARNS = -Wall -Wextra -pedantic \ -Waggregate-return \ diff --git a/re.html b/re.html index ad60d50..24a582a 100644 --- a/re.html +++ b/re.html @@ -423,6 +423,7 @@ primary <- '(' exp ')' / string / class / defined / '=' name / '{}' / '{~' exp '~}' + / '{|' exp '|}' / '{' exp '}' / '.' / name S !arrow @@ -436,7 +437,7 @@ item <- defined / range / . range <- . '-' [^]] S <- (%s / '--' [^%nl]*)* -- spaces and comments -name <- [A-Za-z][A-Za-z0-9_]* +name <- [A-Za-z_][A-Za-z0-9_]* arrow <- '<-' num <- [0-9]+ string <- '"' [^"]* '"' / "'" [^']* "'" -- cgit v1.2.3-55-g6feb