]> gitweb.factorcode.org Git - factor.git/commitdiff
peg.ebnf-docs: add note on including "-" in the character classes
authorAlexander Iljin <ajsoft@yandex.ru>
Fri, 30 Sep 2016 15:54:17 +0000 (18:54 +0300)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 28 Oct 2016 16:34:53 +0000 (09:34 -0700)
basis/peg/ebnf/ebnf-docs.factor

index d17003c53d51cc6b6153f4c08ad55009c2ff3fb5..50a8162e15efd8ad994cdc560337ea2f1a3c950c 100644 (file)
@@ -193,6 +193,7 @@ ARTICLE: "peg.ebnf.character-class" "EBNF Rule: Character Class"
 "square brackets. Multiple ranges can be included in a single character class "
 "definition. The syntax for the range is a start character, followed by a minus "
 "(-) followed by an end character. For example " { $snippet "[a-zA-Z]" } ". "
+"To include the minus (-) character in the class, make it the first or the last one: " { $snippet "[-0-9]" } " or " { $snippet "[a-z-]" } ". "
 "The AST resulting from the match is an integer of the character code for the "
 "character that matched."
 { $examples