-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Faster Expression parser / Tokenizer with StringScanner #1844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
8ecb703
use StringScanner to improve Expression Parsing and Tokenizer
ggmichaelgo 1de6025
decrease the size of Expression2 LRU cache to store 5 themes
ggmichaelgo 0b1dc29
fix quirky negative sign expression markup parsing
ggmichaelgo 7c8a269
fix cycle tag not resetting
ggmichaelgo 92fa334
don't cache string expressions to be more perfomant
ggmichaelgo a672f38
don't cache literals for Expression parser
ggmichaelgo 19adfbd
don't force strscan 3.1
ggmichaelgo eff5c5d
code clean up
ggmichaelgo 3c16c27
add StringScannerPool for thread safety
ggmichaelgo 002e4ca
refactor Lexer to be static class function
ggmichaelgo 7c592c1
store StringScanner in ParseContext and reuse it through parsing
ggmichaelgo cef64e2
early match number expressions with Regex
ggmichaelgo 71506ad
avoid setting up StringScanner for parsing simple numbers
ggmichaelgo 4019102
initialize StringScanner with input for default
ggmichaelgo 91be3dd
keep the expression parse caching per document parsing
ggmichaelgo ac374a2
freeze Expression2 parse results
ggmichaelgo e05719f
use Kernel Integer parsing for simple Integer expression
ggmichaelgo 253ec81
don't add a breaking change to Parser constructor
ggmichaelgo 04bd9db
refactor Lexer to only take StringScanner
ggmichaelgo 0a17c15
freeze '-' VariableLookup in Expression
ggmichaelgo e9f8672
code styling
ggmichaelgo 313d017
code styling
ggmichaelgo 2c7d686
adding caching to context variable lookup
ggmichaelgo 42d822b
users can provide optional expression cache
ggmichaelgo d48708a
skip expression caching with Expression1
ggmichaelgo 7c9b77e
remove StringScanner version check in Lexer and Tokenizer
ggmichaelgo 97cada6
remove Expression2 strscan workaround
ggmichaelgo 0b8e30b
update unit test to be compatible with new source_location format
ggmichaelgo 2a5ecf0
remove lru_redux from Gemfile
ggmichaelgo bd05dfb
use lru_redux getset for simplicity
ggmichaelgo 2e236b0
fix expression cache to be compatible with Ruby Hash and LruCache
ggmichaelgo a07ae90
use Ruby Hash as default expression cache
ggmichaelgo 10114b3
minor version bump
ggmichaelgo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.