diff --git a/brag/brag.scrbl b/brag/brag.scrbl index ec8e722..f98df92 100755 --- a/brag/brag.scrbl +++ b/brag/brag.scrbl @@ -708,7 +708,7 @@ A @deftech{pattern} is one of the following: @item{an explicit @deftech{sequence}: a @tech{pattern} surrounded by @litchar{(} and @litchar{)}.} - @item{the @deftech{empty set}: a special @tech{pattern} that matches a list of zero tokens. When it appears on the right side of a rule, the empty set will match empty input (which obviously contains zero tokens), but also the ``gap'' between two existing tokens (which less obviously also contains zero tokens). The empty set can be denoted by @litchar{[]} (empty square brackets), @litchar{∅} (the Unicode empty-set character), or @litchar{Ø} (the slashed O).} + @item{the @deftech{empty set}: a special @tech{pattern} that matches a list of zero tokens. When it appears on the right side of a rule, the empty set will match empty input (which obviously contains zero tokens), but also the ``gap'' between two existing tokens (which less obviously also contains zero tokens). The empty set can be denoted by @litchar{()} (empty parentheses), @litchar{∅} (the Unicode empty-set character), or @litchar{Ø} (the slashed O).} ] diff --git a/brag/examples/empty-symbol.rkt b/brag/examples/empty-symbol.rkt index 20ade75..35a45c8 100755 --- a/brag/examples/empty-symbol.rkt +++ b/brag/examples/empty-symbol.rkt @@ -1,6 +1,6 @@ #lang brag top : xs | ys | zs -xs : [] | "x" xs +xs : () | "x" xs ys : Ø | "y" /ys zs : ∅ | "z" @zs \ No newline at end of file diff --git a/brag/rules/lexer.rkt b/brag/rules/lexer.rkt index 68cfe15..5185dbe 100755 --- a/brag/rules/lexer.rkt +++ b/brag/rules/lexer.rkt @@ -56,7 +56,7 @@ (:or (:* (:or "\\\"" esc-chars (:~ "\"" "\\"))) "\\\\") "\"") (token-LIT (unescape-lexeme lexeme #\"))] - [(:or "[]" "Ø" "∅") (token-EMPTY lexeme)] + [(:or "()" "Ø" "∅") (token-EMPTY lexeme)] ["(" (token-LPAREN lexeme)] ["["