Declarative Language Denitions and Code Generation as Linearization

作者: Aarne Ranta

DOI:

关键词: Code generationProgramming languageSyntax (programming languages)ParsingAbstract syntaxGrammatical FrameworkComputer scienceAttribute grammarCompilerTheoretical computer scienceCompiler construction

摘要: This paper presents a compiler for fragment of the C programming language, with JVM (Java Virtual Machine) as target language. The is implemented in purely declarative way: its denition consists an abstract syntax program structures and two concrete syntaxes matching syntax: one JVM. From these grammar components, derived by using GF (Grammatical Framework) grammat tool: front end parsing semantic checking accordance to grammar, back linearization grammar. tool provides other functionalities well, such decompilation interactive editing.

参考文章(10)
Janna Khegai, Bengt Nordström, Aarne Ranta, Multilingual syntax editing in GF international conference on computational linguistics. pp. 453- 464 ,(2003) , 10.1007/3-540-36456-0_48
Lena Magnusson, Bengt Nordström, The ALF proof editor and its proof engine types for proofs and programs. pp. 213- 237 ,(1994) , 10.1007/3-540-58085-9_78
Jon Meyer, Troy Downing, Java Virtual Machine ,(1997)
Donald E. Knuth, Semantics of context-free languages Theory of Computing Systems \/ Mathematical Systems Theory. ,vol. 2, pp. 127- 145 ,(1968) , 10.1007/BF01692511
Stuart M. Shieber, Fernando C. N. Pereira, Prolog and Natural-Language Analysis ,(1987)
Robert Harper, Furio Honsell, Gordon Plotkin, A framework for defining logics Journal of the ACM (JACM). ,vol. 40, pp. 143- 184 ,(1993) , 10.1145/138027.138060
G. Kahn, B. Lang, B. Mélèse, E. Morcos, Metal: a formalism to specify formalisms Science of Computer Programming. ,vol. 3, pp. 151- 188 ,(1983) , 10.1016/0167-6423(83)90009-6
Tim Teitelbaum, Thomas Reps, The Cornell program synthesizer: a syntax-directed programming environment Communications of The ACM. ,vol. 24, pp. 563- 573 ,(1981) , 10.1145/358746.358755
P. J. Landin, The next 700 programming languages Communications of the ACM. ,vol. 9, pp. 157- 166 ,(1966) , 10.1145/365230.365257
L. Augustsson, Cayenne : A language with dependent types Lecture Notes in Computer Science. pp. 240- 267 ,(1999)