From f9a8264f34e2b4ba27c016bd16d95a81234e7ef6 Mon Sep 17 00:00:00 2001 From: Martin Perner Date: Tue, 23 Mar 2010 02:19:38 +0100 Subject: [PATCH] added some testcases --- parser/skinner_00.0 | 11 +++++++++++ parser/skinner_01.0 | 11 +++++++++++ parser/snafu_00.0 | 13 +++++++++++++ parser/snafu_01.1 | 13 +++++++++++++ scanner/skinner_00.0 | 11 +++++++++++ scanner/skinner_00.out | 26 ++++++++++++++++++++++++++ scanner/skinner_01.0 | 11 +++++++++++ scanner/skinner_01.out | 26 ++++++++++++++++++++++++++ scanner/snafu_00.0 | 13 +++++++++++++ scanner/snafu_00.out | 33 +++++++++++++++++++++++++++++++++ scanner/snafu_01.1 | 13 +++++++++++++ 11 files changed, 181 insertions(+) create mode 100644 parser/skinner_00.0 create mode 100644 parser/skinner_01.0 create mode 100644 parser/snafu_00.0 create mode 100644 parser/snafu_01.1 create mode 100644 scanner/skinner_00.0 create mode 100644 scanner/skinner_00.out create mode 100644 scanner/skinner_01.0 create mode 100644 scanner/skinner_01.out create mode 100644 scanner/snafu_00.0 create mode 100644 scanner/snafu_00.out create mode 100644 scanner/snafu_01.1 diff --git a/parser/skinner_00.0 b/parser/skinner_00.0 new file mode 100644 index 0000000..cdeae79 --- /dev/null +++ b/parser/skinner_00.0 @@ -0,0 +1,11 @@ +method blabb +var foo := 5; +if foo < 0x0F3 then + /* hier + kommt komm + mentar + */ + foo := foo - 0x3; +else + foo := foo * 4; +end diff --git a/parser/skinner_01.0 b/parser/skinner_01.0 new file mode 100644 index 0000000..47eb28c --- /dev/null +++ b/parser/skinner_01.0 @@ -0,0 +1,11 @@ +method blabb +var foo := 5; +if foo < 0x0F3 then + /* hier + kommt komm + mentar + */ + foo := foo - 0x3; +else + foo := foo * 00244; +end diff --git a/parser/snafu_00.0 b/parser/snafu_00.0 new file mode 100644 index 0000000..8c083ed --- /dev/null +++ b/parser/snafu_00.0 @@ -0,0 +1,13 @@ +if 49 < 30 then +do my_var1-64 +end +if39 +39if +twen := 0x20 +zero = 0x00 +twen - 0x04A +struct foobar.0x0b10 +(*42) /* hihi haha hoho */ +method test /* multi line comment with some keywords and special chars: end method struct * ** / /* +0x523 is < than 0x0524 do end */ +hihi diff --git a/parser/snafu_01.1 b/parser/snafu_01.1 new file mode 100644 index 0000000..b8fb225 --- /dev/null +++ b/parser/snafu_01.1 @@ -0,0 +1,13 @@ +if 49 < 30 then +do my_var1+64 +end +if39 +39if +twen := 0x20 +zero = 0x00 +twen - 0x04A +struct foobar.0x0b10 +(*42) /* hihi haha hoho */ +method test /* multi line comment with some keywords and special chars: end method struct * ** / /* +0x523 is < than 0x0524 do end */ +hihi diff --git a/scanner/skinner_00.0 b/scanner/skinner_00.0 new file mode 100644 index 0000000..cdeae79 --- /dev/null +++ b/scanner/skinner_00.0 @@ -0,0 +1,11 @@ +method blabb +var foo := 5; +if foo < 0x0F3 then + /* hier + kommt komm + mentar + */ + foo := foo - 0x3; +else + foo := foo * 4; +end diff --git a/scanner/skinner_00.out b/scanner/skinner_00.out new file mode 100644 index 0000000..ad769d9 --- /dev/null +++ b/scanner/skinner_00.out @@ -0,0 +1,26 @@ +method +ident blabb +var +ident foo +:= +num 5 +; +if +ident foo +< +num f3 +then +ident foo +:= +ident foo +- +num 3 +; +else +ident foo +:= +ident foo +* +num 4 +; +end diff --git a/scanner/skinner_01.0 b/scanner/skinner_01.0 new file mode 100644 index 0000000..47eb28c --- /dev/null +++ b/scanner/skinner_01.0 @@ -0,0 +1,11 @@ +method blabb +var foo := 5; +if foo < 0x0F3 then + /* hier + kommt komm + mentar + */ + foo := foo - 0x3; +else + foo := foo * 00244; +end diff --git a/scanner/skinner_01.out b/scanner/skinner_01.out new file mode 100644 index 0000000..87e187e --- /dev/null +++ b/scanner/skinner_01.out @@ -0,0 +1,26 @@ +method +ident blabb +var +ident foo +:= +num 5 +; +if +ident foo +< +num f3 +then +ident foo +:= +ident foo +- +num 3 +; +else +ident foo +:= +ident foo +* +num f4 +; +end diff --git a/scanner/snafu_00.0 b/scanner/snafu_00.0 new file mode 100644 index 0000000..8c083ed --- /dev/null +++ b/scanner/snafu_00.0 @@ -0,0 +1,13 @@ +if 49 < 30 then +do my_var1-64 +end +if39 +39if +twen := 0x20 +zero = 0x00 +twen - 0x04A +struct foobar.0x0b10 +(*42) /* hihi haha hoho */ +method test /* multi line comment with some keywords and special chars: end method struct * ** / /* +0x523 is < than 0x0524 do end */ +hihi diff --git a/scanner/snafu_00.out b/scanner/snafu_00.out new file mode 100644 index 0000000..3bd1c23 --- /dev/null +++ b/scanner/snafu_00.out @@ -0,0 +1,33 @@ +if +num 31 +< +num 1e +then +do +ident my_var1 +- +num 40 +end +ident if39 +num 27 +if +ident twen +:= +num 20 +ident zero += +num 0 +ident twen +- +num 4a +struct +ident foobar +. +num b10 +( +* +num 2a +) +method +ident test +ident hihi diff --git a/scanner/snafu_01.1 b/scanner/snafu_01.1 new file mode 100644 index 0000000..b8fb225 --- /dev/null +++ b/scanner/snafu_01.1 @@ -0,0 +1,13 @@ +if 49 < 30 then +do my_var1+64 +end +if39 +39if +twen := 0x20 +zero = 0x00 +twen - 0x04A +struct foobar.0x0b10 +(*42) /* hihi haha hoho */ +method test /* multi line comment with some keywords and special chars: end method struct * ** / /* +0x523 is < than 0x0524 do end */ +hihi -- 2.25.1