-
FindIncrements →DoIncrement
FindIncrements
FindIncrements →SkipIncrement
FindSubExprs FindSubExprs →Do
SubExpr FindSubExprs FindSubExprs →Skip
SubExpr Completed...
- ⟨ Stmt ⟩ → ⟨ Id ⟩ = ⟨
Expr ⟩ ; {\displaystyle \langle {\text{Stmt}}\rangle \to \langle {\text{Id}}\rangle =\langle {\text{
Expr}}\rangle ;}
replaces ⟨...
- program: S1: TST S3,'GO' ;GOTO OR GOSUB? TST S2,'TO' ;YES...TO, OR...
SUB CALL
EXPR ;GET
LABEL DONE ;ERROR IF CR NOT NEXT XFER ;SET UP AND JUMP S3: TST...
- evaluated. if (
expr )
block if (
expr )
block else
block if (
expr )
block elsif (
expr )
block ... else
block unless (
expr )
block unless (
expr )
block else...
- in Unix
programs at Bell Labs in the 1970s,
including lex, sed, AWK, and
expr, and in
other programs such as vi, and
Emacs (which has its own, incompatible...
- ]+ / '('
Expr ')'
Product ←
Expr (('*' / '/')
Expr)+ Sum ←
Expr (('+' / '-')
Expr)+
Expr ← Sum /
Product /
Value Unfortunately matching an
Expr requires...
- to
affect control flow at the
expression level:
expr and
expr expr &&
expr expr or
expr expr ||
expr (The "and" and "or"
operators are
similar to && and...
-
listed in (). For example:
expr_gen(ADD[
expr_gen(x),
expr_gen(y)]) => <AR + (x*16)+y;> releasereg(y);
return x; (
SUB[
expr_gen(x),
expr_gen(y)])=> <SR + (x*16)+y;>...
- .] ELSE
exprDflt END
works like if ... else if ... else,
whereas a "simple CASE" expression: CASE
expr WHEN val1 THEN expr1 [...] ELSE
exprDflt END works...
-
expressions with
multiplication and addition: <
expr> ::= <number> | (<
expr> * <
expr>) | (<
expr> + <
expr>) This says that an
expression is
either a number...