Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
|
05-27-2005 12:51
Hi, I am developing an EBNF (Grammatica dialect) grammar file for LSL. The point of this exercise is to validate LSL scripts off-world from within my dev environment. Is anybody interested in helping me test this grammar definition as I am moving into alpha from dev status with it (or even better providing improvements/constructive critique if you have had experience of Backus-Naur Form)? Once it's reasonably solid I will open source it here with instructions for running the cross-platform validator and generating a vb/c sharp/java parser for LSL (which I have done for Java successfully already  ). If you are interested in helping at this fairly early stage, please contact me in-world or send a message to escort.defarge at gmail.com /esc PS. If you fancy adding the validation for Library signatures from E-X that would save my typing lol (I have only done A-D so far).
_____________________
http://slurl.com/secondlife/Together
|
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
|
05-29-2005 08:04
From: Escort DeFarge Hi,
I am developing an EBNF (Grammatica dialect) grammar file for LSL. The point of this exercise is to validate LSL scripts off-world from within my dev environment.
...
Have you asked the Lindens for some help? I know for a fact I've seen an offer by the devs, possibly during a town hall, to give the lex file to a user that thought they could improve LSL. Not only would it save you time to get their definition, but it would also save you mistakes. Trying to reverse engineer an EBNF for purposes of validation isn't necessarily a good way to go about this, because you're inevitably just implementing an empirical interpretation of the language, not the actual underlying and intended structure of the language (quirks and all). I'd suggest writing a Hotline post asking for the lex grammar file. I think you'd be surprised how willing they are to work with you.
|
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
|
05-29-2005 12:26
Thanks for the tip Lex. I may just try that.
Actually, I'm pretty far down the path, thanks to some excellent feedback, and hope to release the version 1.0 grammar and parser this week.
So far, it's been run over something like 200 scripts in various coding styles, and seems to catch most errors prior to getting to SL.
Right now, the library signatures look like a long haul... I think I'll write a simple utility to grab them off the wikki (could throw out a chm too...). Also I'd like to finish return path/return type checks before releasing here.
Yep, it would be invaluable to align the version I have to the actual lex grammar.
/esc
_____________________
http://slurl.com/secondlife/Together
|
Adam Zaius
Deus
Join date: 9 Jan 2004
Posts: 1,483
|
05-29-2005 13:37
Think you could throw the finished EBNF file my way? I'd be interested in writing a quick plugin into KATE that validates as-you-type.  -Adam
|
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
|
05-29-2005 14:21
Sure, Adam.
I can give you the current (0.5 development) version now, or will publish here when I think it's complete enough to be really useful.
If you'd like to do the KATE plugin in two passes and help debug the grammar file, that would be even... better... lol.
Mail or IM if you'd like an early copy.
/esc
_____________________
http://slurl.com/secondlife/Together
|
Adam Marker
new scripter
Join date: 2 Jan 2004
Posts: 104
|
05-29-2005 15:15
Instead of grabbing the library signatures off the wiki, you might also look at grabbing them from the LSL html manual. I found the formatting more consistent in the manual. I have some XSL that picks up all the functions/prototypes if that would help.
|