U E D R , A S I H C RSS

NewCompileError/2014_05_24 (rev. 1.8)

New Compile Error/2014_05_24


< EBNF >
 Expr ::= Term([+|-] Expr)?
 Term ::= Factor ([*|/] Term)?
 Factor :: = (Expr)
           | Value
 Value ::= Integer | Double

< Synthesis, Inherit >
 Expr  ::= Term
  (s) expr.isDouble = term.isDouble
  (i) term.type = if expr.isDouble then double else int

 Expr1 ::= Term [+-] Expr2
  (s) expr1.isDouble = term.isDouble or expr2.isDouble
  (i) term.type = expr1.isDouble then double else int
  (i) expr2.type = expr1.isDouble then double else int

 Factor ::= (Expr)
  (s) factor.isDouble = expr.isDouble
  (i) expr.type = factor.isDouble then double else int

 Factor ::= Value
  (s) factor.isDouble = value.isDouble
  (i) value.type = factor.isDouble then double else int

 Value :: Decimal Integer
  (s) value.isDouble = false
  (i) value.type = value.type == double then double else int

 Value :: Double
  (s) value.isDouble = true
  (i) value.type = value.type == double then double else int
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:23:51
Processing time 0.0316 sec