Skip to content

Don't understand grammar #1033

Answered by HoloTheDrunk
qknight asked this question in Q&A
Aug 13, 2024 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

Hello, as per the pest book, the pipe | operator is an ordered choice.
Removing the silencing from your rules helps to see what's happening:

- us_number
  - L > D13: "312"
  - D13: "234"

The L ~ D13 sequence parses correctly so the entire ordered choice collapses into its result, in this case 6 numbers in a row.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by tomtau
Comment options

You must be logged in to vote
1 reply
@HoloTheDrunk
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants
Converted from issue

This discussion was converted from issue #1032 on August 16, 2024 07:59.