[Oberon] ORP.set

Andreas Pirklbauer andreas_pirklbauer at yahoo.com
Wed Mar 13 00:20:09 CET 2019


    > This is how we handle it in the ARM Cortex-M compilers:
    >
    >      WHILE (sym < OSAS.rparen) & (sym # OSAS.rbrace) DO
    >        IF sym = OSAS.comma THEN OSAS.Get(sym)
    >        ELSE OSAS.Mark("missing comma")
    >        END;
    >        element(y); OSAG.SetOp(OSAS.plus, x, y)
    >      END

Oh! What order of the lexical symbols in OSAS are you using in your compiler?.

Because if it used the same order as defined in module ORS on RISC
(which is the same as in module OSAS of ref. [1], ch.27 on p.43), namely

  comma* = 40; colon* = 41; becomes* = 42; upto* = 43; rparen* = 44;
  rbrak* = 45; rbrace* = 46; then* = 47; of* = 48; do* = 49;

then your first condition (sym < OSAS.rparen) would imply the
second one (sym # OSAS.rbrace)...


[1] http://www.inf.ethz.ch/personal/wirth/Oberon/Oberon.ARM.Compiler.pdf




More information about the Oberon mailing list