-
Notifications
You must be signed in to change notification settings - Fork 0
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
Generate proper precede requirement based on layout follow restriction #9
Conversation
In the middle of the night, while in vacation my mind suddenly jumped to: we shouldn't use |
Fixed in the subsequent two commits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Davy, I think this PR is now ready for review by you. The commit messages should provide a high-level summary of what changed.
I've tried to isolate the changes in a way that avoids merge conflicts with the other open branches. Notably, there's a new module with functions to compute first/last/precede/follow sets. I reckon other parts of the analysis code can be simplified a bit by using this new module, but let's do that in a separate smaller PR, when the other open branches are merged (I left a TODO in the code so as not to forget).
? union(\set, firstOf(t)) | ||
: ret[delabel(h)]; | ||
solve (ret) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: solve returns the solved value, so this can become: return solve(ret)...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I played a bit with this just now, but it seems solve
doesn't always return a value (it doesn't in the cases of this PR). I submitted an issue basically to update the docs (it seems by design instead of a bug).
LGTM, @sungshik |
I noticed that on rascal we were getting stuff like
int aer32 = 34
where32
was highlighted as a number.I got around that by using the
\b
separator, and rewriting the grammar a bit while doing it. It might be a worthy inspiration, but just parking it here.