解析器生成器 LLnextgen

openkk 12年前發布 | 63K 次閱讀 語法/詞法分析器 C/C++

LLnextgen 部分實現了 LLgen 擴展-LL(1) 解析器生成器,是 Amsterdam Compiler Kit 的一部分。使用類 EBNF 的語法描述以及使用 C 作為輸入的聯合語義行為,并生成 C 代碼。生成的代碼是嚴格的 ANSI C,可使用各種流行的 C 編譯器進行編譯。
它提供的一些特性包括:

  • Tracing of conflicts – LLgen can only indicate where a conflict is detected, but not where it is caused. As the cause may be in a seemingly unrelated rule, conflicts can be very hard to find. LLnextgen can trace the cause of conflicts, making it much easier to resolve them.

  • Symbol tables – A symbol table can be auto-generated if the needed information is supplied.

  • Common code generation – Generation of code for reporting errors and wrapping the lexical analyser. This code is required by LLnextgen and LLgen, and is similar for all parsers created with LLnextgen/LLgen. The default code can also be used as a starting point for creating one's own code.

  • Return values – Return values for non-terminals.


項目主頁:http://www.baiduhome.net/lib/view/home/1325298254702

 本文由用戶 openkk 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!