[TxMt] Re: Composable grammars

Martin Kühl martin.kuehl at gmail.com
Thu Apr 7 14:47:47 UTC 2016

On 7 April 2016 at 13:48, Jacob Carlborg <doob at me.com> wrote:
> On 2016-04-07 11:27, Martin Kühl wrote:
>> I tried to approximate something like this with my Maude grammar[1].
>> 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.

Unfortunately, I believe you understand correctly.

More information about the textmate mailing list