On Apr 8, 1:35 am, Joep Suijs <[email protected]> wrote:
>
> It does work now and with your explanation and the syntax diagram, it
> becomes fun to play with this :) I like these kind of puzzels!
Great, I am glad to have your interest and help. I am a total
beginner with Antlr. I have perhaps 3 or 4 evenings worth of
'experience'. Soon, you'll be the expert I am sure.
>
> And indeed, there is probably much work to do to get all code of
> jallib parsed without errors. Did you think about case-sensetivity
> yet? And about actual execute include while you are parsing?
>
I haven't looked into processing include statements yet with Antlr. I
hope it won't be too hard. But at the moment I just was trying to see
how far we could get with the grammar itself. So I cheated, and wrote
a little pre-processor in Python to expand all of the includes and put
into a single, large, jal file for testing.
About case-sensitivity-- my two cents - not to worry right now -- in
the worst case, such errors will be caught further down the process by
the C compiler.
> I adapted proc_def so it supports no '()", and just '()' without
> params. Also, statement is optional (it is allowed to create a
> procedure with empty body). The new code is:
>
> proc_def : 'procedure' IDENTIFIER ( '(' ( proc_parm (',' proc_parm)*
> )? ')' )? 'is'
> statement*
> 'end' 'procedure'
> ;
>
> If you think it is okay, a similar change to function is apporiate
> (which also needs the return bit).
>
Nice improvements -- keep going -- make any changes you think are
good. I'll help out as time permits.
> Is this (mailing you the changed code) a convenient way for feedback?
> Or maybe put it under svn?
>
Do whatever you think is best-- if our project is 'welcome' here, that
is terrific and we can use SVN here. If not, we can find a new home
somewhere else.
Thank you!
William
ps: are you OK with Python for now? If not, it is only 2 or 3
statements near the top of the grammar file to switch to a different
output language.
--
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.