[Laszlo-dev] I would like to help

Oliver Steele steele at laszlosystems.com
Mon Jan 3 09:18:10 PST 2005


On Dec 9, 2004, at 5:00 AM, Bruno Silva wrote:

> Well, i will start then by checking if it builds and runs on JavaCC
> 3.2. Any urgent deadline for this? I have to do this on my free time
> :)

Wow, did I really wait almost a month before replying?  I'm sorry, it's 
been a busy month, but I don't usually take that long (and hope not to 
in the future)!

There's no urgent deadline.  The sooner the better in that the sooner 
the build becomes easier, the sooner we will get other contributors, 
but this is something that can go into the tree at any point and will 
be available to anyone synching to the sources from the onwards.

Here's another JavaCC-related request, that has come up a lot recently: 
it's for optional type declarations, so that you can write:
   var a: Integer = 5;
   function f(a: Integer, b: String): Boolean {...}
instead of just:
   var a = 5; // a is an integer
   function f(a, b) {...} // a is an integer; b is a string; returns a 
boolean

Phase 1 of this would be unchecked type declarations --- they're there 
for documentation purposes only, but the compiler and the runtime don't 
pay attention to them.

This is very much a job for someone who understands (or is willing to 
learn) JavaCC.  The grammar is in 
laszlo/lps/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt.  The 
code generator, in laszlo/lps/WEB-INF/lps/server/sc/Compiler.py, would 
need to be changed too, but if someone is willing to handle the grammar 
side I can send them a patch to the code generator that will handle 
this.

> Bruno
>
>
> On Tue, 7 Dec 2004 18:32:21 -0500, Oliver Steele
> <steele at laszlosystems.com> wrote:
>>
>>
>> [I sent this a little while ago, but the diagram was too large so it
>> didn't go through.  Here's it is without the diagram in the meantime.]
>>
>> On Dec 7, 2004, at 5:11 PM, Bruno Silva wrote:
>>
>>> From the wiki, I understand you are using JavaCC to parse the text. I
>>> have already used in a small project, so if you want me to, i would
>>> give a look at that area.
>>
>> Right, we are using JavaCC, but not in this first stage of attribute
>> parsing.  The data flow looks roughly like this.  The "Node Compiler"
>> below is actually implemented as ViewCompiler and NodeModel.  The
>> NodeModel recognizes the ${} syntax, extracts the JavaScript 
>> expression
>> from between the ${ and }, and passes this extracted expression to the
>> script Parser.  But it's the extraction that's going wrong here.
>> [Diagram deleted.]
>>
>> By the way, we're using an old version of JavaCC (version 2.1).  Would
>> you be interested in seeing if Laszlo builds and runs with the most
>> recent version (JavaCC 3.2)?
>>
>>> According to the regexp
>>> "\s*$\s*(immediately|once|always)?\s*\{(.*)\}\s*",  something like "
>>> $   { df}    " would be ok or even "   $   { }   ", is this the
>>> expected behaviour??
>>
>> Good question.  This is an area where we get to specify it --- I'll
>> break that out into a separate thread.  The current spec just says no
>> whitespace at all, even at the ends, but I think this is clearly
>> broken.
>>
>>> By the way, is there a component repository
>>> already?  I think this is also a very important step for global
>>> adoption.
>>
>> That is.  There has been some discussion on this --- I'll try to find
>> out where it stands.  In the meantime, you can submit files to
>> http://mylaszlo.com, and list them in
>> http://openlaszlo.com/wiki/MyLaszlo_Directory.  (The directory is 
>> empty
>> today, but there are actually a number of applications and a few
>> components on MyLaszlo.)
>>
>> Best,
>> Oliver
>>
>> --
>> Oliver Steele
>> Chief Software Architect
>> Laszlo Systems, Inc.
>>
>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 3683 bytes
Desc: not available
Url : http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20050103/2fc02a61/attachment.bin


More information about the Laszlo-dev mailing list