| Computers Forum Index » Computer Languages (Misc) » New language pHone (PH1) ideas??... |
|
Page 1 of 1 |
|
| Author |
Message |
| Jacko... |
Posted: Wed Sep 09, 2009 3:58 pm |
|
|
|
Guest
|
Hi
I am developing a new language for on device programming of mobile
phones. At present this limits implementation to j2me. The syntax will
be list based, using [] as list delimiters. With a stack based
methodology using a stack of lists. This appears to be very flexible
with the keyword parse taking a following list from the encapsulating
input stream and placing it on stack. e.g. set lit lit lit [parse]
would set the literal word lit to the literal (later executed code)
parse, which gets the literal. [parse] as opposed to [lit] as [lit]
would be in error as it wants [lit [x]] .... for a literal code
sequence x. The excessive use of the word lit would be reduced setq
style by slot a word taking both to be lit.
There are a few things I would like more input on. These include:
local variables.
symbol table representation.
ITU-12 fast key entry using templates.
plus some other things I may not have thought of. could anyone point
me to a good resource of freeware (open license) java routines for
symbol tables which can be easily adapted for local symbol handling.
cheers jacko |
|
|
| Back to top |
|
|
|
| Jacko... |
Posted: Thu Sep 10, 2009 2:45 pm |
|
|
|
Guest
|
1. Looks like a list list pair hash table works good for the symbol
table (list pointer hash).
2. Local variables need a bit of thought. I think a list as stack with
manual push pop may be of most use.
3. Splitting the stack level adjustment on word exit into a default
per word nDROP with modifying words, with an emphasis on top end of
stack being for the easiest to recalculate parameters. e.g. the sum
would be under the argument list to sum with a default drop of one
done by a tail (remove head) of list.
4. The use of both postfix and prefix notation within procedures/words
is flexible. The ultimate irremovable lit x (prefix), with the
flexibility of postfix multi in/out parameters could work well. It
potentially does cause word duplication, but as with the default post
drop, a default pre parse could exist.
cheers jacko |
|
|
| Back to top |
|
|
|
|