91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 4.44MB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2023-10-03
  • 語言: Java
  • 標簽: 編譯原理??

資源簡介

華中科技大學 編譯原理 面向過程的C語言的編譯器設計 功能包括:詞法分析和語法分析、語義分析、中間代碼生成的 源碼
題目:c--語言編譯器設計與實現(請為自己的編譯器命名) 源語言定義:或采用教材中Decaf語言,或采用C語言(或C++語言或C#語言或JAVA語言)部分關鍵語法規則。源語言要求至少包含的語言成分如下: 數據類型至少包括char類型、int類型和float類型 基本運算至少包括算術運算、比較運算、自增自減運算和復合賦值運算 控制語句至少包括if語句和while語句 實驗內容:完整可運行的自定義語言編譯器 實驗一:詞法語法分析器的設計與實現:建議使用詞法語法生成工具如:LEX/FLEX ,YACC/BISON等專業工具完成。 實驗二:符號表的設計與屬性計算:設計符號表數據結構和關鍵管理功能。動態展現符號表變化過程。無論語法分析使用工具還是自己設計,都必須對符號表進行設計和管理,屬性計算可以語義子程序實現。 實驗三:語義分析和中間代碼生成:生成抽象語法樹,進行語義分析,實現類型檢查和控制語句目標地址計算,生成中間代碼。中間代碼的形式可以采用不同形式,但實驗中要求定義自己的中間形式。 實驗四:目標代碼生成:在前三個實驗的基礎上實現目標代碼生成。也可以使用工具如LLVM來生成目標代碼。

資源截圖

代碼片段和文件信息

/*?A?Bison?parser?made?by?GNU?Bison?3.0.4.??*/

/*?Bison?implementation?for?Yacc-like?parsers?in?C

???Copyright?(C)?1984?1989-1990?2000-2015?Free?Software?Foundation?Inc.

???This?program?is?free?software:?you?can?redistribute?it?and/or?modify
???it?under?the?terms?of?the?GNU?General?Public?License?as?published?by
???the?Free?Software?Foundation?either?version?3?of?the?License?or
???(at?your?option)?any?later?version.

???This?program?is?distributed?in?the?hope?that?it?will?be?useful
???but?WITHOUT?ANY?WARRANTY;?without?even?the?implied?warranty?of
???MERCHANTABILITY?or?FITNESS?FOR?A?PARTICULAR?PURPOSE.??See?the
???GNU?General?Public?License?for?more?details.

???You?should?have?received?a?copy?of?the?GNU?General?Public?License
???along?with?this?program.??If?not?see?.??*/

/*?As?a?special?exception?you?may?create?a?larger?work?that?contains
???part?or?all?of?the?Bison?parser?skeleton?and?distribute?that?work
???under?terms?of?your?choice?so?long?as?that?work?isn‘t?itself?a
???parser?generator?using?the?skeleton?or?a?modified?version?thereof
???as?a?parser?skeleton.??Alternatively?if?you?modify?or?redistribute
???the?parser?skeleton?itself?you?may?(at?your?option)?remove?this
???special?exception?which?will?cause?the?skeleton?and?the?resulting
???Bison?output?files?to?be?licensed?under?the?GNU?General?Public
???License?without?this?special?exception.

???This?special?exception?was?added?by?the?Free?Software?Foundation?in
???version?2.2?of?Bison.??*/

/*?C?LALR(1)?parser?skeleton?written?by?Richard?Stallman?by
???simplifying?the?original?so-called?“semantic“?parser.??*/

/*?All?symbols?defined?below?should?begin?with?yy?or?YY?to?avoid
???infringing?on?user?name?space.??This?should?be?done?even?for?local
???variables?as?they?might?otherwise?be?expanded?by?user?macros.
???There?are?some?unavoidable?exceptions?within?include?files?to
???define?necessary?library?symbols;?they?are?noted?“INFRINGES?ON
???USER?NAME?SPACE“?below.??*/

/*?Identify?Bison?output.??*/
#define?YYBISON?1

/*?Bison?version.??*/
#define?YYBISON_VERSION?“3.0.4“

/*?Skeleton?name.??*/
#define?YYSKELETON_NAME?“yacc.c“

/*?Pure?parsers.??*/
#define?YYPURE?0

/*?Push?parsers.??*/
#define?YYPUSH?0

/*?Pull?parsers.??*/
#define?YYPULL?1




/*?Copy?the?first?part?of?user?declarations.??*/
#line?1?“ding.y“?/*?yacc.c:339??*/

????#include
????#include
????#include“GrammarTree.h“
????#include“lex.yy.c“
????void?yyerror(const?char*?fmt?...);

#line?74?“ding.tab.c“?/*?yacc.c:339??*/

#?ifndef?YY_NULLPTR
#??if?defined?__cplusplus?&&?201103L?<=?__cplusplus
#???define?YY_NULLPTR?nullptr
#??else
#???define?YY_NULLPTR?0
#??endif
#?endif

/*?Enabling?verbose?error?messages.??*/
#ifdef?YYERROR_VERBOSE
#?undef?YYERROR_VERBOSE
#?define?YYERROR_VERBOSE?1
#else
#?define?YYERROR_VERBOSE?1
#endif

/*?In?a?future?release?of?Bison?this?section?will?be?replaced
???by?#include?“ding.tab.h“.??*/
#ifndef?YY_YY_DING_TAB_H_INCLUDED
#?define?YY_Y

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-08-25?09:25??Cmm-Compiler\
?????文件??????????66??2018-08-25?09:25??Cmm-Compiler\.gitattributes
?????文件????????1359??2018-08-25?09:25??Cmm-Compiler\README.md
?????目錄???????????0??2018-08-25?09:25??Cmm-Compiler\lab1\
?????文件????????4789??2018-08-25?09:25??Cmm-Compiler\lab1\GrammarTree.c
?????文件????????1407??2018-08-25?09:25??Cmm-Compiler\lab1\GrammarTree.h
?????文件?????????188??2018-08-25?09:25??Cmm-Compiler\lab1\Makefile
?????文件?????????242??2018-08-25?09:25??Cmm-Compiler\lab1\change.txt
?????文件???????62424??2018-08-25?09:25??Cmm-Compiler\lab1\ding
?????文件???????13458??2018-08-25?09:25??Cmm-Compiler\lab1\ding.l
?????文件???????63401??2018-08-25?09:25??Cmm-Compiler\lab1\ding.out
?????文件??????100693??2018-08-25?09:25??Cmm-Compiler\lab1\ding.output
?????文件???????90903??2018-08-25?09:25??Cmm-Compiler\lab1\ding.tab.c
?????文件????????3636??2018-08-25?09:25??Cmm-Compiler\lab1\ding.tab.h
?????文件???????12557??2018-08-25?09:25??Cmm-Compiler\lab1\ding.y
?????文件???????67341??2018-08-25?09:25??Cmm-Compiler\lab1\lex.yy.c
?????文件?????????427??2018-08-25?09:25??Cmm-Compiler\lab1\test.cmm
?????目錄???????????0??2018-08-25?09:25??Cmm-Compiler\lab2\
?????文件????????4756??2018-08-25?09:25??Cmm-Compiler\lab2\GrammarTree.c
?????文件?????????956??2018-08-25?09:25??Cmm-Compiler\lab2\GrammarTree.h
?????文件?????????626??2018-08-25?09:25??Cmm-Compiler\lab2\Makefile
?????文件???????26103??2018-08-25?09:25??Cmm-Compiler\lab2\SemanticAnalysis?(復件).c
?????文件???????26103??2018-08-25?09:25??Cmm-Compiler\lab2\SemanticAnalysis.c
?????文件????????1763??2018-08-25?09:25??Cmm-Compiler\lab2\SemanticAnalysis.h
?????文件????????9552??2018-08-25?09:25??Cmm-Compiler\lab2\SemanticAnalysis.l
?????文件???????98040??2018-08-25?09:25??Cmm-Compiler\lab2\SemanticAnalysis.tab.c
?????文件????????3791??2018-08-25?09:25??Cmm-Compiler\lab2\SemanticAnalysis.tab.h
?????文件???????15591??2018-08-25?09:25??Cmm-Compiler\lab2\SemanticAnalysis.y
?????文件???????19168??2018-08-25?09:25??Cmm-Compiler\lab2\SymbolTable.c
?????文件????????4386??2018-08-25?09:25??Cmm-Compiler\lab2\SymbolTable.h
?????文件?????????708??2018-08-25?09:25??Cmm-Compiler\lab2\change.txt
............此處省略92個文件信息

評論

共有 條評論