From de7536fd94f986390d4693c1b3d0134f08b4dfa4 Mon Sep 17 00:00:00 2001 From: David Majda Date: Mon, 19 Apr 2010 20:00:22 +0200 Subject: [PATCH] Added notes about ECMA-262, 5th ed. compatibility to the JSON example grammar. --- examples/json.pegjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/json.pegjs b/examples/json.pegjs index d607fe1..cff038f 100644 --- a/examples/json.pegjs +++ b/examples/json.pegjs @@ -87,6 +87,8 @@ e: [eE] [+-]? { return $1 + $2; } /* * The following rules are not present in the original JSON gramar, but they are * assumed to exist implicitly. + * + * FIXME: Define them according to ECMA-262, 5th ed. */ digit: [0-9] @@ -100,5 +102,5 @@ hexDigit: [0-9a-fA-F] _ "whitespace": whitespace* // Whitespace is undefined in the original JSON grammar, so I assume a simple -// conventional definition. +// conventional definition consistent with ECMA-262, 5th ed. whitespace: [ \t\n\r]