Skip to content

Improvements: review antlr grammar and parsing #338

Description

@cmoulliard

Improvements

Parsing

On the generic of find all, what I see is that each new entity requires dedicated code: an if/case in parse(), a buildFindAllXxxRecipe(), and potentially an extractXxxResults() for each DataTable type. This means find all java.annotation, find all java.method, etc. will each need their own code block.
This remark is also true for every existing scanner as it is needed to :
translate the antlr query to its scanner request -> execute -> collect results -> generate/extractResults -> mtool report

Antlr grammar

The new clause with FIND? 'all'? is backwards compatible, good. But there is one concern as assignmentOp includes all as an operator at the same level as 'is' and '='. I don't understand the semantic meaning of all as an assignment operator, what would java.annotation all '@SpringBootApplication' mean ? I think all only makes sense as a quantifier in find all, not as an operator.

The ANTLR grammar accepts any find all . combination, but the scanner only handles java.class, so the parser will accept queries that the backend doesn't know how to execute yet, we need a backend mechanism able to scale.

Originally posted by @aureamunoz in #337 (review)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions