Skip to content
Discussion options

You must be logged in to vote

Hi @mrtnstn,

thanks for the compliment :)

You're right in your assumption that Langium doesn't respect syntactic predicates. They are only in there for the purpose of Xtext "backwards compatibility". The issue here is based on our underlying parser library Chevrotain and is twofold:

  1. Chevrotain always tries to pick the first fitting alternative to match (and not the longest), resulting in very little need to actually support syntactic predicates compared to something like Xtext/ANTLR3
  2. As Chevrotain is an LL(k) parser library (see the PR to change this), it cannot support syntactic predicates such as ID =>(('.' ID)* ':' ID)?; at all, a more powerful approach (ANTLR3/4 style LL(*)) is needed.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@snarkipus
Comment options

@msujew
Comment options

@snarkipus
Comment options

Answer selected by mrtnstn
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants