This project has moved and is read-only. For the latest updates, please go here.

How to make grammar accept arbitrary string before a whitespace at the beginning of the line?

Nov 3, 2011 at 2:10 PM

We making a grammar to parse a syntax construct of Russian language.

We want our grammar to accept an arbitrary string at the beginning of the line, then the whitespace, then the rest of the line. How can we achieve that? Neither FreeTextLiteral or StringLiteral doesn't seem to work in our case. Please hlp

Nov 3, 2011 at 5:13 PM

FreeTextLiteral should work. You need 2 instances of this terminal, one for the first word with space as a terminator, and another for the rest of the line with \r\n as a terminator. You'd need to setup option flags properly on each of them.