FIRST und FOLLOW II

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

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

FIRST(Expression) = {"(", "+", "-", "0".."9"}
FIRST(Term) = FIRST(Expression)
FIRST(Factor) = FIRST(Expression)
FIRST(Constant) = {"0".."9"}

FOLLOW(Expression) = {")", $}
FOLLOW(Term) = {"+", "-"} + FOLLOW(Expression)
FOLLOW(Factor) = {"*", "/"} + FOLLOW(Term)
FOLLOW(Constant) = FOLLOW(Factor)

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