On Apr 17, 2:47 pm, Joep Suijs <[email protected]> wrote:
>
> I use 'consume' but do not run whole files, just code parts that are
> not parsed according to my expectations. When it is a larger code
> block, you could just jump to the end and look at the parser and ast
> (which are impressive too!). Then remove parts that are not relevant
> and step through the smaller code blocks.
>

Thanks, just the sort of tips I was looking for.

> And btw, is CANbus related to your tractor problem? ;)

Good question.  No, so far, I've resisted the urge to install any JAL
code in my 1957 Massey-Ferguson tractor. I will confess to replacing
its generator with a Datsun alternator though. :-)

> First of all, there are a few issues with JAL grammar that are make it
> more difficult to process. E.g. calling a function without parenthesis
> will not be recognised as such and the include name without quotes or
> other separator does require a hack (and that's undoubtable the reason
> you have to put the filename at the same line - a requirement that is
> uncommon in JAL).

I suppose we should start gathering these sorts of details in a
document. I tend to jot things down on napkins and then misplace them.

> But there are also other issues. What happens if you have 'for 8 using
> x loop' and modify x in the loop? This is not documented.

In the early days of C, there were things that were specified listed
as 'undocumented behavior', so as to warn users not to do such things.

> And last but not least, we need a way to add code that is copied to
> the c-source (like include statements and directives that don't have a
> JAL equivalent) and maybe even instructions to the parser.

I agree we'll need something like this. But I would hope this would be
used very sparingly, perhaps just in the equivalent of a 'device file'
for a new chip.

> Anyway, I started with 'code generator' functions (don't know if that
> is a good name - suggestions are welcome), that walk the AST and emit
> text that will become compilable c-code. And although complete JAL
> support is still a long way, first expressions with variable types
> that are available in C are visible at the horizon ;)

Code generator sounds fine to me.  If you'll make a start, and check
it into SVN, perhaps I can help on some of this, once I see how to go
about it. Meanwhile it is back to gardening for me. :-)

Thank you,

William

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to