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

[SOLVED / EDITED] I wanted to clarify something regarding the use of OR #27

Closed
xDGameStudios opened this issue Mar 14, 2018 · 3 comments

Comments

@xDGameStudios
Copy link

I have something like this in pseudo code.

property = identifier + (equalsign + value).optional

method = identifier + openparenthesis + arguments + closeparenthesis;

member = method.or(property) + terminator

this doesn't seem to work with the error "unexpected equalsign expected openparenthesis"... when I have a property...would it be because of the identifier being common to both (property and method). or am I doing something wrong?!

@xDGameStudios xDGameStudios changed the title I wanted to clarify something regarding the use of OR [SOLVED / EDITED] I wanted to clarify something regarding the use of OR Mar 14, 2018
@nblumhardt
Copy link
Member

Hi! If you still need a hand with this, some kind of repro or code snippets might be needed. It's often a bit of a debugging task though - one tactic I often use is to break the grammar into small parsers and test the error reporting in each one individually. This might pinpoint what's going wrong. Cheers!

@faina09
Copy link

faina09 commented Apr 18, 2018

I have a similar issue, and yes, the problem seems to be "because of the identifier being common" (one or more). The solution is to use TRY:

member = method.Try().Or(property) + terminator

@nblumhardt
Copy link
Member

Sounds like this is solved; please let us know if you still need a hand with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants