David Majda
0e384b31f4
Jasmine: Convert tests of parser's "doubleQuotedCharacter" rule
13 years ago
David Majda
2f5f8d5932
Jasmine: Convert tests of parser's "simpleDoubleQuotedCharacter" rule
13 years ago
David Majda
fb01f48c97
Jasmine: Convert tests of parser's "singleQuotedString" rule
13 years ago
David Majda
d3b3fe9b78
Jasmine: Convert tests of parser's "singleQuotedCharacter" rule
13 years ago
David Majda
124e45606c
Jasmine: Convert tests of parser's "simpleSingleQuotedCharacter" rule
13 years ago
David Majda
ba68919b0a
Jasmine: Convert tests of parser's "class" rule
13 years ago
David Majda
5fb59b05f2
Jasmine: Convert tests of parser's "classCharacterRange" rule
13 years ago
David Majda
d29a753b8d
Jasmine: Convert tests of parser's "classCharacter" rule
13 years ago
David Majda
b9ae8f9561
Jasmine: Convert tests of parser's "bracketDelimitedCharacter" rule
13 years ago
David Majda
da4ac8bb92
Jasmine: Convert tests of parser's "simpleBracketDelimitedCharacter" rule
13 years ago
David Majda
2bb266bbaf
Jasmine: Convert tests of parser's "simpleEscapeSequence" rule
13 years ago
David Majda
2619becb9d
Jasmine: Convert tests of parser's "zeroEscapeSequence" rule
13 years ago
David Majda
2b43f8ebb8
Jasmine: Convert tests of parser's "hexEscapeSequence" rule
13 years ago
David Majda
0bbca136a2
Jasmine: Convert tests of parser's "unicodeEscapeSequence" rule
13 years ago
David Majda
a27dc5ae4a
Jasmine: Convert tests of parser's "eolEscapeSequence" rule
13 years ago
David Majda
4f91286013
Jasmine: Convert non-tests of parser's character class rules
13 years ago
David Majda
3bc61c4c50
Jasmine: Convert tests of parser's "__" rule
13 years ago
David Majda
fadaef84dd
Jasmine: Convert tests of parser's "comment" rule
13 years ago
David Majda
b5ccaed491
Jasmine: Convert tests of parser's "singleLineComment" rule
13 years ago
David Majda
dac3b0d8d9
Jasmine: Convert tests of parser's "multiLineComment" rule
13 years ago
David Majda
328edf667c
Jasmine: Convert tests of parser's "eol" rule
13 years ago
David Majda
b4cffee9d4
Jasmine: Convert tests of parser's "eolChar" rule
13 years ago
David Majda
a46b9c197b
Jasmine: Convert tests of parser's "whitespace" rule
13 years ago
David Majda
4d5b1d58aa
AST: Store rules in an array instead of an object
...
This simplifies the code a bit and makes the AST more regular (each node
type has a fixed set of properties). The latter may get useful later
when generalizing visitors.
13 years ago
David Majda
9c3da347cc
Fix string parsing tests
...
The tests were wrong because the |string| rule is not used to parse
literals but rule names.
13 years ago
David Majda
3421bdb813
Test trailing characters for strings and literals at correct places
13 years ago
David Majda
c04af99df8
Implament case-insensitive class matching
13 years ago
David Majda
b540b2d460
Implement case-insensitive literal matching
13 years ago
David Majda
1c11e4aaa3
Split |literal| rule in the PEG.js grammar to |literal| and |string|
...
This is just a formality now but it will make sense later when literals
(but not strings) will allow "i" flag for case-insensitive matching.
13 years ago
David Majda
17f62ae9e3
test/parser-test.js: Replace "\0" with "\x00"
...
Fixes the following JSHint errors:
./test/parser-test.js: line 353, col 54, Bad escapement.
./test/parser-test.js: line 384, col 54, Bad escapement.
./test/parser-test.js: line 436, col 60, Bad escapement.
./test/parser-test.js: line 437, col 60, Bad escapement.
./test/parser-test.js: line 472, col 50, Bad escapement.
13 years ago
David Majda
934bfa5eef
test/parser-test.js: Fix missing/unnecessary semicolons
...
Fixes the following JSHint errors:
./test/parser-test.js: line 49, col 4, Missing semicolon.
./test/parser-test.js: line 58, col 4, Missing semicolon.
./test/parser-test.js: line 77, col 2, Unnecessary semicolon.
./test/parser-test.js: line 137, col 23, Missing semicolon.
13 years ago
David Majda
d84f38c64b
test/parser-test.js: Fix comments that look like nested to JSHint
...
Fixes the following JSHint errors:
./test/parser-test.js: line 521, col 29, Nested comment.
./test/parser-test.js: line 521, col 29, Stopping, unable to continue. (87% scanned).
13 years ago
David Majda
8b2edd3c41
Remove trailing comma in parser tests (IE compatibility)
13 years ago
David Majda
3e7d31559d
Do not pass |global| into wrapping functions in tests, it's useless
14 years ago
David Majda
aeb2cb4f1c
Make sure quoting functions output only ASCII characters
...
This patch prevents portability problems. In particular, it fixes a
problem where "SyntaxError: Invalid range in character class." error
appeared when using command-line version on Widnows (see GH-13).
14 years ago
David Majda
d493a4d143
Move test helper into its own file + reorder test file includes
14 years ago
David Majda
b15eb0bb5f
Change term "grammar parser" to "parser" in tests
14 years ago
David Majda
b105c43756
Define |global| object in different way in tests
14 years ago
David Majda
e59f3ba338
Split the source code into several files, introduce build system
...
The source code is now in the src directory. The library needs to be
built using "rake", which creates the lib/peg.js file by combining the
source files.
14 years ago