diff --git a/lexer/comment_start_nested.mj b/lexer/comment_start_nested.mj new file mode 100644 index 0000000000000000000000000000000000000000..b55461c7d856e16bfb9de0ee20afab594cd23865 --- /dev/null +++ b/lexer/comment_start_nested.mj @@ -0,0 +1,3 @@ +/* starting an nested comment /* +should not produce an error +*/ diff --git a/lexer/comment_start_nested.mj.out b/lexer/comment_start_nested.mj.out new file mode 100644 index 0000000000000000000000000000000000000000..1a2b1dc142b40bd859036d3dac387b1b93663d06 --- /dev/null +++ b/lexer/comment_start_nested.mj.out @@ -0,0 +1 @@ +EOF diff --git a/lexer/file-noendofline.mj b/lexer/file-noendofline.mj new file mode 100644 index 0000000000000000000000000000000000000000..757f0164b2c77192f7a67bf979e59effee983415 --- /dev/null +++ b/lexer/file-noendofline.mj @@ -0,0 +1 @@ +noendofline diff --git a/lexer/file-noendofline.mj.out b/lexer/file-noendofline.mj.out new file mode 100644 index 0000000000000000000000000000000000000000..f7e66e6d98c8e1eafd5bdb47ad97195c115509c2 --- /dev/null +++ b/lexer/file-noendofline.mj.out @@ -0,0 +1,2 @@ +identifier noendofline +EOF diff --git a/lexer/invalid-integer.mj b/lexer/invalid-integer.mj new file mode 100644 index 0000000000000000000000000000000000000000..af21b805d5164d20b8ae4b426c93437b662c8757 --- /dev/null +++ b/lexer/invalid-integer.mj @@ -0,0 +1 @@ +int test = 42x; diff --git a/lexer/invalid-integer.mj.out b/lexer/invalid-integer.mj.out new file mode 100644 index 0000000000000000000000000000000000000000..76017c5151a55b4c009875367978d6a18f6a8078 --- /dev/null +++ b/lexer/invalid-integer.mj.out @@ -0,0 +1,7 @@ +int +identifier test += +integer literal 42 +identifier x +; +EOF diff --git a/lexer/nasty-comments.mj b/lexer/nasty-comments.mj new file mode 100644 index 0000000000000000000000000000000000000000..24e511deb33ae9c3703b70c8c283f3ab2e641fbb --- /dev/null +++ b/lexer/nasty-comments.mj @@ -0,0 +1,10 @@ +/* Test comments */ + +public void func/*TEST*/() { + int local /*-------*/ = 10; + + /** A comment with another /* comment starting within + + public int x; + */ +} diff --git a/lexer/nasty-comments.mj.out b/lexer/nasty-comments.mj.out new file mode 100644 index 0000000000000000000000000000000000000000..ca61ea5df68bc3028490d8d99c8a33ef1db655a3 --- /dev/null +++ b/lexer/nasty-comments.mj.out @@ -0,0 +1,13 @@ +public +void +identifier func +( +) +{ +int +identifier local += +integer literal 10 +; +} +EOF diff --git a/lexer/prinzip_des_laengsten_musters.mj b/lexer/prinzip_des_laengsten_musters.mj new file mode 100644 index 0000000000000000000000000000000000000000..bbeeee3bf11381647f0523ec85c2e767ffb7e67a --- /dev/null +++ b/lexer/prinzip_des_laengsten_musters.mj @@ -0,0 +1 @@ +==<<>>=====++=+=+--<==>==&&||&=|=>>>>>>>>=>>>=%=*=/=^= diff --git a/lexer/prinzip_des_laengsten_musters.mj.out b/lexer/prinzip_des_laengsten_musters.mj.out new file mode 100644 index 0000000000000000000000000000000000000000..cef93666a06973da248af87f1bc5ad68b580ef61 --- /dev/null +++ b/lexer/prinzip_des_laengsten_musters.mj.out @@ -0,0 +1,27 @@ +== +<< +>>= +== +== +++ += ++= ++ +-- +<= += +>= += +&& +|| +&= +|= +>>> +>>> +>>= +>>>= +%= +*= +/= +^= +EOF