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

field projecten of complex lexical syntax types (nested sequences) does not work in the interpreter #1431

Open
jurgenvinju opened this issue Jul 29, 2020 · 0 comments
Assignees
Labels

Comments

@jurgenvinju
Copy link
Member

jurgenvinju commented Jul 29, 2020

Describe the bug

This is a lexical definition with a head field and a tail field.

lexical X = ([a-z] head [a-z]+ tail)+ words;

Instances of those trees should allow for field projection and field update like so:

X x = ...; if (y <- x.words) println(y.head);

But they don't. The reason is that the interpreter assumes all non-terminal types to be context-free and thus it skips layout positions which aren't there in a lexical tree (of a sequence combinator).

@jurgenvinju jurgenvinju self-assigned this Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant