Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
sarah.grebing
ProofScriptParser
Commits
d15e3322
Commit
d15e3322
authored
Jun 06, 2017
by
Sarah Grebing
Browse files
added first part of parser testcases
parent
ae540f2f
Pipeline
#10952
failed with stage
in 2 minutes and 43 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/test/resources/edu/kit/formal/proofscriptparser/badexpr.txt
View file @
d15e3322
)i*j
not (match `d5'` using [ pi:int, isLess :bool, khar:term] -> false | k < b3o ) - (-k-p*2)
?2bA
? f-d4
?true
(p->q) | k==s
case p:=true :{x:=x+1;}case p=false :{x:=x-1;}
case q=(r&s) :{ y:=2*x-d;}case q!=(r&s) { y:=3*x+d;}
case p=(q|b) :b:=p<=>q; s:=true;case p=not(q|b) :{ b:=r<=>d; s:=false;}
// q := t this should raise a syntax error because ; is missing
repeat{ k:=k+1; auto;
repeat{ theonly{ puD:int := ie4+41-iZ;}cmd1;} //linter?
case{ cases a>gh :{ repeat{ a := a*b+1;df:= 5*fd-df;}}default :{ cf:=a>df;}}
//2pF:int //should raise a syntax error, ids are not allowed to start with a number
cases{ case dl=true:{ ft:=true;}case dl=false:{ ft:=sp&rd; }};
//symbex //; is missing
call sCmd5;;
script test(aX:int; aY:int){}
;
src/test/resources/edu/kit/formal/proofscriptparser/badlytypedexpr.txt
View file @
d15e3322
...
...
@@ -2,4 +2,17 @@ true+1
1 | 2 & a
a ==> i
6*true+i
a==>3
\ No newline at end of file
a==>3
sd | f -> d < 5 + qw = p & rt <=> k2
(a + b) / d * 8 - 2 & ( true -> `az` ) | "ava" > ?diva
-(-n-69) & not (match `d5'` using [ pi:int, isLess :bool, khar:term] -> false | k < b3o )
(a>b) + 1
match `h(X)->q` using [q:bool] * 2
p->`f(c,d)==>q`
p&q->term|tV
k2=ds-wr*x;
m>n := t|p;
isLess:bool := a*b+6;
bool := cl|c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+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1
src/test/resources/edu/kit/formal/proofscriptparser/scripts/assignment.txt
0 → 100644
View file @
d15e3322
//this is a bad example, should be rejected from linter
script aB5()
{ jD4:int := -a7*Sk;
}
src/test/resources/edu/kit/formal/proofscriptparser/scripts/cases.txt
0 → 100644
View file @
d15e3322
script ruRg ()
{ cases
{ case abc :
{ aM:term:=not ka&bi;
dsL f5=90;
}
case 85 :
{ last;
}
}
foreach
{ theonly
{ hz := false;
}
black;
}
}
\ No newline at end of file
src/test/resources/edu/kit/formal/proofscriptparser/scripts/repeat.txt
0 → 100644
View file @
d15e3322
script Da9B (man:bool, zo3:term)
{ b3g;
repeat
{ k:=match `ks&jg` using [w5:int];
big2;
}
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment