JavaScript: Rewrite regex parser and JSDoc parser in Java.#461
Merged
Conversation
added 3 commits
November 12, 2018 08:18
This is not so much because extractor output has changed (it hasn't, except for corner cases) but to disable trap caching so as to help us to flush out bugs.
|
LGTM from a cursory read. Do you need a thorough review for some parts of this? |
Author
No need to review the parsers themselves. The testing I've done gives me some confidence that they work well enough in practice, and any remaining corner cases should be caught by the next distribution upgrade in two weeks' time. |
|
|
||
| private Token scanString() throws ParseError { | ||
| StringBuilder str = new StringBuilder(); | ||
| int quote, ch, code, restore; //TODO review removal octal = false |
Contributor
There was a problem hiding this comment.
Did you mean to leave this TODO here, or was it just ported from doctrine?
ghost
approved these changes
Nov 14, 2018
cklin
pushed a commit
that referenced
this pull request
May 23, 2022
…cope Move reused barrier guards into separate files
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This eliminates the last bits of JavaScript in the extractor, so we will be able to get rid of our dependency on Rhino and doctrine (which I'd prefer to do in a separate PR).
The new parsers are faithful re-implementations of their JavaScript counterparts and produce the same TRAP on our default benchmarking suite, with the exception of a few bugs that I discovered in the old regex parser and some minor differences in the handling of non-ASCII whitespace in JSDoc comments that didn't seem worth bothering about.
I have verified that these differences do not affect results or performance, except for fixing a handful of false positives on the
test262test suite. Extractor performance improves a bit, but I don't have detailed measurements.