Skip to content

Allow for customized primary in ExpressionParser #10

@jdrem

Description

@jdrem

Some languages may have rules like:

expression : logicalExpression (logicalOp logicalExpression)?

logicalExpression : relation (relationalOp relation)?

relation : term (addOp term)?

term : factor (multOp factor)?

factor : (unaryOp) primary

primary : instantiation | variable | functionCall | literal     

instantiation : NEW ( namespaceIdentifier '.')? className 
     '(' (expression ( ',' expression ))? ')'
                                                      
functionCall :  identifier '(' (expression ( ',' expression))? ')'

How would you handle the instantaion or function call? We'd need to add customization so
these can be lexed/parsed as a primary element of the expression.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestwontfixThis will not be worked on

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions