13.07.2015 Views

The PowerPC 604 RISC Microprocessor - eisber.net

The PowerPC 604 RISC Microprocessor - eisber.net

The PowerPC 604 RISC Microprocessor - eisber.net

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Eystam generator developed at the TechnicalAbstract <strong>The</strong> prtrrearrningUniversity of Darmstadt generates sophisticated interactive programmingenvistereents from formal language definitions. Fran a formal, entirelynonprocedural definition of the language's syntax, context conditions anddenctetional semantics, it produces a hybrid editor, an interpreter and aLibrary eystem. <strong>The</strong> editor allowe both structure editing and text editing,guaranteeing immediate recognitital of syntax and aemantic errors. <strong>The</strong>been used to generate envirtxrnents for PASCAL, MCCULA-2 andgenerator hasthe formal language definition language itself. A brief description of thegenerated envirerrnehts and the definition language is given, and ourexperiences with formal language definitions are discussed fear the languagedefiner's point of view as well as from the programmer's point of view usingthe generated enviraements.1. IntroductionExperiences with the PSG - Programming System GeneratorG. StaeltingInstitut fur praktische LnformatikTechnleche Hochschule Darmstadt .<strong>The</strong> Pr centring System Generator PSG developed at the Technical Universityo f Dorm9 LACK generates language-dependent int* ractive prOgreerreting erts/ ironmeritsfrom formal larcuage definitions. Fran a fyLmal definition of aLanguage's syntax. context conditions, &notational aemantics and additionalinformation it produces an integrated software developmentenvironment. Oneof the major compererts of a PSG enviremenent is a powerful hybrid editorwhich allows atructure oriented editing as well as text editing. In structuremode, the editor guarantees prevention of both, syntactic and semanticerrors, whereas in textual mode it guarantees their immediate recognition.<strong>The</strong> editor is generated from the language's syntax and context conditions.Furthermore, a P9) environtent includee an interpreter which is generatedfrom the langvege's denotational aemantica. A language-independent librarysystem is pert of a PSG environment.<strong>The</strong> basic units for editing and interpretingare called fragments. Afragment is al. arbitrary part of a program, for example a statement, aprocedure declaration or a Whole program. Fragments arc internally stored naabstract syntax trees. Fregments may be incomplete, that is, seboolpenentsmay be missing. Missing suboanixxlents are called templates. Bottom-up systemdevelopment is provided by combining fragments, while the fragments themselvesaxe constructed top-down.<strong>The</strong> editor supports two input modes, which may be mixed freely by the user.In textual mode, the editor behavel like a normal screen-oriental texteditor with the usual capabilities to enter, modify, delete, search etc.text. By keystroke, incremental syntactic and semantic analysis are invoked.If the input was error-free, the text will be pretty-printed and editing mayproceed. If any syntactic or semantic errors are detected, an error messagewill be displayed by a menu-driven error recovery routine. Earliest possibledetection of both syntactic and semantic errors is guaranteedt As soon as afragment cannot be embedded into a syntactically and semantically correctprogram, it will be classified as erroneous. For semantic errors, this workseven if declarations of e.g. variable types are still missing.In structured mode, programa are developedin menu-driven refinement ormodification steps. <strong>The</strong> menus are generated according to the abstract syntaxof the language. <strong>The</strong> usual structure oriented commands are offered to theuser, such as refinement of a structure, selection from alternatives of asyntactic class, modification, insertion,and deletion of substructures,zooming. of sdbetructures, copying of substructures etc. However, the menusare filtered dynamically by the context analysis, such that only thosemenu-items producing syntactically and semantically correct refinementsafter selection will be offered to the user. Thus, in structural input mode,neither syntactic nor semantic errors can occur. In addition the user mayrotreive the ooetext information which has been derived so far. For example,he might ask the system which variables are already declared, which varia-bles are still undeclared, what possible types the undeclared variables may•poeneas etc .Like the other system components, the interpreter is able to handle arbitraryincomplete fragments. As loing as control flow in the interpreted fragmentdoes not touch any syntactically incomplete structure, the fragment can beinterpreted without difficulties. If flow of control encounters a umaplate,• According to our philosophy, declaration before use is not required.An undeelared variable is confeHered a semantic error as soon as thelast template offering the possibility of declaring that variablehas been deleted• Work of this author was aupported b7 the 'Deutsche Porschangwiemein-

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!