From ba485f6937b02eef0c9a0ce56bcd8dcc8faeff40 Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Wed, 31 Mar 2021 22:17:57 +0200 Subject: [PATCH] [ #266 ] expanded test case --- testing/regression-tests/266_define/good01.in | 12 +++++++++--- testing/regression-tests/266_define/good01.out | 4 ++-- testing/regression-tests/266_define/test.cf | 6 +++++- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/testing/regression-tests/266_define/good01.in b/testing/regression-tests/266_define/good01.in index 758aa17f..81bbd3bb 100644 --- a/testing/regression-tests/266_define/good01.in +++ b/testing/regression-tests/266_define/good01.in @@ -1,3 +1,9 @@ -integers 1, 2, 3 -chars 'A'. 'a' -in 1.41421356237311 ** sqrt 2.71828182845905 ** 3.14159265358979 \ No newline at end of file +integers 1, 2, 3 +integers 4 +integers 5 + +chars 'A' . 'a' +chars 'B' +chars 'C' + +expression 1.41421356237311 ** sqrt 2.71828182845905 ** 3.14159265358979 \ No newline at end of file diff --git a/testing/regression-tests/266_define/good01.out b/testing/regression-tests/266_define/good01.out index c2f02a0b..5c9079b0 100644 --- a/testing/regression-tests/266_define/good01.out +++ b/testing/regression-tests/266_define/good01.out @@ -3,8 +3,8 @@ Parse Successful! [Abstract Syntax] -Prg (ISnoc (ISnoc (ISnoc INil 1) 2) 3) (CSnoc (CSnoc CNil (Dot ".") 'A') (Dot ".") 'a') (EPower (EDouble 1.41421356237311) (EPower (EPower (EDouble 2.71828182845905) EHalf) (EDouble 3.14159265358979))) +[SInts (ISnoc (ISnoc (ISnoc INil 1) 2) 3),SInts (ISnoc INil 4),SInts (ISnoc INil 5),SChars (CSnoc (CSnoc CNil (Dot ".") 'A') (Dot ".") 'a'),SChars (CSnoc CNil (Dot ".") 'B'),SChars (CSnoc CNil (Dot ".") 'C'),SExp (EPower (EDouble 1.41421356237311) (EPower (EPower (EDouble 2.71828182845905) EHalf) (EDouble 3.14159265358979)))] [Linearized tree] -integers, 1, 2, 3 chars . 'A' . 'a' in 1.41421356237311 ** (2.71828182845905 ** 1/2) ** 3.14159265358979 +integers, 1, 2, 3 integers, 4 integers, 5 chars . 'A' . 'a' chars . 'B' chars . 'C' expression 1.41421356237311 ** (2.71828182845905 ** 1/2) ** 3.14159265358979 diff --git a/testing/regression-tests/266_define/test.cf b/testing/regression-tests/266_define/test.cf index 9f866aa2..220277be 100644 --- a/testing/regression-tests/266_define/test.cf +++ b/testing/regression-tests/266_define/test.cf @@ -1,6 +1,10 @@ -- #266 "define" pragma -Prg. Program ::= "integers" Ints "chars" Chars "in" Exp ; +terminator Stm ""; + +SInts. Stm ::= "integers" Ints; +SChars. Stm ::= "chars" Chars; +SExp. Stm ::= "expression" Exp ; EHalf. Exp2 ::= "1/2" ; EDouble. Exp2 ::= Double ;