编译原理-- 语法分析——规约(国外英文资料).docVIP

  • 70
  • 0
  • 约8.77千字
  • 约 17页
  • 2017-06-08 发布于河南
  • 举报

编译原理-- 语法分析——规约(国外英文资料).doc

编译原理-- 语法分析——规约(国外英文资料)

编译原理-- 语法分析——规约(国外英文资料) Course name compiling principle Design topic syntax analysis - Specification Catalog I. description of the problem:... Two. Description of grammar and attribute grammar... 2.1 grammar describes... As to... (2) 2.2, the grammar of the while-do loop statement...... (2) The 2.3 attribute grammar describes:... (2) 3 syntax analysis methods and the description of the form of intermediate code. (3) 3.1 grammatical analysis methods:... 3.2 description in the form of intermediate code:.... (3) 4 brief analysis and summary design:..... (4) 4.1 lexical analysis:... (4) 4.2 recursive descent translator design:... (4) 4.3 grammar, guided translation,...... (5) 5 detailed algorithms describe... /... (5) 5.1 Grammar:... /... (6) 5.2 to check out the mistake of... Three. Test methods and test results:... (9) 3.1 test methods:... 3.2 test results:... Four. Design experience:... (10) I. problem description 1.1 can write a while-do statement that conforms to the grammar of LL (1). 1.2 constructs lexical analysis program, carries on the lexical analysis to the while-do statement. 1.3 construct syntax analysis program, syntax analysis of while-do statements, to determine grammatical correctness. 1.4 run program that requires the correct semantic output (4 address code). Two, grammar and attribute grammar description: 2.1 grammar description: Basic concept: Grammar is the definition and description of linguistic structures. Form is used to describe and define language Grammar is called grammar. Definition: grammar G= (VN, VT, P, Z) VN: non terminating symbolic set VT: end of symbol set P: a set of production or rules Z: start symbol (symbol) Z, VN Among them: Grammar for 2.2 while-do loop statements The grammar G (s) follows: S--WEDG (meaning while, E, do, G) G--c=R R--dTe|d T--+|-|*|/ E--aFb F-- |==| (Id1, Id2 representative identifier) Description of 2.3 attribute grammar: The definition form of 2.3.1 attribute grammar: Each grammar notation has a set of attrib

文档评论(0)

1亿VIP精品文档

相关文档