aboutsummaryrefslogtreecommitdiffstats
path: root/c_compiler/test/ref
diff options
context:
space:
mode:
Diffstat (limited to 'c_compiler/test/ref')
-rw-r--r--c_compiler/test/ref/01.stdout.xml9
-rw-r--r--c_compiler/test/ref/02.stdout.xml7
-rw-r--r--c_compiler/test/ref/03.stdout.xml8
-rw-r--r--c_compiler/test/ref/04.stdout.xml12
-rw-r--r--c_compiler/test/ref/05.stdout.xml11
-rw-r--r--c_compiler/test/ref/06.stdout.xml14
-rw-r--r--c_compiler/test/ref/07.stdout.xml11
-rw-r--r--c_compiler/test/ref/08.stdout.xml16
-rw-r--r--c_compiler/test/ref/09.stdout.xml21
-rw-r--r--c_compiler/test/ref/10.stdout.xml20
-rw-r--r--c_compiler/test/ref/11.stdout.xml11
-rw-r--r--c_compiler/test/ref/12.stdout.xml10
-rw-r--r--c_compiler/test/ref/13.stdout.xml13
-rw-r--r--c_compiler/test/ref/14.stdout.xml13
-rw-r--r--c_compiler/test/ref/15.stdout.xml32
15 files changed, 208 insertions, 0 deletions
diff --git a/c_compiler/test/ref/01.stdout.xml b/c_compiler/test/ref/01.stdout.xml
new file mode 100644
index 0000000..e0545e4
--- /dev/null
+++ b/c_compiler/test/ref/01.stdout.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<Program>
+ <Variable id="a" />
+ <Variable id="b" />
+ <Variable id="c" />
+ <Variable id="d" />
+ <Variable id="e" />
+ <Variable id="f" />
+</Program>
diff --git a/c_compiler/test/ref/02.stdout.xml b/c_compiler/test/ref/02.stdout.xml
new file mode 100644
index 0000000..6caf2fc
--- /dev/null
+++ b/c_compiler/test/ref/02.stdout.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<Program>
+ <Function id="f">
+ <Scope>
+ </Scope>
+ </Function>
+</Program>
diff --git a/c_compiler/test/ref/03.stdout.xml b/c_compiler/test/ref/03.stdout.xml
new file mode 100644
index 0000000..2c29a50
--- /dev/null
+++ b/c_compiler/test/ref/03.stdout.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<Program>
+ <Function id="foo">
+ <Parameter id="bar" />
+ <Scope>
+ </Scope>
+ </Function>
+</Program>
diff --git a/c_compiler/test/ref/04.stdout.xml b/c_compiler/test/ref/04.stdout.xml
new file mode 100644
index 0000000..caae53b
--- /dev/null
+++ b/c_compiler/test/ref/04.stdout.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<Program>
+ <Function id="foo">
+ <Parameter id="bar1" />
+ <Parameter id="bar2" />
+ <Scope>
+ <Variable id="x" />
+ <Variable id="y" />
+ <Variable id="z" />
+ </Scope>
+ </Function>
+</Program>
diff --git a/c_compiler/test/ref/05.stdout.xml b/c_compiler/test/ref/05.stdout.xml
new file mode 100644
index 0000000..f4b306f
--- /dev/null
+++ b/c_compiler/test/ref/05.stdout.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<Program>
+ <Function id="foo">
+ <Parameter id="x" />
+ <Parameter id="y" />
+ <Scope>
+ <Scope>
+ </Scope>
+ </Scope>
+ </Function>
+</Program>
diff --git a/c_compiler/test/ref/06.stdout.xml b/c_compiler/test/ref/06.stdout.xml
new file mode 100644
index 0000000..3526139
--- /dev/null
+++ b/c_compiler/test/ref/06.stdout.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<Program>
+ <Function id="f">
+ <Parameter id="a" />
+ <Parameter id="b" />
+ <Parameter id="c" />
+ <Scope>
+ <Variable id="d" />
+ <Scope>
+ <Variable id="e" />
+ </Scope>
+ </Scope>
+ </Function>
+</Program>
diff --git a/c_compiler/test/ref/07.stdout.xml b/c_compiler/test/ref/07.stdout.xml
new file mode 100644
index 0000000..17c7c1b
--- /dev/null
+++ b/c_compiler/test/ref/07.stdout.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<Program>
+ <Function id="foo">
+ <Parameter id="a" />
+ <Scope>
+ <Scope>
+ <Variable id="z" />
+ </Scope>
+ </Scope>
+ </Function>
+</Program>
diff --git a/c_compiler/test/ref/08.stdout.xml b/c_compiler/test/ref/08.stdout.xml
new file mode 100644
index 0000000..0838fe5
--- /dev/null
+++ b/c_compiler/test/ref/08.stdout.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<Program>
+ <Function id="func">
+ <Parameter id="a" />
+ <Parameter id="b" />
+ <Scope>
+ <Variable id="c" />
+ <Scope>
+ <Variable id="d" />
+ </Scope>
+ <Scope>
+ <Variable id="e" />
+ </Scope>
+ </Scope>
+ </Function>
+</Program>
diff --git a/c_compiler/test/ref/09.stdout.xml b/c_compiler/test/ref/09.stdout.xml
new file mode 100644
index 0000000..646cd98
--- /dev/null
+++ b/c_compiler/test/ref/09.stdout.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<Program>
+ <Function id="x">
+ <Scope>
+ </Scope>
+ </Function>
+ <Variable id="g" />
+ <Function id="zz">
+ <Parameter id="a" />
+ <Parameter id="b" />
+ <Parameter id="c" />
+ <Scope>
+ <Scope>
+ <Variable id="a" />
+ </Scope>
+ <Scope>
+ <Variable id="fsdfsdfs" />
+ </Scope>
+ </Scope>
+ </Function>
+</Program>
diff --git a/c_compiler/test/ref/10.stdout.xml b/c_compiler/test/ref/10.stdout.xml
new file mode 100644
index 0000000..21cadeb
--- /dev/null
+++ b/c_compiler/test/ref/10.stdout.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<Program>
+ <Function id="f">
+ <Scope>
+ </Scope>
+ </Function>
+ <Variable id="g" />
+ <Function id="x">
+ <Parameter id="y" />
+ <Scope>
+ <Variable id="z" />
+ <Scope>
+ <Variable id="r" />
+ </Scope>
+ <Scope>
+ <Variable id="f" />
+ </Scope>
+ </Scope>
+ </Function>
+</Program>
diff --git a/c_compiler/test/ref/11.stdout.xml b/c_compiler/test/ref/11.stdout.xml
new file mode 100644
index 0000000..ad96d6c
--- /dev/null
+++ b/c_compiler/test/ref/11.stdout.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<Program>
+ <Function id="f">
+ <Scope>
+ <Variable id="x" />
+ <Scope>
+ <Variable id="y" />
+ </Scope>
+ </Scope>
+ </Function>
+</Program>
diff --git a/c_compiler/test/ref/12.stdout.xml b/c_compiler/test/ref/12.stdout.xml
new file mode 100644
index 0000000..9f49265
--- /dev/null
+++ b/c_compiler/test/ref/12.stdout.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<Program>
+ <Function id="f">
+ <Parameter id="b" />
+ <Parameter id="c" />
+ <Scope>
+ <Variable id="a" />
+ </Scope>
+ </Function>
+</Program>
diff --git a/c_compiler/test/ref/13.stdout.xml b/c_compiler/test/ref/13.stdout.xml
new file mode 100644
index 0000000..f0385cb
--- /dev/null
+++ b/c_compiler/test/ref/13.stdout.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<Program>
+ <Function id="func">
+ <Parameter id="x" />
+ <Parameter id="y" />
+ <Scope>
+ <Variable id="i" />
+ <Scope>
+ <Variable id="z" />
+ </Scope>
+ </Scope>
+ </Function>
+</Program>
diff --git a/c_compiler/test/ref/14.stdout.xml b/c_compiler/test/ref/14.stdout.xml
new file mode 100644
index 0000000..63aec85
--- /dev/null
+++ b/c_compiler/test/ref/14.stdout.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<Program>
+ <Function id="function_1">
+ <Parameter id="a" />
+ <Parameter id="b" />
+ <Scope>
+ <Variable id="x" />
+ <Scope>
+ <Variable id="c" />
+ </Scope>
+ </Scope>
+ </Function>
+</Program>
diff --git a/c_compiler/test/ref/15.stdout.xml b/c_compiler/test/ref/15.stdout.xml
new file mode 100644
index 0000000..029ccb8
--- /dev/null
+++ b/c_compiler/test/ref/15.stdout.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<Program>
+ <Function id="add">
+ <Parameter id="a" />
+ <Parameter id="b" />
+ <Scope>
+ <Variable id="c" />
+ </Scope>
+ </Function>
+ <Function id="sub">
+ <Parameter id="a" />
+ <Parameter id="b" />
+ <Scope>
+ <Variable id="c" />
+ </Scope>
+ </Function>
+ <Function id="mult_by_5">
+ <Parameter id="a" />
+ <Scope>
+ <Variable id="b" />
+ </Scope>
+ </Function>
+ <Function id="add_5">
+ <Parameter id="a" />
+ <Scope>
+ <Variable id="i" />
+ <Scope>
+ <Variable id="b" />
+ </Scope>
+ </Scope>
+ </Function>
+</Program>