Re: Arithmetic expressions w. recursive descent parser?



bmildh@xxxxxxxxxxxxx wrote:

> The problem is that I cant get the implementation right with +,- in
> combination w. numbers starting w. + or -, eg. -45, +3, etc.
> I would appreciate any help, pointers, tips, on how to get the + and -
> operator correctly implemented with numbers that could start with + or
> - .

I think this problem is solved in PL/0,
the tiny compiler by Niklaus Wirth which
was published in 1976:

http://www.saar.de/~awa/images/pl0-12.gif
http://www.saar.de/~awa/pl0-synt.htm

This web page also contains Java source code.

.



Relevant Pages

  • Re: spv m500 - mms
    ... noticed the in box outbox and sent etc - cant find them now ... can you give me a few pointers ... Prev by Date: ...
    (uk.telecom.mobile)
  • Re: Generic linked list with internal storage?
    ... typedef struct node_t { ... node_t *prev; ... or discrete head/tail pointers of type ... and cast back to the specific types in your callback function. ...
    (comp.lang.c)
  • Re: Naming curiosity
    ... void *head; ... I don't use a recursive structure using pointers to the structure itself ... struct sList *prev; ... misunderstand the real purpose of the head field. ...
    (comp.lang.c)
  • Re: Naming curiosity
    ... Lorenzo Villari wrote: ... The structure is just as recursive even if you lie about ... the types of the pointers. ...
    (comp.lang.c)
  • Re: [PATCH][RT] 2.6.24-rc2-rt1 drivers/dma/ioat_dma.c compile fix
    ... I'm not positive about the insertion point... ... compile error fix (needs review) ... RT changes __list_splice to require prev and next pointers. ...
    (Linux-Kernel)