On Wed, 5 Dec 2007, Bill Page wrote: | | On 12/5/07, Gabriel Dos Reis wrote: | > | > On Wed, 5 Dec 2007, Bill Page wrote: | > | > | | > | On 12/5/07, Gabriel Dos Reis wrote: | > | > | > | > But, in this specific case, the layout rule in the Spad | > | > Syntax amounts to nothing close to 2 dimension. It is | > | > purely a 1-dimensional thing. | > | | > | ? But you said that it involved "lining up" - something that is | > | inherently at least 2 dimensional. | > | > No, it isn't inherently 2-dimensional. What it means is that | > one starts a newline (in the 1-dimensional stream of characters), | > leave as much blank as on at the start of the previous line | > and continue. | | How do you measure blank? How do you define start?
As defined by the Spad language -- in our case. | I know there are | algorithms (the ones I referred to as "serializations") that do this | by looking for markers (e.g. \n) and counting ' ' and/or \t, but I | think it is much easier to admit that when we see this on a page or on | the screen it is 2-dimensional. That is as 2-dimensional as a Java class source file. Is a Java class source file `conventional'? [...] | > | > There isn't even anything that I would consider | > | > `serialization' -- and I've written a Boot parser and a | > | > Spad parser in C++ over the last 6 months in my | > | > spare time. | > | | > | Granted the "serialization" in this case is intentionally | > | very simple and it does involved counting leading | > | whitespace in each line. | > | > I'm afraid you would have to detail what you call | > `serialization', because I don't see one. | > | | Here is a serialization of the example above: | | ( x ( x x ( x ( x ) ) x ) ) Oh, then compilers for any programming language I know of have something similar internally -- it is called an AST. -- Gaby ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _______________________________________________ open-axiom-devel mailing list open-axiom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open-axiom-devel