[colug-432] Compiler compiler?

Jeff Frontz jeff.frontz at gmail.com
Wed Sep 5 18:25:39 EDT 2012


When you say "compiler compiler", do you mean yacc?  If so, then, yes,
you can theoretically detect multiple syntax errors using yacc.  But
your language and/or yacc code has to be smart enough to allow that
(e.g., your language has the ability to easily recognize a good spot
to resynchronize the parsing and/or your yacc code is smart enough to
guess at a good resynchronization point).  See the "error" symbol and
"yyerrok" in the yacc (or, if you're so inclined, bison) docs.

I vaguely recall that some language-sensitive editors (anybody
remember TPU?) can do this and that they have some ability to specify
the source language's grammar.

But, thinking about the problem in a different way, can you identify
the original target environment for the software you're trying to
build (and then install that environment on a virtual machine and do
your stuff there)?


Jeff


On Wed, Sep 5, 2012 at 5:38 PM, Vince Herried <Vince at planetvince.com> wrote:
> I write programs in a language called LInden Scripting language (LSL), that
> runs on Second Life.
> Their program development environment consisted of a simple text editor and
> the save command.
> If one makes an error it is only found at save time, and them it only finds
> a single error.  Obviously this makes it
> time consuming to develop complex programs.
>
> Some one created a very fancy Eclipse plugin for LSL, called LslPlus.
> Unfortunately this project seems to have died.
> The plugin available from sourceforge is written in Haskell and Java.
> Trying to update it I get into a huge prerequisite
> list.  Eg, to compile module A, requires library component x1 version > 1.0
> and < 1.5.  So when I try to compile
> that x1 component I get another grumble.  After chasing down six or seven
> arrrg.  To top it off these things are
> written in Haskell.
>
>
> So finally my question.  Can one of the compilers generated by a
> compiler-compiler detect multiple syntax errors
> in one shot?  I don't really want it to generate any executable code,  just
> want it to know about all the built in
> functions, their arguments and the language syntax which is some what
> similiar to C with do, for and if constructs
> etc...  It also contains some strange data types as follows.
> vector  VectorVariable = <1.2, 3.4, 5.6>;
> and
> rotation RotationVariable = <1.2, 3.4, 5.6, 6.7>;
> and
> list ListVariable = ["list text",2.3,<1.2,3.4,5.6>];
>
>
> other examples:
> if ( a == b ) { a += 1; }
> // this is a comment
> for (i=0;i<n;i++) {
> //blah
> }
>
> on_rez(integer int) {
> // do something cool
> i++;
> llOwnerSay("Entered \"on_rez()\"");
> }
>
> So compiler compiler to  syntax check all in one shot???
>
> ---
> Vince
> _______________________________________________
> colug-432 mailing list
> colug-432 at colug.net
> http://lists.colug.net/mailman/listinfo/colug-432
>


More information about the colug-432 mailing list