From cf294ef23634be532b02fdc969f7e11a93e2c0fe Mon Sep 17 00:00:00 2001 From: David Majda Date: Fri, 4 Apr 2014 11:18:22 +0200 Subject: [PATCH] PEG.js grammar: Add limitations The limitations are inherited from the JavaScript example grammar. --- src/parser.pegjs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/parser.pegjs b/src/parser.pegjs index 9777b3b..430bdf8 100644 --- a/src/parser.pegjs +++ b/src/parser.pegjs @@ -8,6 +8,18 @@ * are directly taken or adapted from the JavaScript example grammar (see * examples/javascript.pegjs). * + * Limitations: + * + * * Non-BMP characters are completely ignored to avoid surrogate pair + * handling. + * + * * One can create identifiers containing illegal characters using Unicode + * escape sequences. For example, "abcd\u0020efgh" is not a valid + * identifier, but it is accepted by the parser. + * + * Both limitations could be resolved, but the costs would likely outweigh + * the benefits. + * * [1] http://www.ecma-international.org/publications/standards/Ecma-262.htm */