Pegged: Syntax Highlighting

Andrej Mitrovic andrej.mitrovich at gmail.com
Wed Mar 28 09:06:14 PDT 2012


On 3/28/12, Andrej Mitrovic <andrej.mitrovich at gmail.com> wrote:
> On 3/28/12, Andrej Mitrovic <andrej.mitrovich at gmail.com> wrote:
>> On 3/27/12, Philippe Sigaud <philippe.sigaud at gmail.com> wrote:
>>> snip
>>
>> Philippe your example on this wiki page doesn't seem to work:
>> https://github.com/PhilippeSigaud/Pegged/wiki/
>
> Actually it seems to work if I remove all the spaces from the input
> string. Maybe the grammar is just missing another rule that allows
> spaces?

Okay I got it, you've recently changed some code. I can see it
mentioned in the readme:

By default, the grammars do not silently consume spaces, as this is
the standard behavior for PEGs. There is an opt-out though, with the
simple `<` arrow instead of `<-` (you can see it in the previous
example)

So yeah, if I change to '<' it works. :)


More information about the Digitalmars-d-announce mailing list