Skip to content

Commit a148cae

Browse files
brandonchinn178andreasabel
authored andcommitted
Update docs to allow numbers in @id
1 parent b76f7f4 commit a148cae

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

doc/syntax.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,14 @@ These macros are used in the BNF specification of the syntax later on.
2525
$special = [\.\;\,\$\|\*\+\?\#\~\-\{\}\(\)\[\]\^\/]
2626
$graphic = $printable # $white
2727

28+
$lower = a-z
29+
$upper = A-Z
30+
$alpha = [$upper $lower]
31+
$alphanum = [$alpha $digit]
32+
$idchar = [$alphanum \_ \']
33+
2834
@string = \" ($graphic # \")* \"
29-
@id = [A-Za-z][A-Za-z'_]*
35+
@id = $alpha $idchar*
3036
@smac = '$' id
3137
@rmac = '@' id
3238
@char = ($graphic # $special) | @escape

0 commit comments

Comments
 (0)