aboutsummaryrefslogtreecommitdiff
path: root/compiler/ast_test.go (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Use new parser and DFA compilerRyo Nihei2021-12-101-198/+0
|
* Improve performance of the symbolPositionSetRyo Nihei2021-05-041-2/+2
| | | | | | | | | | When using a map to represent a set, performance degrades due to the increased number of calls of runtime.mapassign. Especially when the number of symbols is large, as in compiling a pattern that contains character properties like \p{Letter}, adding elements to the set alone may take several tens of seconds of CPU time. Therefore, this commit solves this problem by changing the representation of the set from map to array.
* Increase the maximum number of symbol positions per patternRyo Nihei2021-04-121-0/+73
| | | | | This commit increases the maximum number of symbol positions per pattern to 2^15 (= 32,768). When the limit is exceeded, the parse method returns an error.
* RefactoringRyo Nihei2021-02-251-20/+20
| | | | | | * Remove token field from symbolNode * Simplify notation of nested nodes * Simplify arguments of newSymbolNode()
* Add + and ? operatorsRyo Nihei2021-02-201-0/+6
| | | | | * a+ matches 'a' one or more times. This is equivalent to aa*. * a? matches 'a' zero or one time.
* Fix computation of last positionsRyo Nihei2021-02-171-0/+119