Mel2py uses ply (pthon lex yacc). Maybe there are tools for converting  
this to bnf, but i doubt it would work very well.

To handle command syntax mel2py uses the mel help command to determine  
the command args and flag args as they are encountered.

Sent from my iPhone

On Jun 18, 2009, at 2:06 PM, Chris G <[email protected]> wrote:

> I think it may not be possible to do a complete BNF for Mel, because  
> the syntax is basically dynamic due to the built-in commands.  But  
> you could probably hack one together for a subset of at least the  
> context-free part...
> Actually, it looks like Chad has already done that =)
> http://code.google.com/p/pymel/source/browse/trunk/tools/mel2py/mellex.py
>
>
> On Thu, Jun 18, 2009 at 2:58 PM, yoDon <[email protected]> wrote:
>
> Is there any chance you built a BNF grammar for MEL as part of writing
> the MEL->Python translator?  If not, is there anyone who might be
> interested in trying to mangle, say, a javascript grammar into a MEL
> grammar?
>
> A BNF grammar would allow full intellisense for MEL in Visual Studio
> (not just keyword highlighting but full on the fly syntax support,
> including squiqqly red lines if you left off a semi colon or a closing
> back-tick, auto-completion, function parameter popups, etc.  (yeah, I
> know everyone here loves python but lets face it there's still going
> to be a lot of MEL to look at and maintain for a long time to come)
>
>
>
>
>
>
> >

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/python_inside_maya
-~----------~----~----~----~------~----~------~--~---

Reply via email to