BoB: Best of Both in Compiler Construction –Bottom-up Parsing with Top-down Semantic Evaluation
عنوان مقاله: BoB: Best of Both in Compiler Construction –Bottom-up Parsing with Top-down Semantic Evaluation
شناسه ملی مقاله: JR_ACSIJ-3-3_014
منتشر شده در شماره 3 دوره 3 فصل May در سال 1393
شناسه ملی مقاله: JR_ACSIJ-3-3_014
منتشر شده در شماره 3 دوره 3 فصل May در سال 1393
مشخصات نویسندگان مقاله:
Wolfgang Dichler - Software Engineering Department, University of Applied Sciences Upper Austria, Hagenberg, Austria
Heinz Dobler - Software Engineering Department, University of Applied Sciences Upper Austria, Hagenberg, Austria
خلاصه مقاله:
Wolfgang Dichler - Software Engineering Department, University of Applied Sciences Upper Austria, Hagenberg, Austria
Heinz Dobler - Software Engineering Department, University of Applied Sciences Upper Austria, Hagenberg, Austria
Compilers typically use either a top-down or a bottom-up strategy for parsing as well as semantic evaluation. Both strategies have advantages and disadvantages: bottom-up parsing supports LR(k) grammars but is limited to S- or LR-attribution while topdown parsing is restricted to LL(k) grammars but supports Lattribution. The goal of the work described herein was to combine the advantages of both strategies. The result is the compiler generator BoB, mainly a preprocessor for Flex and Bison (modern versions of Lex and Yacc). BoB processes compiler descriptions written in Cocol4BoB which supports L-attributed LALR(1) grammars and generates input files for Flex and Bison. Compilers generated by the BoB-Flex&Bison toolchain use bottom-up parsing and top-down semantic evaluation. So developers do not have to struggle with LL(1) conflicts and can use inherited as well as synthesized attributes in semantic actions. Another benefit of BoB is its simple yet powerful compiler description language.
کلمات کلیدی: Bottom-Up Parsing, Top-Down Semantic Evaluation, Attributed Grammars, Compilers and Compiler Generators
صفحه اختصاصی مقاله و دریافت فایل کامل: https://civilica.com/doc/280808/