A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/issues/2500 below:

[core] Clarify API for ANTLR based languages · Issue #2500 · pmd/pmd · GitHub

  • We should not expose antlr specific API into the PMD's node API (this is addressed by [core,swift] Refactor antlr implementation #2463)

  • AntlrTokenizer is internal but should be impl, because it is needed to implement a language
    based on antlr - at least AntlrTokenizer.getCharStreamFromSourceCode

  • AntlrBaseRule uses already a different concept than JavaccBasedRules
    (where is the visitor or is the rule a visitor?). This indicates missing work on API design
    in general.

    // // The following APIs are identical to those in JavaParserVisitorAdapter. // Due to Java single inheritance, it preferred to extend from the more // complex Rule base class instead of from relatively simple Visitor. //

    Note that because of [core] Add generic visitor interface in pmd-core #2589, we don't actually need language-specific base rule classes anymore. We could just have an AbstractVisitorRule on the model of the Antlr one (the antlr one doesn't need to exist), with a buildVisitor() method that returns an AstVisitor<RuleContext, ?>.

  • Open question: How can we extend the Antlr nodes (e.g. adding additional getters/attributes to expose some information for XPath)? The issue is, that they're all generated into the same file...

  • How does the impl API look like for Antlr-based languages? -> that leads to the documentation

  • This task probably depends on PMD 7.0.0 API

  • This task creates another refactoring task (implementing the proposed API).


  • RetroSearch is an open source project built by @garambo | Open a GitHub Issue

    Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

    HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4