diff options
| author | s-ol <s+removethis@s-ol.nu> | 2025-08-04 21:00:54 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2025-08-04 21:00:54 +0000 |
| commit | b18f8fe40234a51e245879341cc393751f4ef7ef (patch) | |
| tree | 0df0964a71fc06d0293c2d250d552dad683c0397 | |
| parent | use cmark instead of discount for markdown docs (diff) | |
| download | alive-b18f8fe40234a51e245879341cc393751f4ef7ef.tar.gz alive-b18f8fe40234a51e245879341cc393751f4ef7ef.zip | |
fix repeated chars in symbol regex in docs and code
| -rw-r--r-- | alv/parsing.moon | 2 | ||||
| -rw-r--r-- | docs/reference/01_syntax.md | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/alv/parsing.moon b/alv/parsing.moon index f8247a4..5df31f1 100644 --- a/alv/parsing.moon +++ b/alv/parsing.moon @@ -19,7 +19,7 @@ space = (wc^1 * (comment^0 * wc)^0) / 1 -- required whitespace -- atoms digit = R '09' -first = (R 'az', 'AZ') + S '-_+*^%/.,=~!?%$><' +first = (R 'az', 'AZ') + S '-_+*^%/.,=~!?$><' sym = first * (first + digit)^0 / Constant\parse 'sym' strd = '"' * (C ((P '\\"') + (P '\\\\') + (1 - P '"'))^0) * '"' / Constant\parse 'str', '\"' diff --git a/docs/reference/01_syntax.md b/docs/reference/01_syntax.md index 078ca3a..445725c 100644 --- a/docs/reference/01_syntax.md +++ b/docs/reference/01_syntax.md @@ -61,10 +61,11 @@ The following are all valid symbols: _test foo$ -The regular expression `[a-zA-Z\-+*\/_.,=!?%$~><][a-zA-Z0-9\-+*\/_.,=!?%$~><]*` matches all symbols. +The regular expression `[a-zA-Z\-_+*^%\/.,=~!?$><][a-zA-Z0-9\-_+*^%\/.,=~!?$><]*` +matches all symbols. # cells -Cells consist of any number of subexpressions separated by chunks of whitespace +Cells consist of one or more subexpressions separated by chunks of whitespace and enclosed in parentheses (`(` and `)`). A cell optionally contains a tag immediately after the opening parenthesis. Whitespace between the opening parenthesis and the first subexpression or the closing parenthesis and the last |
