I would like to make syntactic differences between Spad
and interpreter smaller. Below few differences I
noticed:
Spad treats 'otherwise', 'when', 'exquo', 'div',
'suchthat', 'yield', 'leave', 'not', 'unless', 'until'
as keyword, interpreter not. 'otherwise', 'when', 'suchthat',
'yield', 'unless' are unused. Some day 'yield' will be
used for generators, so it makes sense to reserve it now
as keyword. But I would rather turn otherwise', 'when',
'suchthat' and 'unless' into normal identifiers.
'exquo' has several uses in algebra as operator. Currently
interprter treats it as a normal function. I think
in interpreter we should also make it into operator.
'div' is strange: in algebra it is only used as
a name for divisors. Maybe we should make it into
ordinary name?
Interpreter treats 'break', 'default', 'define', 'do', 'export',
'free', 'inline', 'local', 'macro', 'rule' as keywords,
but they are not keywords in Spad. 'macro' and 'break'
are handled specialy in Spad, but probably we should turn
all of them into keywords.
Shoe treats 'cross', 'of', 'structure' as keywords.
Interpreter treats diffretly _ (escape) followed by space:
in spad it introduces space into name, but in interpreter
such spaces are ignored. This has also effect for line
continuation, interpreter ignores leading spaces on
contination lines.
What do you think about following proposals:
- make 'exquo' and 'yield' into keywords in interprter.
- make 'break', 'default', 'define', 'do', 'export',
'free', 'inline', 'local', 'macro', 'rule' into
keywords in Spad
- turn 'otherwise', 'when', 'div', 'suchthat' and 'unless'
into ordinary names
- turn 'cross' into keyword (it is currently used in
algebra, so we would have to rename current uses, for
example to vectorProduct)
- eliminate special treatment of spaces after escape
in interpreter
BTW: This is just one part of differences. Eventually
I would like to use the same compiler for interpeter and
Spad (the only difference would be that interpeter should
be more forgiving for type errors (by automatically
inserting coercions). As first step I would like to
use the same scanner for Spad and interpreter. In
principle scanner could have two "modes", one for
Spad and one for interpreter. But using the same
rules is better...
--
Waldek Hebisch
[email protected]
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" 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/fricas-devel?hl=en.