diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-03-06 17:37:51 +0000 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-03-06 17:37:51 +0000 |
commit | fdd6ff07cee824078c5315bf07926ee15bbdde85 (patch) | |
tree | 25ae7097f5f1ee88b7e9d0f27297f38c08a29009 /c_parser | |
parent | 3cef694323c53a19c8c7c0fab19432eb74f8792a (diff) | |
download | Compiler-fdd6ff07cee824078c5315bf07926ee15bbdde85.tar.gz Compiler-fdd6ff07cee824078c5315bf07926ee15bbdde85.zip |
making changes to type in lexer now
Diffstat (limited to 'c_parser')
-rw-r--r-- | c_parser/test/out/.diff.txt | 164 | ||||
-rw-r--r-- | c_parser/test/out/.pretty.xml | 161 | ||||
-rw-r--r-- | c_parser/test/out/.stderr.txt | 0 | ||||
-rw-r--r-- | c_parser/test/out/.stdout.xml | 166 |
4 files changed, 491 insertions, 0 deletions
diff --git a/c_parser/test/out/.diff.txt b/c_parser/test/out/.diff.txt new file mode 100644 index 0000000..332a940 --- /dev/null +++ b/c_parser/test/out/.diff.txt @@ -0,0 +1,164 @@ +1c1,161 +< +--- +> <?xml version="1.0"?> +> <Program> +> <Variable id="a" /> +> <Variable id="b" /> +> <Variable id="c" /> +> <Variable id="d" /> +> <Variable id="e" /> +> <Variable id="f" /> +> <Function id="f"> +> <Scope></Scope> +> </Function> +> <Function id="foo"> +> <Parameter id="bar" /> +> <Scope></Scope> +> </Function> +> <Function id="foo"> +> <Parameter id="bar1" /> +> <Parameter id="bar2" /> +> <Scope> +> <Variable id="x" /> +> <Variable id="y" /> +> <Variable id="z" /> +> </Scope> +> </Function> +> <Function id="foo"> +> <Parameter id="x" /> +> <Parameter id="y" /> +> <Scope> +> <Scope></Scope> +> </Scope> +> </Function> +> <Function id="f"> +> <Parameter id="a" /> +> <Parameter id="b" /> +> <Parameter id="c" /> +> <Scope> +> <Variable id="d" /> +> <Scope> +> <Variable id="e" /> +> </Scope> +> </Scope> +> </Function> +> <Function id="foo"> +> <Parameter id="a" /> +> <Scope> +> <Scope> +> <Variable id="z" /> +> </Scope> +> </Scope> +> </Function> +> <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> +> <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> +> <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> +> <Function id="f"> +> <Scope> +> <Variable id="x" /> +> <Scope> +> <Variable id="y" /> +> </Scope> +> </Scope> +> </Function> +> <Function id="f"> +> <Parameter id="b" /> +> <Parameter id="c" /> +> <Scope> +> <Variable id="a" /> +> </Scope> +> </Function> +> <Function id="func"> +> <Parameter id="x" /> +> <Parameter id="y" /> +> <Scope> +> <Variable id="i" /> +> <Scope> +> <Variable id="z" /> +> </Scope> +> </Scope> +> </Function> +> <Function id="function_1"> +> <Parameter id="a" /> +> <Parameter id="b" /> +> <Scope> +> <Variable id="x" /> +> <Scope> +> <Variable id="c" /> +> </Scope> +> </Scope> +> </Function> +> <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> diff --git a/c_parser/test/out/.pretty.xml b/c_parser/test/out/.pretty.xml new file mode 100644 index 0000000..81983a7 --- /dev/null +++ b/c_parser/test/out/.pretty.xml @@ -0,0 +1,161 @@ +<?xml version="1.0"?> +<Program> + <Variable id="a" /> + <Variable id="b" /> + <Variable id="c" /> + <Variable id="d" /> + <Variable id="e" /> + <Variable id="f" /> + <Function id="f"> + <Scope></Scope> + </Function> + <Function id="foo"> + <Parameter id="bar" /> + <Scope></Scope> + </Function> + <Function id="foo"> + <Parameter id="bar1" /> + <Parameter id="bar2" /> + <Scope> + <Variable id="x" /> + <Variable id="y" /> + <Variable id="z" /> + </Scope> + </Function> + <Function id="foo"> + <Parameter id="x" /> + <Parameter id="y" /> + <Scope> + <Scope></Scope> + </Scope> + </Function> + <Function id="f"> + <Parameter id="a" /> + <Parameter id="b" /> + <Parameter id="c" /> + <Scope> + <Variable id="d" /> + <Scope> + <Variable id="e" /> + </Scope> + </Scope> + </Function> + <Function id="foo"> + <Parameter id="a" /> + <Scope> + <Scope> + <Variable id="z" /> + </Scope> + </Scope> + </Function> + <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> + <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> + <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> + <Function id="f"> + <Scope> + <Variable id="x" /> + <Scope> + <Variable id="y" /> + </Scope> + </Scope> + </Function> + <Function id="f"> + <Parameter id="b" /> + <Parameter id="c" /> + <Scope> + <Variable id="a" /> + </Scope> + </Function> + <Function id="func"> + <Parameter id="x" /> + <Parameter id="y" /> + <Scope> + <Variable id="i" /> + <Scope> + <Variable id="z" /> + </Scope> + </Scope> + </Function> + <Function id="function_1"> + <Parameter id="a" /> + <Parameter id="b" /> + <Scope> + <Variable id="x" /> + <Scope> + <Variable id="c" /> + </Scope> + </Scope> + </Function> + <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> diff --git a/c_parser/test/out/.stderr.txt b/c_parser/test/out/.stderr.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/c_parser/test/out/.stderr.txt diff --git a/c_parser/test/out/.stdout.xml b/c_parser/test/out/.stdout.xml new file mode 100644 index 0000000..efabeac --- /dev/null +++ b/c_parser/test/out/.stdout.xml @@ -0,0 +1,166 @@ +<?xml version="1.0"?> +<Program> +<Variable id="a" /> +<Variable id="b" /> +<Variable id="c" /> +<Variable id="d" /> +<Variable id="e" /> +<Variable id="f" /> +<Function id="f"> +<Scope> +</Scope> +</Function> +<Function id="foo"> +<Parameter id="bar" /> +<Scope> +</Scope> +</Function> +<Function id="foo"> +<Parameter id="bar1" /> +<Parameter id="bar2" /> +<Scope> +<Variable id="x" /> +<Variable id="y" /> +<Variable id="z" /> +</Scope> +</Function> +<Function id="foo"> +<Parameter id="x" /> +<Parameter id="y" /> +<Scope> +<Scope> +</Scope> +</Scope> +</Function> +<Function id="f"> +<Parameter id="a" /> +<Parameter id="b" /> +<Parameter id="c" /> +<Scope> +<Variable id="d" /> +<Scope> +<Variable id="e" /> +</Scope> +</Scope> +</Function> +<Function id="foo"> +<Parameter id="a" /> +<Scope> +<Scope> +<Variable id="z" /> +</Scope> +</Scope> +</Function> +<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> +<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> +<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> +<Function id="f"> +<Scope> +<Variable id="x" /> +<Scope> +<Variable id="y" /> +</Scope> +</Scope> +</Function> +<Function id="f"> +<Parameter id="b" /> +<Parameter id="c" /> +<Scope> +<Variable id="a" /> +</Scope> +</Function> +<Function id="func"> +<Parameter id="x" /> +<Parameter id="y" /> +<Scope> +<Variable id="i" /> +<Scope> +<Variable id="z" /> +</Scope> +</Scope> +</Function> +<Function id="function_1"> +<Parameter id="a" /> +<Parameter id="b" /> +<Scope> +<Variable id="x" /> +<Scope> +<Variable id="c" /> +</Scope> +</Scope> +</Function> +<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> |