Hi Erik,

> It seems that symbols beginning with (or consisting only of) '+' are not
> parsed as
> a continuous (internal) symbol name.
> 
> But everything works as expected with '*':

This is intended. The same happens with '-' BTW.

The reason is that these two characters may also denote the sign of a number.
The parser cannot decide their meaning, and keeps them always separate.

The idea is that the caller decides, depending on language and context. For
example, is "3-4" an arithmetic expression (3 "-" 2) or just two numbers (2 -3)?

> Is there any way to get '++' to pass through as an internal symbol?

Here too the application layer must decide.

'read' is just a simple tokenizer, not a full parser. The latter would require
the specification of lots of rules, which are more easily handled if the
application operates on the returned lexical tokens.

☺/ A!ex

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to