kach / nearley

📜🔜🌲 Simple, fast, powerful parser toolkit for JavaScript.
https://nearley.js.org
MIT License
3.57k stars 231 forks source link

How to match end of input? #626

Open gajus opened 1 year ago

gajus commented 1 year ago

I need to distinguish between a whitespace and an empty string, i.e. foo:, foo:bar and foo: (this one has space) need to be treated differently.

Is there a special keyword for end of input?

PoolloverNathan commented 1 year ago

This repository seems dead, but if someone is still around, I would like to propose syntax: