Skip to content

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

Merged
merged 7 commits into from
Feb 10, 2019

Conversation

idodeclare
Copy link
Contributor

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.

@coveralls
Copy link

coveralls commented Feb 1, 2019

Pull Request Test Coverage Report for Build 3996

  • 131 of 182 (71.98%) changed or added relevant lines in 9 files are covered.
  • 524 unchanged lines in 9 files lost coverage.
  • Overall coverage increased (+0.04%) to 73.389%

Changes Missing Coverage Covered Lines Changed/Added Lines %
opengrok-indexer/src/main/java/org/opengrok/indexer/analysis/eiffel/EiffelLexer.java 11 12 91.67%
opengrok-indexer/src/main/java/org/opengrok/indexer/analysis/perl/PerlLexer.java 58 59 98.31%
opengrok-indexer/src/main/java/org/opengrok/indexer/analysis/ruby/RubyLexer.java 47 96 48.96%
Files with Coverage Reduction New Missed Lines %
opengrok-indexer/target/generated-sources/jflex/org/opengrok/indexer/analysis/fortran/FortranXref.java 13 73.74%
opengrok-indexer/target/generated-sources/jflex/org/opengrok/indexer/analysis/ada/AdaSymbolTokenizer.java 26 78.37%
opengrok-indexer/target/generated-sources/jflex/org/opengrok/indexer/analysis/eiffel/EiffelXref.java 29 83.53%
opengrok-indexer/target/generated-sources/jflex/org/opengrok/indexer/analysis/eiffel/EiffelSymbolTokenizer.java 39 82.69%
opengrok-indexer/target/generated-sources/jflex/org/opengrok/indexer/analysis/ada/AdaXref.java 44 80.0%
opengrok-indexer/target/generated-sources/jflex/org/opengrok/indexer/analysis/perl/PerlSymbolTokenizer.java 55 87.12%
opengrok-indexer/target/generated-sources/jflex/org/opengrok/indexer/analysis/perl/PerlXref.java 57 86.07%
opengrok-indexer/target/generated-sources/jflex/org/opengrok/indexer/analysis/ruby/RubyXref.java 128 58.28%
opengrok-indexer/target/generated-sources/jflex/org/opengrok/indexer/analysis/ruby/RubySymbolTokenizer.java 133 58.84%
Totals Coverage Status
Change from base Build 3993: 0.04%
Covered Lines: 32860
Relevant Lines: 44775

💛 - Coveralls

@idodeclare idodeclare force-pushed the feature/retire_lex_helpers branch 3 times, most recently from 9c49f7f to e3da707 Compare February 5, 2019 22:57
@tarzanek tarzanek added this to the 1.2 milestone Feb 8, 2019
@@ -122,6 +103,66 @@ import org.opengrok.indexer.web.HtmlConsts;
}

protected void skipLink(String s, Pattern p) { /* noop */ }

/**
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@idodeclare idodeclare force-pushed the feature/retire_lex_helpers branch from e3da707 to 3b46bc3 Compare February 9, 2019 16:47
@tarzanek
Copy link
Contributor

ok, let's merge, thank you!

@tarzanek tarzanek merged commit 6dc1480 into oracle:master Feb 10, 2019
@tarzanek
Copy link
Contributor

tarzanek commented Feb 10, 2019

hopefully this didn't conflict with #2673 (resp. I hope vertilog didn't use these helpers ;-) ) @idodeclare Chris?

@idodeclare
Copy link
Contributor Author

No — all good, @tarzanek. Thank you, Lubos.

@idodeclare idodeclare deleted the feature/retire_lex_helpers branch February 10, 2019 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants