Abstract

TCGS is an acronym for Twente Compiler Generating System. It has been developed at the Compiler Methodology Group at the University of Twente. The system consists of a scanner generator, a combined parser and attribute-evaluator generator, a standard routine module, and an interpreter. The standard routine module contains type definitions, routines for the storage and retrieval of declaration information, routines that support attribute evaluation, and routines that support code generation for a hypothetical stack machine. The linker builds a complete compiler in VAX Pascal from the generated attributed parser and scanner, the standard routine module, and possibly, user defined modules. The interpreter, useful in compiler courses, is used to execute programs in target code. This paper is devoted to the parser and attribute-evaluator generator. The generated parsers are L-attributed ELL(l) recursive-descent parsers. ELL(l) parsers are an extension of LL(1) parsers in the sense that they are derived from Extended ContextFree Grammars (abbreviated to ECFGs) instead of normal context-free grammars. ECFGs are also called Regular Right Part Grammars. An attributed ECFG is an ECFG augmented with attributes and attribute evaluation rules. An attributed ECFG can be used to specify both context-free and context-sensitive language properties, as well as the translation from source code to target code. The attribute grammar is restricted to be L-attributed, which means that the information flow, specified by the attributes, goes strictly from left to right. Attribute evaluation rules are represented by actions. Actions must be defined in an action definition list. An action definition consists of an action name and a parameter list. Action parameters are specified as input or output parameters. An action consists of an action name and an argument list which corresponds with the parameter list of the action definition. The output arguments are attribute occurrences. The input arguments are attribute occurrences or constants. For every action there must be a corresponding Pascal procedure declaration in a definition file. The actions are included in the production rules. The position of an action determines when it is executed. Syntactically, an action can be viewed as another

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.