-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #367 from kyaushev/master
Алгоритм распознавания группового экранирования предложений (#341)
- Loading branch information
Showing
25 changed files
with
1,607 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
* WARNING multiscreening | ||
|
||
$ENTRY Go { | ||
= ; | ||
} | ||
|
||
$ENUM ErrorList; | ||
|
||
ADT-Test { | ||
[ErrorList (e.FileName) (e._) (e.Warnings)] e._ | ||
= EL-HasErrors; | ||
|
||
t.ErrorList e._ = EL-HasErrors; | ||
|
||
[ErrorList (e.FileName) () (e._ (s.WarningId e._) e._)] | ||
e._ | ||
s.WarningId | ||
e._ | ||
= EL-HasErrors; | ||
t.ADT e._ = /* пусто */; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
* WARNING multiscreening | ||
|
||
$ENTRY Go { | ||
= <Test> | ||
} | ||
|
||
Test { | ||
/* empty */ | ||
= { | ||
'I' e.Var 'd' = 0; | ||
e.Var = 1; | ||
'I am screened' = 2; | ||
} | ||
: e.Var | ||
= e.Var; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
* NO-WARNINGS | ||
|
||
$ENTRY Go { | ||
= <AssignTest 'b' A 'abc'> | ||
} | ||
|
||
AssignTest { | ||
e.X A e.Y | ||
= e.X : e.F | ||
= { | ||
e.Y = e.Y; | ||
e.F = e.X; | ||
'I am not screened' = e.Y | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
* WARNING multiscreening | ||
|
||
$ENTRY Go { | ||
= <BracketsInPatternTest (('a'))> | ||
} | ||
|
||
BracketsInPatternTest { | ||
s.X = True; | ||
(('a')) | ||
= 'a' | ||
: { | ||
t.x = 1; | ||
s.x = 2; | ||
'a' = 3; | ||
'A' = 4; | ||
'a' = 5; | ||
}; | ||
e.Y = False; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
* WARNING multiscreening | ||
|
||
$ENTRY Go { | ||
= <BracketsInPatternTest ('b')> | ||
} | ||
|
||
BracketsInPatternTest { | ||
(t.X) = True; | ||
((s.X)) = True; | ||
(('a')) = False; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
* WARNING multiscreening | ||
|
||
$ENTRY Go { | ||
= <F A (B C D)> | ||
} | ||
|
||
F { | ||
e.X t.Y (t.Z e.K) = 1; | ||
e.Y (e.Z) = 2; | ||
A e.Q (B C D) = 3; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
* WARNING multiscreening | ||
|
||
$ENTRY Go { | ||
= <BracketsClosureTest 'b'> | ||
} | ||
|
||
BracketsClosureTest { | ||
'a' = 0; | ||
s.X = ({e.Y = 1; s.x = 2}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
* NO-WARNINGS | ||
|
||
$ENTRY Go { | ||
= <ShellTest 'unix'> | ||
} | ||
|
||
GetEnv { | ||
e._ = '/zsh'; | ||
} | ||
|
||
ShellTest { | ||
'unix', <GetEnv 'SHELL'> : e.path '/tcsh' = Tcsh; | ||
|
||
'unix' = Bash; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
* WARNING multiscreening | ||
|
||
$ENTRY GO { | ||
= ; | ||
} | ||
|
||
EVarsTest1 { | ||
e.0 = 0; | ||
e.1 e.2 e.3 e.4 (e.5) = 1; | ||
} | ||
|
||
EVarsTest2 { | ||
e.0 e.1 e.2 e.3 e.4 = 0; | ||
(e.5) = 1; | ||
} | ||
|
||
EVarsTest3 { | ||
e.1 A e.2 | ||
= { | ||
e.3 = e.1; | ||
'I am screened' = e.2 | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
* NO-WARNINGS | ||
|
||
$ENTRY Go { | ||
= ; | ||
} | ||
|
||
EVarsTest1 { | ||
e.X s.Y = True; | ||
s.Y e.X = False | ||
} | ||
|
||
EVarsTest2 { | ||
(e.shift) e.shift e.blanks = ; | ||
(e.shift) e.blanks = ; | ||
} | ||
|
||
EVarsTest2s { | ||
e.shift | ||
= { | ||
e.shift e.blanks = ; | ||
e.blanks = ; | ||
} | ||
} | ||
|
||
EVarsTest3 { | ||
(e.shift) (e.shift e.blanks) = ; | ||
(e.shift) (e.blanks) = ; | ||
} | ||
|
||
EVarsTest4 { | ||
(e.X1 t.1)(e.X2 t.1) = ; | ||
(t.1 e.X1)(t.1 e.X2) = ; | ||
} | ||
|
||
EVarsTest5 { | ||
t.A t.A e.B = 1; | ||
t.A t._ e._ = 2; | ||
} | ||
|
||
EVarsTest6 { | ||
(t.1 e.1)(t.1 e.2) = 1; | ||
(e.1 t.1)(e.2 t.1) = 2; | ||
} | ||
|
||
EVarsTest7 { | ||
(t.1 e.1)(t.1 e.1) = 1; | ||
(e.2 t.2)(e.2 t.2) = 2; | ||
} | ||
|
||
EVarsTest8 { | ||
(e.value':'(Var s.t s.i e.elevi)) (e.value1':'(Var s.t s.i e.elevj)) e.assign | ||
= (e.value':'(Var s.t s.i e.elevi)) e.assign; | ||
t.assigni t.assignj e.assign = t.assignj <EVarsTest8 t.assigni e.assign>; | ||
t.assigni = t.assigni; | ||
} | ||
|
||
EVarsTest9 { | ||
(Output t.restr ((Expectant)':'t.var)) t.out-var = ; | ||
(Output t.restr ((No)':'t.var)) t.out-var = ; | ||
(Output t.restr (e.out-expr ':'t.var)) t.out-var = ; | ||
(Output t.restr (e.out-expr ':'t.var)) = ; | ||
(Basic e.basic (Output t.restr ((Expectant)':'t.var)) ':' t.out-var) = ; | ||
(Basic e.basic (Output t.restr ((No)':'t.var)) ':' t.out-var) = ; | ||
(Basic e.basic (Output t.restr (e.out-expr':'t.var)) ':' t.out-var), | ||
<EVarsTest9 <EVarsTest9 Of Expr e.out-expr>>: e.assign = ; | ||
} | ||
|
||
EVarsTest10 { | ||
(Recur t.basics) t.dict s.global (s.type e.n-graph) t.outfmt = ; | ||
(Recur t.basics t.finish) t.dict s.global (s.type e.n-graph) t.outfmt =; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
* WARNING multiscreening | ||
|
||
$ENTRY Go { | ||
= ; | ||
} | ||
|
||
FLoatingTVarTest1 { | ||
e.X1 t.Y1 = 1; | ||
t.X2 e.Y2 = 2; | ||
} | ||
|
||
FLoatingTVarTest2 { | ||
t.X1 e.Y1 = 1; | ||
e.X2 t.Y2 = 2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
* WARNING multiscreening | ||
|
||
$ENTRY GO { | ||
= ; | ||
} | ||
|
||
RepeatedVarsConditions { | ||
s.1 (e.2) (s.3) (e.4) = 0; | ||
s.1 (e.2) t.3 t.4 = 1; | ||
s.1 (e.2) (s.1) (e.2), s.1 : 'A' = 2; | ||
} | ||
|
||
Eq { | ||
t.X t.Y | ||
, t.X | ||
: { | ||
t.Y^ = True; | ||
t.Y = False; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
* NO-WARNINGS | ||
|
||
$ENTRY GO { | ||
= ; | ||
} | ||
|
||
/*RepeatedVars { | ||
s.1 (e.2) (s.1) (e.2) = 0; | ||
s.1 (e.2) (s.1) (e.2) = 1; | ||
}*/ | ||
|
||
|
||
Eq1 { | ||
t.X t.Y | ||
, t.X | ||
: { | ||
t.Y = True; | ||
t.Other = False; | ||
} | ||
} | ||
|
||
Eq2 { | ||
t.X t.Y | ||
, t.X | ||
: { | ||
t.Y = True; | ||
t.Y^ = False; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
* WARNING multiscreening | ||
|
||
$ENUM Apply; | ||
|
||
$ENTRY Go { | ||
= ; | ||
} | ||
|
||
TestScreening1 { | ||
e.x 'A' = 1; | ||
e.x t.1 t.2 t.3 e.y = 2; | ||
'A' t.1 = 3; | ||
'A' e.x = 4; | ||
} | ||
|
||
TestScreening2 { | ||
t.1 t.2 e.3 = One; | ||
e.X t.Y = Two; | ||
/* пусто */ = Three; | ||
e.X = "Boom!"; | ||
} | ||
|
||
Map { | ||
t.Fn t.Next e.Tail = <Apply t.Fn t.Next> <Map t.Fn e.Tail>; | ||
t.Fn /* пусто */ = /* пусто */; | ||
t.FUNC e.items = <Map t.FUNC e.items>; | ||
} |
Oops, something went wrong.