Context-sensitivity vs Ambiguity

后端 未结 3 2121
清歌不尽
清歌不尽 2021-02-19 01:24

I\'m confused about how context-sensitivity and ambiguity influence each other.

What i think is correct is:

Ambiguity:

An ambiguous grammar leads to the

3条回答
  •  闹比i
    闹比i (楼主)
    2021-02-19 01:56

    Compilers do not use "pure" (whatever that may mean) grammars to do their parsing - they are real-world programs that do what all real-world programs do - apply heuristics in certain situations. This is why C++ compilers (and compilers for most other languages, except for undergrad exercises) are not produced using compiler generators.

提交回复
热议问题