|Creating an interpreter for a Logo-like language on MacOS X email@example.com (Erika) (2003-03-30)|
|Re: Creating an interpreter for a Logo-like language on MacOS X firstname.lastname@example.org (2003-03-30)|
|Re: Creating an interpreter for a Logo-like language on MacOS X email@example.com (2003-03-30)|
|Re: Creating an interpreter for a Logo-like language on MacOS X firstname.lastname@example.org (Erica Mackenzie) (2003-04-05)|
|Date:||30 Mar 2003 00:47:34 -0500|
|Posted-Date:||30 Mar 2003 00:47:34 EST|
I am trying to Port an interpreter for a Logo - like language from
Mac OS to Mac OSX, and because that also means a jump from C++/ Mac
toolbox to an object - oriented Objective-C/ Cocoa framework, I find
myself essentially rewriting it from the ground up.
I have been doing some looking around and reading as much as I can,
and there seem to be several options, but as I am only a beginner and
don't know my LR from my LALR as it were, and I don't think I have the
skill to write a parser from scratch, although I heal confident that I
can write a lexer, and as I don't know which of the available
parser-generators would be the easiest the use and most appropriate
for my needs, I would appreciate some pointers. I am a bedridden
invalid suffering from an auto-immune neurological condition, and that
increases my difficulties enormously. I am doing this big keep my hand
in, but it needs to be made as easy as possible, or I will not to be
able to manage it.
The language is simple toy language, more or less like Logo in its
scope, but with indentation taking the place of braces such as in
functions or ' if - else' constructs, a little like Python. It has
loop functions, and more complex C - style functions (I think the
arguments are passed by value), and functions can be nested. It is
loosely typed, and relies on new-lines and indentation rather than
Lke Logo, it focuses heavily on turtle graphics and list processing,
and therefore needs to translate into various Cocoa graphics methods
and not just standard ANSI C functions or library calls. I am also
hoping that the output of any parser-generator can be in the form of C
code (to the extent that C can handle the input) rather object code so
that maybe I can divide it up between various sub-classes and insert
it as code snippets within my methods, and so maintain the object -
oriented structure off my application. I have no idea whether this is
reasonable, or indeed possible, but Eli and PCCTS both advertise
themselves as very flexible.
So much for the background; now for my specific questions:
: - Which kind of parsing algorithm would to be most appropriate for my
needs, LR, LALR, top-down, bottom-up, or which, how and why <g>?
: - For a parser-generator/ Tree - Walker (please pardon any imprecise
terminology - I am still reading, studying and learning) - would Eli,
Bison, Yacc, PCCTS or ANTLR best suit my needs? as I said before,
I don't really want an object code output.
: - what to our if the essential differences between Eli, PCCTS and ANTLR?
Are there others I have missed?
: - So far I have not been able to get ANTLR Java source to compile on
OS X - it seems to be x86 - specific, and to to have been intended to
compile on Linux. I did everything I could think of to the make-file
and all other relevant files in the package without success. I have
the others compiled to but have not used them yet. I wanted to post to
this group first and get expert advice on which one to devote my
energies to learning.
: - any other advice would be more than welcome; I feel as if I have bitten
off rather more than I can chew <g>, but I am still determined to go on if
-o- IMPORTANT NOTICE -o-
Please do not be surprised or annoyed if I fail to answer your
post for some time. I am a chronic invalid, and am often unable
to use my computer for long periods (days, weeks or months).
Be assured that I will, however, reply as soon as I can if I can.
Return to the
Search the comp.compilers archives again.