Login Status


ShareSource Site » Projects » mcc Summary

Project: Marionette C compiler [Summary]

(*) Summary   [^] Files   [^] Screenshots   [_] Wiki   [!] Bug Tracker  
(») Mercurial Repository  


Project news item

« Go to project summary

News Item

It parses loops!

Posted by: xlq, 7 months ago

Here's demo.c: <code> void main(void) { int a, b; do { b++; } while (a); } </code> This is the syntax tree that "./mcc demo.c" produces: <code> ROOT FUNC main COMPLETE TYPE bt=VOID CSTAT OBJECT a TYPE INT bt=BASIC OBJECT b TYPE INT bt=BASIC OBJECT c TYPE INT bt=BASIC OBJECT d TYPE INT bt=BASIC DO CSTAT EXP EXP ++ LINK ->b EXP LINK ->a </code>
while loops and if statements (should) work in a similar manner.

Well, I had to test the News page somehow!