DocumentCode
754208
Title
Syntax-Directed Pretty Printing—A First Step Towards a Syntax-Directed Editor
Author
Rubin, Lisa F.
Author_Institution
Prime Computer, Inc.
Issue
2
fYear
1983
fDate
3/1/1983 12:00:00 AM
Firstpage
119
Lastpage
127
Abstract
A language-independent syntax-directed pretty printer has been implemented as the first step towards building a language-independent syntax-directed editor. The syntax-directed pretty printer works in two phases: the grammar processing phase and the program processing phase. In the grammar processing stage, a grammar which contains a context-free grammar and information for the parser and pretty printer is processed and all files needed by the second phase are written. With these files, the syntax-directed pretty printer works for the language of the grammar. The syntax-directed editor would use the same grammar processing phase to construct the files needed to make it work for a specific language. In the program processing phase, programs in the language of the grammar are parsed and parse trees are built. If syntax errors are found, error messages are produced and error recovery is done. The parse trees are pretty printed according to the pretty printer specifications given in the grammar, resulting in well-indented, syntactically clear programs.
Keywords
Editor generator; formatter; language-independence; pretty printer; programming environments; syntax-directed editor; Computer languages; Printers; Programming environments; Software engineering; Software tools; Switches; Editor generator; formatter; language-independence; pretty printer; programming environments; syntax-directed editor;
fLanguage
English
Journal_Title
Software Engineering, IEEE Transactions on
Publisher
ieee
ISSN
0098-5589
Type
jour
DOI
10.1109/TSE.1983.236456
Filename
1703028
Link To Document