-
Notifications
You must be signed in to change notification settings - Fork 785
Feature/retire lex helpers #2652
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
Feature/retire lex helpers #2652
Conversation
opengrok-indexer/src/main/java/org/opengrok/indexer/analysis/perl/PerlLexer.java
Outdated
Show resolved
Hide resolved
opengrok-indexer/src/main/java/org/opengrok/indexer/analysis/ruby/RubyLexer.java
Outdated
Show resolved
Hide resolved
opengrok-indexer/src/main/java/org/opengrok/indexer/analysis/perl/PerlLexer.java
Outdated
Show resolved
Hide resolved
opengrok-indexer/src/main/java/org/opengrok/indexer/analysis/ruby/RubyLexer.java
Outdated
Show resolved
Hide resolved
9c49f7f
to
e3da707
Compare
@@ -122,6 +103,66 @@ import org.opengrok.indexer.web.HtmlConsts; | |||
} | |||
|
|||
protected void skipLink(String s, Pattern p) { /* noop */ } | |||
|
|||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where are below functions used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They’re called by the abstract PerlLexer
extended by the Perl JFlex xref and symtok classes. Formerly the values were injected through the helper delegate constructor but now can be mediated through method overrides.
Missed a few because they were in-flight with enhancements -- or just plain missed, as with PlainSymbolTokenizer.
e3da707
to
3b46bc3
Compare
ok, let's merge, thank you! |
hopefully this didn't conflict with #2673 (resp. I hope vertilog didn't use these helpers ;-) ) @idodeclare Chris? |
No — all good, @tarzanek. Thank you, Lubos. |
Hello,
Please consider for integration this refactoring I finally got around to do after having unified the class hierarchy for xrefers and symbol tokenizers a while ago in 80ef15e.
The delegates I previously used in order to have common JFlex specifications for xref/symtok for Perl, Ruby, Ada, and Eiffel can now be subsumed as language-specific, common xref/symtok base classes (which was the intention of 80ef15e).
This way any interested parties who want to write analyzers don't have to concern themselves with the delegate pattern previously required when a common JFlex spec was desired (and which should be desired for analyzers going forward).
Additionally I caught a few places where single-char identifiers were not revised to be actively linked as was done for all other languages a year ago.
Thank you.