Define a mapping from BaseC to C
Define a generator that translates BaseC programs to C programs. This might be done via a model transformation step, i.e. translating to the ASTs of C and then pretty-printing, or directly to text using string interpolation. Main issue with the model transformation solution is how this fits in Spoofax; will the C-tools C syntax definition interfere with the BaseC syntax definition? However, the model transformation solution is preferable since it allows proper automatic pretty-printing and perhaps origin tracking.
Submitted by Eelco Visser on 16 February 2013 at 15:03
Issue Log
On 24 April 2013 at 21:33 Daco Harkes commented:
Status update.
Done:
- int constants
- strings
- Identifiers
- Assignment operators
- Expressions: plus, minus, multiply, division, modulo
- function calls
- function declarations
- statements: return, block, expressions and assigns
- single module applications
Todo:
- remaining statements
- remaining expressions
- structs
- multiple modules
- everything else (somebody make a list)
On 24 April 2013 at 21:36 Daco Harkes tagged basec
On 24 April 2013 at 21:51 Guido Wachsmuth commented:
“somebody” never works. Who is responsible for the mapping? All of you?
On 23 May 2013 at 12:47 Daco Harkes closed this issue.
Log in to post comments