diff --git a/cs_parser.py b/cs_parser.py index ac811cb..adcc207 100644 --- a/cs_parser.py +++ b/cs_parser.py @@ -241,7 +241,7 @@ def parse(self, string, pos): name = "wrap") token = '[^' + r'()\[\]{}\"@~^;`#\'' + ws + '][^' + r'()\[\]{}\"@^;`' + ws + ']*' -parsers['token'] = Regex(r'(##)?(\\[()\[\]{}\"@^;`]|' + token + ")", name = "token") +parsers['token'] = Regex(r'(##)?(\\[()\[\]{}\"@^;`,]|' + token + ")", name = "token") parsers['string'] = Seq(Regex(r'#?"', name=".open"), Optional(Regex(r'([^"\\]+|\\.)+', name = ".body")), diff --git a/test_parser/token.txt b/test_parser/token.txt index 81f1c7f..eee9d08 100644 --- a/test_parser/token.txt +++ b/test_parser/token.txt @@ -640,11 +640,11 @@ Simple Char Special Chars ================================================================================ -\( \) \[ \] \{ \} \@ \" +\( \) \[ \] \{ \} \@ \" \, -------------------------------------------------------------------------------- -(source 0..23 +(source 0..26 (token 0..2 '\(') (token 3..5 '\)') (token 6..8 '\[') @@ -652,7 +652,8 @@ Special Chars (token 12..14 '\{') (token 15..17 '\}') (token 18..20 '\@') - (token 21..23 '\"')) + (token 21..23 '\"') + (token 24..26 '\,')) ================================================================================ Octal Char