From 69906e9730114531a1e124396fb1f66423b76363 Mon Sep 17 00:00:00 2001 From: David Majda Date: Mon, 8 Mar 2010 11:37:03 +0100 Subject: [PATCH] Do not recognize \uFEFF as whitespace in the metagrammar since it does not work with Rhino. --- lib/compiler.js | 3 ++- test/compiler-test.js | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/compiler.js b/lib/compiler.js index 525078c..22d3156 100644 --- a/lib/compiler.js +++ b/lib/compiler.js @@ -1310,7 +1310,8 @@ with (PEG.Grammar) { new Literal("\v"), new Literal("\f"), new Literal("\xA0"), - new Literal("\uFEFF"), + // Should be here, but causes infinite loop in Rhino: + // new Literal("\uFEFF"), new Literal("\u1680"), new Literal("\u180E"), new Literal("\u2000"), diff --git a/test/compiler-test.js b/test/compiler-test.js index 32213cd..9d3f711 100644 --- a/test/compiler-test.js +++ b/test/compiler-test.js @@ -910,7 +910,6 @@ with (PEG.Grammar) { grammarParserParses('start:\f"abcd"', simpleGrammar); grammarParserParses('start: "abcd"', simpleGrammar); grammarParserParses('start:\xA0"abcd"', simpleGrammar); - grammarParserParses('start:\uFEFF"abcd"', simpleGrammar); grammarParserParses('start:\u1680"abcd"', simpleGrammar); grammarParserParses('start:\u180E"abcd"', simpleGrammar); grammarParserParses('start:\u2000"abcd"', simpleGrammar);