aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calc-example/calc.syntax2
-rw-r--r--libparser-generate.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/calc-example/calc.syntax b/calc-example/calc.syntax
index ef7a9f4..286019b 100644
--- a/calc-example/calc.syntax
+++ b/calc-example/calc.syntax
@@ -2,7 +2,7 @@ _WHITESPACE = " " | "\t" | " ";
_ = {_WHITESPACE};
-DIGIT = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9";
+DIGIT = <"0", "9">;
ADD = _, ("+"), _;
SUB = _, ("-" | "−"), _;
diff --git a/libparser-generate.c b/libparser-generate.c
index a07ca4f..c027300 100644
--- a/libparser-generate.c
+++ b/libparser-generate.c
@@ -377,7 +377,7 @@ emit_and_free_sentence(struct node *node, size_t *indexp)
argv0, low->token->lineno, low->token->column, low->token->character,
high->token->lineno, high->token->column, high->token->character);
}
- printf("static union libparser_sentence sentence_%zu_%zu = {.unary = {"
+ printf("static union libparser_sentence sentence_%zu_%zu = {.char_range = {"
".type = LIBPARSER_SENTENCE_TYPE_CHAR_RANGE, .low = %hhu, .high = %hhu"
"}};\n",
nrule_names, index, (unsigned char)low->token->s[0], (unsigned char)high->token->s[0]);