Site Menu Project Specification Implementation Recommendations Reference Needs Updating Work in Progress Wastebasket Wiki Manual |
CompilerImplementation.Compiler HistoryHide minor edits - Show changes to output 2015-09-21 13:16
by -
Changed lines 2-4 from:
Work on a bootstrap compiler has begun in April 2015. It is being written in classic Modula-2. Sources are available on our public Bitbucket repository at: to:
Work on a bootstrap compiler has begun in April 2015. It is being written in classic Modula-2. Sources are available on our public Bitbucket repository at: ''[[https://bitbucket.org/trijezdci/m2r10/src/tip/bootstrap/m2bst]]''. 2015-09-21 13:16
by -
Changed line 2 from:
Work on a bootstrap compiler has begun in April 2015. It is being written in classic Modula-2. to:
Work on a bootstrap compiler has begun in April 2015. It is being written in classic Modula-2. Sources are available on our public Bitbucket repository at: 2015-09-21 13:16
by -
Changed lines 2-4 from:
Work on a bootstrap compiler has begun in April 2015. It is being written in classic Modula-2. to:
Work on a bootstrap compiler has begun in April 2015. It is being written in classic Modula-2. The sources are available on our public Bitbucket repository at: ''[[https://bitbucket.org/trijezdci/m2r10/src/tip/bootstrap/m2bst]]'' 2015-09-21 13:12
by -
Changed line 8 from:
In the first stage the compiler sources written in classic Modula-2 will be translated to C using a classic Modula-2 to C translator. After the resulting C sources have been compiled and built using a C compiler on the target platform, the compiler sources will be converted to Modula-2 R10 syntax. In the second stage the compiler sources, now in Modula-2 R10 will be translated by the bootstrap compiler itself. When the resulting C sources have been compiled and built again, the to:
In the first stage the compiler sources written in classic Modula-2 will be translated to C using a classic Modula-2 to C translator. After the resulting C sources have been compiled and built using a C compiler on the target platform, the compiler sources will be converted to Modula-2 R10 syntax. In the second stage the compiler sources, now in Modula-2 R10 will be translated by the bootstrap compiler itself. When the resulting C sources have been compiled and built again, the compiler becomes self-hosting. This process is called bootstrapping. 2015-09-21 13:11
by -
Changed line 5 from:
The lexer is a handwritten trie tokeniser using a two-character lookahead. It performs tokenisation only. The parser is a handwritten recursive descent multi-pass design. It performs syntax and type checking and builds a symbol table and abstract syntax tree (AST). A recursive tree-walker will perform transformations on the AST in preparation for code generation. The code generator will expand code-fragment templates to generate output. For each AST node, the code generator's internal library contains one pre-defined code fragment in the target language. The bootstrap compiler will generate readable C99 for bootstrapping to:
The lexer is a handwritten trie tokeniser using a two-character lookahead. It performs tokenisation only. The parser is a handwritten recursive descent multi-pass design. It performs syntax and type checking and builds a symbol table and abstract syntax tree (AST). A recursive tree-walker will perform transformations on the AST in preparation for code generation. The code generator will expand code-fragment templates to generate output. For each AST node, the code generator's internal library contains one pre-defined code fragment in the target language. The bootstrap compiler will generate readable C99 for bootstrapping on any target platform for which a C99 compiler is available. Initially it will implement a language subset sufficient for bootstrapping. 2015-09-21 13:10
by -
Changed line 2 from:
Work on a bootstrap compiler has begun in April 2015. It is being to:
Work on a bootstrap compiler has begun in April 2015. It is being written in classic Modula-2. 2015-09-21 08:50
by -
Changed line 24 from:
!!!! Compiler Transformation to:
!!!!! Compiler Transformation 2015-09-21 08:49
by -
Changed line 1 from:
!!!! to:
!!!! Our Compiler Changed line 4 from:
to:
!!!!! Architecture Changed line 7 from:
to:
!!!!! Bootstrapping Changed line 10 from:
to:
!!!!! Post-Bootstrapping Changed line 13 from:
to:
!!!!! Earlier Code Base Changed line 16 from:
to:
!!!!! Intellectual Property Changed lines 19-21 from:
!!!!!! GNU Compiler Collection (GCC) to:
!!!! Other Compilers !!!!! GNU Compiler Collection (GCC) Added lines 23-27:
!!!! Compiler Transformation To aid the transformation of legacy Modula-2 compilers to Modula-2 R10, we have provided two conversion roadmaps. *[[https://bitbucket.org/trijezdci/m2r10/downloads/PIM-to-R10-Subset-Conversion.txt|PIM to R10 Subset Conversion Roadmap (TXT)]] *[[https://bitbucket.org/trijezdci/m2r10/downloads/ISO-to-R10-Subset-Conversion.txt|ISO to R10 Subset Conversion Roadmap (TXT)]] 2015-09-21 08:41
by -
Changed line 5 from:
The lexer is a handwritten trie tokeniser using a two-character lookahead. It performs tokenisation only. The parser is a handwritten recursive descent multi-pass design. It performs syntax checking and builds a symbol table and abstract syntax tree (AST). A recursive tree-walker will perform transformations on the AST in preparation for code generation. The code generator will expand code-fragment templates to generate output. For each AST node, the code generator's internal library contains one pre-defined code fragment in the target language. The bootstrap compiler will generate readable C99 for bootstrapping to any target platform for which a C99 compiler is available. Initially it will implement a language subset sufficient for bootstrapping. to:
The lexer is a handwritten trie tokeniser using a two-character lookahead. It performs tokenisation only. The parser is a handwritten recursive descent multi-pass design. It performs syntax and type checking and builds a symbol table and abstract syntax tree (AST). A recursive tree-walker will perform transformations on the AST in preparation for code generation. The code generator will expand code-fragment templates to generate output. For each AST node, the code generator's internal library contains one pre-defined code fragment in the target language. The bootstrap compiler will generate readable C99 for bootstrapping to any target platform for which a C99 compiler is available. Initially it will implement a language subset sufficient for bootstrapping. 2015-09-21 08:40
by -
Added lines 1-20:
!!!!! Bootstrap Compiler Work on a bootstrap compiler has begun in April 2015. It is being is written in classic Modula-2. !!!!!! Architecture The lexer is a handwritten trie tokeniser using a two-character lookahead. It performs tokenisation only. The parser is a handwritten recursive descent multi-pass design. It performs syntax checking and builds a symbol table and abstract syntax tree (AST). A recursive tree-walker will perform transformations on the AST in preparation for code generation. The code generator will expand code-fragment templates to generate output. For each AST node, the code generator's internal library contains one pre-defined code fragment in the target language. The bootstrap compiler will generate readable C99 for bootstrapping to any target platform for which a C99 compiler is available. Initially it will implement a language subset sufficient for bootstrapping. !!!!!! Bootstrapping In the first stage the compiler sources written in classic Modula-2 will be translated to C using a classic Modula-2 to C translator. After the resulting C sources have been compiled and built using a C compiler on the target platform, the compiler sources will be converted to Modula-2 R10 syntax. In the second stage the compiler sources, now in Modula-2 R10 will be translated by the bootstrap compiler itself. When the resulting C sources have been compiled and built again, the bootstrap compiler becomes self-hosting. This process is called bootstrapping. !!!!!! Post-Bootstrapping Once the compiler is self-hosting, it will be gradually enhanced to implement the full language and a back end to generate intermediate representation (IR) for the LLVM compiler infrastructure so that the compiler can be hooked into an LLVM backend. Other backends will be added later. At present backends for JVM and CLR are being considered (subject to funding). !!!!!! Earlier Code Base An earlier compiler written in C had been under development in 2010 but work had been suspended until the design was finalised. Sources of this work are being salvaged for the new compiler now being written in classic Modula-2. !!!!!! Intellectual Property The intellectual property rights to the compiler and its library will be donated to a non-profit organisation charged with promoting the revival of the Modula-2 language in education and industry. The software will be licensed under a permissive BSD style open source license. !!!!!! GNU Compiler Collection (GCC) Gaius Mulley, the developer of GNU Modula-2 has pledged to add support for Modula-2 R10 in [=GM2=]. The [=GM2=] compiler is a Modula-2 front-end for the GNU Compiler Collection (GCC). This software is licensed under the GPL open source license. |