Sam Harwell
49f9e093e8
Clean up character and string literals in the lexer
2013-05-18 11:18:58 -05:00
Sam Harwell
c835fc9a79
Add unambiguous shift and comparison operators to the lexer
2013-05-18 11:15:34 -05:00
Sam Harwell
ad2b5876a5
Add separators and operators to the lexer
2013-05-18 11:13:35 -05:00
Sam Harwell
0f4ec397da
Add NullLiteral to the lexer
2013-05-18 11:11:56 -05:00
Sam Harwell
f5ed71d2b9
Improved support for Java 7 numeric literals
2013-05-18 11:10:53 -05:00
Sam Harwell
9bd3e965ef
'true' and 'false' are both lexed as a BooleanLiteral token
2013-05-18 11:09:22 -05:00
Sam Harwell
d9e1289d13
Add keywords as explicit lexer rules; enum and assert are always keywords (could extend JavaLexer and override emit to change this behavior)
2013-05-18 11:06:02 -05:00
Sam Harwell
62cbab4f86
Use explicit groups so the ATN can collapse sets
2013-05-18 11:01:14 -05:00
Sam Harwell
0e5bcc2416
Report file names with lexer errors
2013-05-17 23:57:13 -05:00
Sam Harwell
5948f50288
Proper Unicode identifier handling
2013-05-17 23:56:32 -05:00
Sam Harwell
d9d5100105
Use JavaUnicodeInputStream for proper handling of Unicode escape sequences in Java source code
2013-05-17 23:47:59 -05:00
Sam Harwell
f9f4883855
Updated documentation in LL1Analyzer
2013-05-14 16:26:45 -05:00
Sam Harwell
1906e4a639
Use IntervalSet.or and Arrays.copyOf instead of duplicating their functionality
2013-05-14 09:58:51 -05:00
Sam Harwell
35ef516e28
Add some assertions
2013-05-14 09:58:02 -05:00
Sam Harwell
c0d1fcc110
Use 0-based indexing for decision lookahead so we aren't wasting memory, and array indexing is now consistent with ATN state outgoing transitions indexing
2013-05-14 09:57:04 -05:00
Sam Harwell
33c316baa4
Use a called rule stack to prevent stack overflow in LL1Analyzer
2013-05-14 09:54:27 -05:00
Terence Parr
5e472f253b
Merge pull request #251 from sharwell/test-updates
...
Test updates
2013-05-13 18:28:59 -07:00
Sam Harwell
32d4c85f0f
Rethrow unit test execution exceptions wrapped in a RuntimeException
2013-05-13 20:27:50 -05:00
Sam Harwell
af59f35481
Count full context transitions in statistics
2013-05-13 20:27:18 -05:00
Sam Harwell
0652b61a33
Default to FILE_GRANULARITY=true
2013-05-12 18:07:35 -05:00
Sam Harwell
0fac5ce133
Use System.nanoTime for more precise timing results
2013-05-12 17:52:23 -05:00
Sam Harwell
3694d51c4e
Don't try to report detailed statistics for empty states (fixes exception in lexer stats reporting)
2013-05-12 17:48:33 -05:00
Sam Harwell
9ea4747524
Call Future.get() to propagate exceptions so it's easier to spot problems
2013-05-12 17:46:55 -05:00
Terence Parr
ac7cc7daaf
Merge pull request #247 from sharwell/parallel-testing
...
Parallel testing updates
2013-05-05 12:32:56 -07:00
Terence Parr
e1dfa24b8d
Merge pull request #246 from sharwell/murmurhash
...
MurmurHash
2013-05-05 12:32:44 -07:00
Sam Harwell
d67d924b0d
Update additional classes to use MurmurHash hashing
2013-05-05 14:21:42 -05:00
Sam Harwell
fc21b41afb
Update PredictionContext to use the MurmurHash 3 hash algorithm
2013-05-05 14:21:41 -05:00
Sam Harwell
a7d2838838
Add a default title to the TreeViewer dialog
2013-05-01 22:38:36 -05:00
Sam Harwell
2fe7804ee3
Tweak TreeViewer layout since the zoom slider only affects the visual layout
2013-05-01 22:38:05 -05:00
Bart Kiers
9a75c629d2
Added JTree to TreeViewer.
2013-05-01 22:14:12 -05:00
Sam Harwell
d75f8e9aa3
Add the DETAILED_DFA_STATE_STATS option to TestPerformance, which shows a breakdown of DFA states by rule (parsers) or mode (lexers)
2013-05-01 22:06:00 -05:00
Sam Harwell
d147e9202d
Use ->skip instead of ->channel(HIDDEN) to ensure reported token counts correspond to the number of parsed tokens in TestPerformance
2013-05-01 22:02:26 -05:00
Sam Harwell
28abae9cfb
Add the TIME_PARSE_ONLY flag to TestPerformance
2013-04-30 22:03:49 -05:00
Sam Harwell
cc0d050622
Display the current pass number in TestPerformance result summary (helps monitor progress on very long runs)
2013-04-30 22:00:35 -05:00
Sam Harwell
3558151e56
Support parallelizing TestPerformance across passes instead of across files (controlled by the FILE_GRANULARITY flag)
2013-04-30 21:58:32 -05:00
Sam Harwell
4dfa245898
Added the COMPUTE_TIMING_STATS and TIMING_CUMULATIVE options to TestPerformance (disabled by default)
2013-04-30 21:53:30 -05:00
Sam Harwell
8f7c43fbf6
Support computing and displaying transition statistics
2013-04-30 21:48:51 -05:00
Sam Harwell
be57daa108
Remove unnecessary reflection, fix option to not reuse DFA
2013-04-30 21:41:55 -05:00
Sam Harwell
646f673d84
Track token count separately for each pass
2013-04-30 21:35:10 -05:00
Terence Parr
eb9eb17aa2
inline predictATN into adaptivePredict
2013-04-25 17:39:37 -07:00
Terence Parr
c9ceb48a3c
Merge pull request #235 from sharwell/prediction-fixes
...
Prediction fixes
2013-04-24 11:03:53 -07:00
Sam Harwell
dda9ed9fab
Remove unnecessary null checks
2013-04-24 12:48:09 -05:00
Sam Harwell
5821747a42
Add TestPerformance.COMPUTE_TRANSITION_STATS
2013-04-24 12:47:25 -05:00
Sam Harwell
ca0b0ae74c
Extract methods getExistingTargetState and computeTargetState
2013-04-24 12:42:18 -05:00
Sam Harwell
f015942b5e
* Simplify creation of new DFA edges - only create the target state and let DFA code check for termination conditions
...
* Fix handling of previously cached error edges (always need to check previous state for reaching a rule stop state)
* Fix DFA created during SLL-only parsing (should be identical to the DFA created by full LL parsing)
2013-04-24 12:29:43 -05:00
Sam Harwell
297754fff5
Updated documentation for addDFAEdge and addDFAState
2013-04-24 12:18:18 -05:00
Sam Harwell
1a07a6b6fa
Improved encapsulation in ParserATNSimulator
2013-04-24 12:18:17 -05:00
Sam Harwell
ef8b10ebc4
Cleanup and encapsulation in LexerATNSimulator
2013-04-24 12:18:13 -05:00
Sam Harwell
25676332fb
Remove unused and undocumented method DFA.getATNStatesAlongPath
2013-04-24 10:32:51 -05:00
Sam Harwell
15577fd21f
Remove unnecessary method ParserInterpreter.predictATN
2013-04-24 10:32:20 -05:00