I like this a lot. It's an adventurous rethinking by someone who
understands Marpa well, and I plan to study it. I will be very
interested in other's thoughts, preferences, etc. -- jeffrey
On 01/04/2014 11:05 AM, amon wrote:
In the last few days I've thrown together a prototype for Yet Another
DSL-frontend for Marpa. The design problems are solved quite
differently from the SLIF, as neither performance nor the quality of
error reports were deemed important for this prototype. The DSL is
therefore happy to autogenerate rule names for syntactic sugar like
inline quantifiers or nested rules. For me, the most important feature
is that actions are specified inside the grammar (and then "eval"'d).
Ultimately, the DSL intends to be (a) useful for prototyping of small
(programming-)languages without too much boilerplate code and (b) a
simpler interface for people not too familiar with parsing. It does
not intend to be an unrestricted interface to Marpa.
The project can be found on https://github.com/latk/Marpa-Inline, and
contains two examples in the "t/examples/" directory. A few topics are
not addressed by this prototype, most importantly:
* Error reporting
* Operator Associativity
* Events
Because of that (and the overengineered, buggy internals), I will
likely rewrite it. I would be glad to include any feedback the list
could offer in the rewrite. Especially, I'm not sure about:
* … disallowing non-ranked alternatives. This should feel more
comfortable for people familiar with regexes or procedural
parsing. I am aware that this throws away one of Marpa's major
strengths, but I see no use cases.
* … the name. Currently the classes reside in the
"MarpaX::DSL::InlineActions" namespace. The "MarpaX" namespace is
loosely organized, and e.g. has the `::Languages::Foo` section for
tools using Marpa operating on language Foo. What is the correct
section for alternative frontends? Would "::DSL::Foo" or
"::Frontend::Foo" be a good choice? Currently existing modules
fitting this categorization would be "MarpaX::Repa",
"MarpaX::Simple::Rules", "MarpaX::Lex::Easy", none of which are
well-named.
--
You received this message because you are subscribed to the Google
Groups "marpa parser" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to marpa-parser+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "marpa
parser" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to marpa-parser+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.