Compiler 강의노트 CH8

유형주·2022년 4월 18일
0

Parsing

Context Free Grammar

  • A Language defined by a grammar G, G = (S, T, V, P)
    (V : set of nonterminals, T : set of terminals,
    S : set of start Symbols, P : set of production rules),
    P= {A->x} where A (=V, x(= (V U T)*

example)

CFG = ({S}, {a,b}, S, P}, P = {S -> aSa, S-> bSb, S->lambda}

Grammar and Derivation

  • Derivation : replacement of non-terminals by choice on the right hand side of grammar symbols.

  • Process of discovering a derivation is called parsing.

0개의 댓글