Commit graph

1671 commits

Author SHA1 Message Date
Max Brunsfeld
fdc6ee445b Remove parser__push helper function 2017-08-30 16:41:07 -07:00
Max Brunsfeld
1b1276bdbf Simplify parser__condense_stack function 2017-08-30 16:36:02 -07:00
Max Brunsfeld
96a630e5df Clean up check for leaf node reusability 2017-08-30 16:19:51 -07:00
Max Brunsfeld
8bdab7335e Remove unnecessary reusability check after breaking down lookahead 2017-08-30 16:19:11 -07:00
Max Brunsfeld
bef536a7d0 Discard fragile reusable nodes earlier 2017-08-30 16:17:10 -07:00
Max Brunsfeld
5cbd50c7d7 Remember how far ahead the lexer looked on failed calls
This needs to be included in the 'bytes_scanned' property of the token
that is ultimately produced.
2017-08-29 15:04:22 -07:00
Max Brunsfeld
f3977ec213 Always call deserialize on external scanner before scanning
Remembering the last token that the external scanner produced is
not worth the complexity.
2017-08-29 14:41:55 -07:00
Max Brunsfeld
c285fbef38 Clear LexTableBuilder's state after detecting conflicts 2017-08-25 17:11:39 -07:00
Max Brunsfeld
4d63e26e9e Clean up logic for falling back to error mode after lexing fails 2017-08-25 16:57:09 -07:00
Max Brunsfeld
86d5737fc2 Escape quotes when printing symbols to dot graphs 2017-08-25 16:26:40 -07:00
Max Brunsfeld
573b5f3671 Pass LexTableBuilder to ParseTableBuilder 2017-08-25 15:57:50 -07:00
Max Brunsfeld
fc4c6723b8 Add appveyor badge to README 2017-08-09 10:29:15 -07:00
Max Brunsfeld
c9a87687fc Merge pull request #97 from tree-sitter/windows-build
Get the library building and the tests passing on Windows
2017-08-09 10:23:38 -07:00
Max Brunsfeld
eace426129 Suppress unknown pragma warnings in MSVC 2017-08-09 10:14:05 -07:00
Max Brunsfeld
4daf22ba0c Read files in binary mode in tests 2017-08-09 10:07:03 -07:00
Max Brunsfeld
9d649f3382 Remove depth-based error-recovery pruning criteria
This code was causing ambiguities to get resolved differently depending on
whether there was an unrelated error on the stack or not.
2017-08-09 09:53:41 -07:00
Max Brunsfeld
96a2b05289 Disable git's CRLF-conversion feature
There are test files that purposefully use CR line-endings.
2017-08-09 09:41:51 -07:00
Max Brunsfeld
964dd16812 Avoid unicode escape sequences when generating conflict messages 2017-08-09 09:32:58 -07:00
Max Brunsfeld
90eef13aeb Fix windows directory listing function 2017-08-08 22:21:39 -07:00
Max Brunsfeld
d4b2c58dc8 Fix another hard-coded / as a path separator 2017-08-08 22:08:27 -07:00
Max Brunsfeld
f6325746aa Provide symbol metadata with dummy language in stack test 2017-08-08 17:47:24 -07:00
Max Brunsfeld
0246a6d16a Cache fixture grammars on appveyor 2017-08-08 17:47:09 -07:00
Max Brunsfeld
d0dc164013 Disable the default behavior of printing a logo, Microsoft. 2017-08-08 17:35:50 -07:00
Max Brunsfeld
0919f5588b Disable fuzzing example test for now 2017-08-08 17:35:16 -07:00
Max Brunsfeld
0ba6188bab Construct paths portably in test_grammars.cc 2017-08-08 17:25:43 -07:00
Max Brunsfeld
5f40adb70c Recur to sub-rules in a deterministic order in expand_repeats 2017-08-08 17:20:04 -07:00
Max Brunsfeld
7587353ab6 Avoid unicode literals in tests
MSVC tries to normalize them based on the current locale.
2017-08-08 17:10:08 -07:00
Max Brunsfeld
17b58f41e1 Disable optimization when compiling grammars during tests 2017-08-08 17:09:34 -07:00
Max Brunsfeld
6a2e2ca712 Setup appveyor to run CL.exe 2017-08-08 16:48:04 -07:00
Max Brunsfeld
e6b43700b9 Get generated parsers compiling and loading properly on windows 2017-08-08 16:47:51 -07:00
Max Brunsfeld
17310769a4 Fix usage of .so instead of .dll on windows 2017-08-08 15:20:38 -07:00
Max Brunsfeld
bb7889fac5 Don't rely on PWD env var on windows 2017-08-08 15:04:27 -07:00
Max Brunsfeld
05066e492e Fetch fixture grammars on appveyor 2017-08-08 14:47:43 -07:00
Max Brunsfeld
37836f593a Run tests on windows 2017-08-08 14:07:23 -07:00
Max Brunsfeld
34b5340d71 Fix paths to corpus files on windows 2017-08-08 14:06:11 -07:00
Max Brunsfeld
ac99985a97 Only link to libdl on linux 2017-08-08 14:06:11 -07:00
Max Brunsfeld
9d616b3bf8 Replace size_t -> LexStateId in LexTableBuilder::remove_duplicate_states 2017-08-08 12:55:35 -07:00
Max Brunsfeld
cc7277fd7d Avoid using IsNull bandit assertion 2017-08-08 12:52:35 -07:00
Max Brunsfeld
b43ae2826b Use C++ stdlib for random number generation 2017-08-08 12:42:49 -07:00
Max Brunsfeld
fc0f49e4ee Add windows implementations of some IO-related test helpers 2017-08-08 12:21:17 -07:00
Max Brunsfeld
3d351eac09 Fix some C code that MSVC doesn't like 2017-08-08 10:47:59 -07:00
Max Brunsfeld
12623deb19 Avoid struct literal syntax in point functions 2017-08-08 10:42:21 -07:00
Max Brunsfeld
947c161c2f Use a constructor rather than aggregate initialization for Production 2017-08-08 10:41:54 -07:00
Max Brunsfeld
f3e3e6193b Use VS 2017 on appveyor 2017-08-08 10:30:20 -07:00
Max Brunsfeld
b03e9a636f Fix configure batch script and add test batch script 2017-08-07 15:36:14 -07:00
Max Brunsfeld
a2670a39dc Avoid empty initializer list in global constant 2017-08-07 14:46:23 -07:00
Max Brunsfeld
ced5521014 Fix UTF8PROC_EXPORTS typo 2017-08-07 14:46:11 -07:00
Max Brunsfeld
fc400c17e5 Build runtime first on appveyor 2017-08-07 13:37:49 -07:00
Max Brunsfeld
67fcbba864 Define UTF8PROC_EXPORTS for both compiler and runtime targets 2017-08-07 13:10:41 -07:00
Max Brunsfeld
e932d09908 Avoid aggregate initialization syntax in places where C++11 doesn't allow it 2017-08-07 13:07:54 -07:00