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

'$' conflict between 'unaryTripleExpr' and 'tripleExprLabel' #14

Open
mistermboy opened this issue Feb 7, 2020 · 1 comment
Open

'$' conflict between 'unaryTripleExpr' and 'tripleExprLabel' #14

mistermboy opened this issue Feb 7, 2020 · 1 comment

Comments

@mistermboy
Copy link

Current grammar forces us to do things like this:

:User {
 $$:name  schema:name .
}
:Employee {
  &$:name ;
}

Instead of:

:User {
 $:name  schema:name .
}
:Employee {
  &:name ;
}

The problem is that there is a conflict with '$' token between this two rules:

  • [40] unaryTripleExpr ::= ('$' tripleExprLabel)? (tripleConstraint | bracketedTripleExpr) | include
  • [42] tripleExprLabel ::= '$' (iri | blankNode)

This also affects to rule number [50]:

  • [50] include::= '&' tripleExprLabel

'$' is repeated and should be removed in the rule [42]. If we removed '$' in the rule [40] we don't fix the conflict with the rule [50].

This problem is located in the master branch grammar and also in the shex2.1 branch grammar , but seems to be good in ShExDoc.g4 file

@ericprud
Copy link

ericprud commented Feb 10, 2020

we should s/\$/$$$/g so it parses spam subject lines like "earn $$$ now!"
though i guess your point is that we're already claiming to parse "$$".

The normative doc is the spec which specifies as a tripleExprLabel without a '$'. We need to make the grammar branch align with that.

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

2 participants