Skip to content
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

Broken cstNode calculation #1361

Open
cdietrich opened this issue Jan 29, 2024 · 2 comments
Open

Broken cstNode calculation #1361

cdietrich opened this issue Jan 29, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@cdietrich
Copy link
Contributor

given the grammar

grammar HelloWorld

entry Expression:
    HasValue;

HasValue infers Expression:
    DotExpression({infer HasValue.left=current} 'has-value')*;

DotExpression infers Expression:
    RefExpression ({infer DotExpression.base = current} '.' target=DotTarget)*;

RefExpression:
    target=ID;

DotTarget:
   {infer DotTargetRef} ref=ID;

ID returns string: RawId | EscapedId;

hidden terminal WS: /\s+/;
terminal RawId: /[_a-zA-Z][\w_-]*/;
terminal EscapedId: /`[^`]*`/;

hidden terminal ML_COMMENT: /\/\*[\s\S]*?\*\//;
hidden terminal SL_COMMENT: /\/\/[^\n\r]*/;

and sample model

bs.cs.xx has-value

the cst-node for the dot expression

bs.cs.xx

is .xx and as not expected bs.cs.xx

@cdietrich cdietrich added the bug Something isn't working label Jan 29, 2024
@msujew
Copy link
Contributor

msujew commented Jan 31, 2024

Might be related to #932.

@lars-reimann
Copy link
Contributor

It also seems to be related to #1218.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants