I want to try to implement web template engine dustjs:
http://akdubya.github.io/dustjs/
At the first step implementing parser for it's grammar is needed.
As far as code for parsing grammar was generated via PEGjs
grammar generator the resulting code is enough long (about 4200
lines of code). I
Uranuz:
> http://akdubya.github.io/dustjs/
> So I need some help with rewriting grammar from PEGjs into PEGGED.
Is this the grammar?
https://github.com/akdubya/dustjs/blob/master/src/dust.pegjs
If so, then I think I can provide some help. But I don't get what
output you want (see below).
> Als
I am real noob about grammar description languages so I need some
explanation about it. As far as I understand expressions in curly
bracers are used to modify syntax tree just in process of parsing
instead of modifying it after?
How I could use PEGGED to map some code to these parsed
expressi
On Mon, Aug 4, 2014 at 7:13 AM, Uranuz via Digitalmars-d-learn
wrote:
> I am real noob about grammar description languages so I need some
> explanation about it. As far as I understand expressions in curly bracers
> are used to modify syntax tree just in process of parsing instead of
> modifying i
Different formats and also different languages. I don't see how
you
can compare a parse tree that's a D object and another tree
made by
dustjs: you never see the AST produced by dust, you only see the
resulting JS code.
Yes. That's a point. Thanks for all the explanations. I'll try to
make so
On Tuesday, 5 August 2014 at 08:13:25 UTC, Uranuz wrote:
Different formats and also different languages. I don't see
how you
can compare a parse tree that's a D object and another tree
made by
dustjs: you never see the AST produced by dust, you only see
the
resulting JS code.
Yes. That's a p
> Is there multiline comments available inside PEGGED template?
> As far as I understand inline comments are set via # sign.
No, no multiline comment. That's based on the original PEG grammar,
which allows only #-comments.
What I was thinking about is possibility to change ParseTree
struct with user-defined version of it. And I was thinking about
setting tree type as template parameter to grammar:
grammar!(MyParseTree)("
Arithmetic:
...
");
Or somethink like this. I think changing source code of library
in o
On Wed, Aug 6, 2014 at 9:09 AM, Uranuz via Digitalmars-d-learn
wrote:
> What I was thinking about is possibility to change ParseTree struct with
> user-defined version of it. And I was thinking about setting tree type as
> template parameter to grammar:
>
> grammar!(MyParseTree)("
> Arithmetic:
>