Ableitungen

 [Vorheriges Kapitel]  [Vorherige Seite]  [Inhaltsverzeichnis]  [Nächste Seite]  [Nächstes Kapitel]

Expression = Term .
Expression = Term "+" Expression .
Expression = Term "-" Expression .
Term = Factor .
Term = Factor "*" Term .
Term = Factor "/" Term .
Factor = "(" Expression ")" .
Factor = "+" Factor .
Factor = "-" Factor .
Factor = Constant .
Constant = "0" .
Constant = "1" .
...
Constant = "9" .

Wenn eine Grammatik vorgegeben ist, lassen sich leicht entsprechend der Produktionsregeln zulässige Sätze bilden:

ExpressionStartsymbol
Term "+" ExpressionExpression = Term "+" Expression
Factor "+" ExpressionTerm = Factor
Constant "+" ExpressionFactor = Constant
"1" "+" ExpressionConstant = "1"
"1" "+" TermExpression = Term
"1" "+" Factor "*" TermTerm = Factor "*" Term
"1" "+" Constant "*" TermFactor = Constant
"1" "+" "2" "*" TermConstant = "2"
"1" "+" "2" "*" FactorTerm = Factor
"1" "+" "2" "*" ConstantFactor = Constant
"1" "+" "2" "*" "3"Constant = "3"

 [Vorheriges Kapitel]  [Vorherige Seite]  [Inhaltsverzeichnis]  [Nächste Seite]  [Nächstes Kapitel]
Copyright © 1999 Andreas Borchert, in HTML konvertiert am 29.06.1999