Am 10.03.2014 02:28, schrieb Aditya Shah:
@asmeurer, I respectfully disagree. Using a python file to represent the
grammar forces the user to understand and know the format of the file.
Yes, but with a Python file he knows the format already.
Also, should the current Parser generator Framework needs be replaced in
future (discontinued or any similar reason),
Using EBNF as input doesn't eliminate modgrammar, so we're hosed anyway
if modgrammar goes away.
You're right in that using Python means we're tied to modgrammar and
can't easily replace it if we grow discontent with it.
However, I think it's worth a shot. Software isn't just engineering,
it's sometimes experimenting.
Plus, if we specify
the grammar as I have mentioned in the proposal, it allows the user to
directly use EBNF (Extended Backus-Naur Form) which is a standard way to
represent CFGs (Context Free Grammars).
I have yet to see an EBNF that didn't use extensions of one or the other
form, so these would have to be learned.
Also, the other important part is the transformation rules, i.e. how to
translate the input to a common data structure. The syntax for these
transformation rules is not standardized.
IOW the burden on the user is marginal.
Also, learning Python APIs isn't that hard if they are designed well. I
suspect that you're pushing for an EBNF because you're more used to that
from your background, and we're pushing towards Python because we're
used to that; I bet SymPy users will prefer Python, too.
> I hope this justifies my using such
an arrangement.
Using an EBNF is adding two(!) additional layers of software for a
marginal advantage.
In my eyes, that's most likely a net loss.
Let me suggest you start without the EBNF part. If modgrammar turns out
to be too nasty, the EBNF parser + modgrammar generator layers can still
be added later; at that time, you'll also have collected experience with
what does and what does not work with modgrammar, so the generators will
be easier to write and more reliable in operation. Also, there's the
option of replacing modgrammar with spark, which is the other contender
in the GLR arena.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/531D61F1.1070509%40durchholz.org.
For more options, visit https://groups.google.com/d/optout.