ast kind
- 'S' String Constant
- 'O' Object Constant
- '.' rexx expression yielding object (if .0 = 0 in text else in stems)
- '-' rexx expression yielding string (if .0 = 0 in text else in stems)
- '='
- '@'
- '#'
- '£'
- '<'
- '^'
- '!'
- '?'
offen
- rexx Variables scopes versus block nesting und interprets
- jBuf = File Contents Store formalisieren
- ??
Classes
- b: Block
- s: String
- o: Object
- f: File
- r: Run: execute some code with (or without) arguments, yield return value or output
Semantics
wsh: compile some separate units, and add the sequence of units to m.code
- kind: compile the following unit with this kind
- '*': everything is comment up to the next nl'$#'
- hook: extend wsh by
- if name is a registered hook (case insensitive!) execute the registered code
- otherwise (try to) execute
call wshHook<name> m, hook
- in both cases the hook gets the current instance of the compiler as argument, and can do i.e.:
- call compSepUnit m, ... to compile the following unit
- use m.scan to compile some code itself and add it to m.code (to be executed later)
- execute the already compile code, modify m.code etc.
op: Operators (all unary, except execution ???? by < or ^ which get arguments from £ expression)
- & variable Access→ Object: new: was only implicit, is it really necessary as expicit op?
- any → variableAccess of 2string
- r → returned value of execution of run, output is appended to stdOut, arguments are supplied only by £ expression, fail if no value returned
- o → dynamically as r
- else → fail
- @ 2run → Run:
- b → run = execution of the block
- r → identical Run
- f → run = read file and write each object read to stdOut,
- o → dynamically as r, f
- else → fail
- < 2file → File:
- f → identical file
- r → output of execution of run, arguments are supplied only by £ expression, returnValue is discarded
- s → fileSystem file with string as filespec
- b → 2file 2str block. new: before contents of block - now <@b or pipe syntax needed
- o → dynamically as r, f or s
- - 2string → String:
- s → identical String
- f → if all objects of f are Strings then concatenate f (with separating ' ') otherwise fail
- b, r → 2string of 2file
- o → dynamically as r, f or s
- ! singleton → Object:
- f → if f contains a single object then this object otherwise fail
- else → singleton of 2file
- ? 0or1 → Object:
- f → if f is empty then null else if f contains a single object then this object otherwise fail
- else → 0or1 of 2file
- . 2object → Object:
- b → singleton of output of execution of block
- s → stringValue as object
- else → identity
- % runOut: oRun object, if a result needed, output is used, with arguments if there is a call
- ^ runRet: oRun object, yielding return value, with arguments if there is a call
- ( close: bracket by ( ) or do end, if necessary internal only
- String oder Object je nach Anfangs . oder -, default abhängig von kind der expression
- sConst String Konstante → String
- name: variable access mit dem Name → Object
- block:
- /.../ kein Block sondern /BlockEnd
- {...} [...$] Variable access mit BlockKind =
- op+block: block kind vom letzten Operator bestimmt: <→=, andere→.
expR hängt von kind ab
- ., -: rexx expression, noDo+ ist Teil der expression und wird mit primaries zusammen konkatiniert (mit rexx space Logik)
- @: rexx statements primaries werden wie oben zusammenkonkatinert, als Teil von expressions in den statements
- =: skeleton noDo+ ist konstanter unveränderterter text mit primaries zusammen konkatiniert
- #: Literal Text, $ werden nicht interpretiert
unitR statements und expressions, in 0 - n Zeilen, abhängig von kind. für jede Expression wird ein statement generiert und dann alles ausgeführt
- .: jede Expression wird als Object auf stdOut geschrieben - falls ein table statement aktiv ist, wird jede expre in subexpressions aufgeteilt und in ein neuer Objekt abgelegt
- -, =: jede Expression wird als String auf stdOut geschrieben
- @: Expression werden als rexx Statements ausgeführt, Commas als rexxLineContinuation werden unterstützt
- #:
TextCopy
- .:
- -:
- =:
- @:
- #: