[TxMt] Re: Composable grammars
doob at me.com
Thu Apr 7 11:48:12 UTC 2016
On 2016-04-07 11:27, Martin Kühl wrote:
> I tried to approximate something like this with my Maude grammar.
> It's been a while, but I believe the basic idea was to split scopes into
> parts using lookaheads and -behinds and to include specific rules there.
> Take #equation as an example: An equation begins with `eq` and ends with
> `.`, but in between I can differentiate the left hand side from the
> right hand side using (entirely too many) lookarounds.
> Of course this only works because I can use `==` as a kind of anchor in
> between, I'm assuming most rules of the grammar you quoted above don't
> include any meaningful symbols but are mostly one (or, worse, possibly
> several) words.
> So this approach probably won't help you that much. It's just as far as I got.
If I understand you correctly, that will not work. I don't have anything
to use as an anchor in many places.
More information about the textmate