-
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.
Генерация общего префикса для второй группы (#15)
- Loading branch information
Showing
2 changed files
with
437 additions
and
18 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,360 @@ | ||
//FROM refalrts | ||
|
||
$ENTRY Go { | ||
= <RESULT | ||
<OutlineConstants | ||
(0 ) | ||
(0 ) | ||
(0 ) | ||
(#LABEL 1 ) | ||
(#CmdVar #AlgLeft 2 't' 5 ) | ||
(#CmdVariableDebugTable 't.Config#1' 5 ) | ||
(#CmdVariableDebugTable 'e.Message#1' 2 ) | ||
(#CmdCreateElem #Allocate 7 #ElName 'WriteLine' ) | ||
(#CmdCreateElem #Allocate 8 #ElString 'LINK ERROR: ' ) | ||
(#CmdCreateElem #Allocate 12 #ElName 'CreateErrorFileMark' ) | ||
(#CmdCreateElem #Allocate 15 #ElName 'Exit' ) | ||
(#CmdCreateElem #Allocate 16 #ElNumber 1 ) | ||
(#CmdInsertRange 8 ) | ||
(#LABEL 141 ) | ||
(#CmdCallSave #AlgLeft 0 2 ) | ||
(#CmdChar #AlgRight 2 'l' ) | ||
(#CmdChar #AlgRight 2 's' ) | ||
(#CmdChar #AlgRight 2 'a' ) | ||
(#CmdChar #AlgRight 2 'r' ) | ||
(#CmdChar #AlgRight 2 '.' ) | ||
(#CmdVariableDebugTable 'e.FileName#1' 2 ) | ||
(#CmdCreateElem #Allocate 6 #ElName 'Lower' ) | ||
(#CmdCreateElem #Allocate 8 #ElName 'GetLastPartName' ) | ||
(#LABEL 142 ) | ||
(#CmdCallSave #AlgLeft 0 2 ) | ||
(#CmdVariableDebugTable 'e.FileName#1' 2 ) | ||
(#CmdCreateElem #Allocate 6 #ElName 'DoGetFileName' ) | ||
(#LABEL 146 ) | ||
(#CmdCallSave #AlgLeft 0 2 ) | ||
(#CmdOnFailGoTo 145 "Func name:" 'DoGetFileName' ) | ||
(#CmdSave 2 5 ) | ||
(#CmdVar #AlgRight 5 's' 7 ) | ||
(#CmdOnFailGoTo 143 "Func name:" 'DoGetFileName' ) | ||
(#CmdChar #AlgTerm 7 '/' ) | ||
(#CmdVariableDebugTable 'e.FileName#1' 5 ) | ||
(#LABEL 143 ) | ||
(#CmdProfilerStopSentence ) | ||
(#CmdOnFailGoTo 144 "Func name:" 'DoGetFileName' ) | ||
(#CmdChar #AlgTerm 7 '\\' ) | ||
(#CmdVariableDebugTable 'e.FileName#1' 5 ) | ||
(#LABEL 144 ) | ||
(#CmdProfilerStopSentence ) | ||
(#CmdVariableDebugTable 's.Last#1' 7 ) | ||
(#CmdVariableDebugTable 'e.FileName#1' 5 ) | ||
(#CmdCreateElem #Allocate 9 #ElName 'DoGetFileName' ) | ||
(#LABEL 145 ) | ||
(#CmdProfilerStopSentence ) | ||
(#CmdEmpty #AlgLeft 2 ) | ||
> | ||
>; | ||
} | ||
|
||
RESULT { | ||
(#CmdFuncArray 6 | ||
('DoGetFileName' ) | ||
('GetLastPartName' ) | ||
('Lower' ) | ||
('Exit' ) | ||
('CreateErrorFileMark' ) | ||
('WriteLine' ) | ||
) | ||
(#CmdIdentArray 0 | ||
) | ||
(#CmdStringArray 5 | ||
('e.FileName#1' ) | ||
('s.Last#1' ) | ||
('LINK ERROR: ' ) | ||
('e.Message#1' ) | ||
('t.Config#1' ) | ||
) | ||
(#LABEL 1 ) | ||
(#CmdVar #AlgLeft 2 't' 5 ) | ||
(#CmdVariableDebugTable 4 5 ) | ||
(#CmdVariableDebugTable 3 2 ) | ||
(#CmdCreateElem #Allocate 7 #ElName 5 ) | ||
(#CmdCreateElem #Allocate 8 #ElString 2 ) | ||
(#CmdCreateElem #Allocate 12 #ElName 4 ) | ||
(#CmdCreateElem #Allocate 15 #ElName 3 ) | ||
(#CmdCreateElem #Allocate 16 #ElNumber 1 ) | ||
(#CmdInsertRange 8 ) | ||
(#LABEL 141 ) | ||
(#CmdCallSave #AlgLeft 0 2 ) | ||
(#CmdChar #AlgRight 2 'l' ) | ||
(#CmdChar #AlgRight 2 's' ) | ||
(#CmdChar #AlgRight 2 'a' ) | ||
(#CmdChar #AlgRight 2 'r' ) | ||
(#CmdChar #AlgRight 2 '.' ) | ||
(#CmdVariableDebugTable 0 2 ) | ||
(#CmdCreateElem #Allocate 6 #ElName 2 ) | ||
(#CmdCreateElem #Allocate 8 #ElName 1 ) | ||
(#LABEL 142 ) | ||
(#CmdCallSave #AlgLeft 0 2 ) | ||
(#CmdVariableDebugTable 0 2 ) | ||
(#CmdCreateElem #Allocate 6 #ElName 0 ) | ||
(#LABEL 146 ) | ||
(#CmdCallSave #AlgLeft 0 2 ) | ||
(#CmdOnFailGoTo 145 "Func name:" 'DoGetFileName' ) | ||
(#CmdSave 2 5 ) | ||
(#CmdVar #AlgRight 5 's' 7 ) | ||
(#CmdOnFailGoTo 143 "Func name:" 'DoGetFileName' ) | ||
(#CmdChar #AlgTerm 7 '/' ) | ||
(#CmdVariableDebugTable 0 5 ) | ||
(#LABEL 143 ) | ||
(#CmdProfilerStopSentence ) | ||
(#CmdOnFailGoTo 144 "Func name:" 'DoGetFileName' ) | ||
(#CmdChar #AlgTerm 7 '\\' ) | ||
(#CmdVariableDebugTable 0 5 ) | ||
(#LABEL 144 ) | ||
(#CmdProfilerStopSentence ) | ||
(#CmdVariableDebugTable 1 7 ) | ||
(#CmdVariableDebugTable 0 5 ) | ||
(#CmdCreateElem #Allocate 9 #ElName 0 ) | ||
(#LABEL 145 ) | ||
(#CmdProfilerStopSentence ) | ||
(#CmdEmpty #AlgLeft 2 ) | ||
= ; | ||
} | ||
|
||
|
||
Inc { | ||
0 = 1; 1 = 2; 2 = 3; 3 = 4; 4 = 5; | ||
5 = 6; 6 = 7; 7 = 8; 8 = 9; 9 = 0; | ||
} | ||
|
||
Map-RemoveNumber { | ||
(s.Number e.Name) e.Rest = (e.Name) <Map-RemoveNumber e.Rest>; | ||
/* пусто */ = /* пусто */; | ||
} | ||
|
||
OutlineConstants { | ||
(s.NextFunc e.Funcs) | ||
(s.NextIdent e.Idents) | ||
(s.NextString e.Strings) | ||
/* пусто */ = | ||
(#CmdFuncArray s.NextFunc <Map-RemoveNumber e.Funcs>) | ||
(#CmdIdentArray s.NextIdent <Map-RemoveNumber e.Idents>) | ||
(#CmdStringArray s.NextString <Map-RemoveNumber e.Strings>); | ||
|
||
(s.NextFunc e.Funcs-B (s.Num e.Func) e.Funcs-E) (e.Idents) | ||
(e.Strings) | ||
e.Commands | ||
(#CmdName s.Direction s.BracketNum e.Func) = | ||
<OutlineConstants | ||
(s.NextFunc e.Funcs-B (s.Num e.Func) e.Funcs-E) (e.Idents) | ||
(e.Strings) | ||
e.Commands | ||
> | ||
(#CmdName s.Direction s.BracketNum s.Num); | ||
|
||
(s.NextFunc e.Funcs) (e.Idents) (e.Strings) | ||
e.Commands | ||
(#CmdName s.Direction s.BracketNum e.Func) = | ||
<OutlineConstants | ||
(<Inc s.NextFunc> e.Funcs (s.NextFunc e.Func)) (e.Idents) | ||
(e.Strings) | ||
e.Commands | ||
> | ||
(#CmdName s.Direction s.BracketNum s.NextFunc); | ||
|
||
(s.NextFunc e.Funcs-B (s.Num e.Func) e.Funcs-E) (e.Idents) | ||
(e.Strings) | ||
e.Commands | ||
(#CmdNameSave s.Direction s.BracketNum s.SaveOffset e.Func) = | ||
<OutlineConstants | ||
(s.NextFunc e.Funcs-B (s.Num e.Func) e.Funcs-E) (e.Idents) | ||
(e.Strings) | ||
e.Commands | ||
> | ||
(#CmdNameSave s.Direction s.BracketNum s.SaveOffset s.Num); | ||
|
||
(s.NextFunc e.Funcs) (e.Idents) (e.Strings) | ||
e.Commands | ||
(#CmdNameSave s.Direction s.BracketNum s.SaveOffset e.Func) = | ||
<OutlineConstants | ||
(<Inc s.NextFunc> e.Funcs (s.NextFunc e.Func)) (e.Idents) | ||
(e.Strings) | ||
e.Commands | ||
> | ||
(#CmdNameSave s.Direction s.BracketNum s.SaveOffset s.NextFunc); | ||
|
||
(s.NextFunc e.Funcs-B (s.Num e.Func) e.Funcs-E) (e.Idents) | ||
(e.Strings) | ||
e.Commands | ||
(#CmdCreateElem s.CreateMode s.ElemNo #ElName e.Func) = | ||
<OutlineConstants | ||
(s.NextFunc e.Funcs-B (s.Num e.Func) e.Funcs-E) (e.Idents) | ||
(e.Strings) | ||
e.Commands | ||
> | ||
(#CmdCreateElem s.CreateMode s.ElemNo #ElName s.Num); | ||
|
||
(s.NextFunc e.Funcs) (e.Idents) (e.Strings) | ||
e.Commands | ||
(#CmdCreateElem s.CreateMode s.ElemNo #ElName e.Func) = | ||
<OutlineConstants | ||
(<Inc s.NextFunc> e.Funcs (s.NextFunc e.Func)) (e.Idents) | ||
(e.Strings) | ||
e.Commands | ||
> | ||
(#CmdCreateElem s.CreateMode s.ElemNo #ElName s.NextFunc); | ||
|
||
(s.NextFunc e.Funcs-B (s.Num e.Func) e.Funcs-E) (e.Idents) | ||
(e.Strings) | ||
e.Commands | ||
(#CmdADT s.Direction s.BracketNum s.InnerBrackets e.Func) = | ||
<OutlineConstants | ||
(s.NextFunc e.Funcs-B (s.Num e.Func) e.Funcs-E) (e.Idents) | ||
(e.Strings) | ||
e.Commands | ||
> | ||
(#CmdADT s.Direction s.BracketNum s.InnerBrackets s.Num); | ||
|
||
(s.NextFunc e.Funcs) (e.Idents) (e.Strings) | ||
e.Commands | ||
(#CmdADT s.Direction s.BracketNum s.InnerBrackets e.Func) = | ||
<OutlineConstants | ||
(<Inc s.NextFunc> e.Funcs (s.NextFunc e.Func)) (e.Idents) | ||
(e.Strings) | ||
e.Commands | ||
> | ||
(#CmdADT s.Direction s.BracketNum s.InnerBrackets s.NextFunc); | ||
|
||
(s.NextFunc e.Funcs-B (s.Num e.Func) e.Funcs-E) (e.Idents) | ||
(e.Strings) | ||
e.Commands | ||
(#CmdADTSave s.Direction s.BracketNum s.InnerBrackets e.Func) = | ||
<OutlineConstants | ||
(s.NextFunc e.Funcs-B (s.Num e.Func) e.Funcs-E) (e.Idents) | ||
(e.Strings) | ||
e.Commands | ||
> | ||
(#CmdADTSave s.Direction s.BracketNum s.InnerBrackets s.Num); | ||
|
||
(s.NextFunc e.Funcs) (e.Idents) (e.Strings) | ||
e.Commands | ||
(#CmdADTSave s.Direction s.BracketNum s.InnerBrackets e.Func) = | ||
<OutlineConstants | ||
(<Inc s.NextFunc> e.Funcs (s.NextFunc e.Func)) (e.Idents) | ||
(e.Strings) | ||
e.Commands | ||
> | ||
(#CmdADTSave s.Direction s.BracketNum s.InnerBrackets s.NextFunc); | ||
|
||
(e.Funcs) (s.NextIdent e.Idents-B (s.Num e.Ident) e.Idents-E) | ||
(e.Strings) | ||
e.Commands | ||
(#CmdIdent s.Direction s.BracketNum e.Ident) = | ||
<OutlineConstants | ||
(e.Funcs) (s.NextIdent e.Idents-B (s.Num e.Ident) e.Idents-E) | ||
(e.Strings) | ||
e.Commands | ||
> | ||
(#CmdIdent s.Direction s.BracketNum s.Num); | ||
|
||
(e.Funcs) (s.NextIdent e.Idents) (e.Strings) | ||
e.Commands | ||
(#CmdIdent s.Direction s.BracketNum e.Ident) = | ||
<OutlineConstants | ||
(e.Funcs) (<Inc s.NextIdent> e.Idents (s.NextIdent e.Ident)) | ||
(e.Strings) | ||
e.Commands | ||
> | ||
(#CmdIdent s.Direction s.BracketNum s.NextIdent); | ||
|
||
(e.Funcs) (s.NextIdent e.Idents-B (s.Num e.Ident) e.Idents-E) | ||
(e.Strings) | ||
e.Commands | ||
(#CmdIdentSave s.Direction s.BracketNum s.SaveOffset e.Ident) = | ||
<OutlineConstants | ||
(e.Funcs) (s.NextIdent e.Idents-B (s.Num e.Ident) e.Idents-E) | ||
(e.Strings) | ||
e.Commands | ||
> | ||
(#CmdIdentSave s.Direction s.BracketNum s.SaveOffset s.Num); | ||
|
||
(e.Funcs) (s.NextIdent e.Idents) (e.Strings) | ||
e.Commands | ||
(#CmdIdentSave s.Direction s.BracketNum s.SaveOffset e.Ident) = | ||
<OutlineConstants | ||
(e.Funcs) (<Inc s.NextIdent> e.Idents (s.NextIdent e.Ident)) | ||
(e.Strings) | ||
e.Commands | ||
> | ||
(#CmdIdentSave s.Direction s.BracketNum s.SaveOffset s.NextIdent); | ||
|
||
(e.Funcs) (s.NextIdent e.Idents-B (s.Num e.Ident) e.Idents-E) | ||
(e.Strings) | ||
e.Commands | ||
(#CmdCreateElem s.CreateMode s.ElemNo #ElIdent e.Ident) = | ||
<OutlineConstants | ||
(e.Funcs) (s.NextIdent e.Idents-B (s.Num e.Ident) e.Idents-E) | ||
(e.Strings) | ||
e.Commands | ||
> | ||
(#CmdCreateElem s.CreateMode s.ElemNo #ElIdent s.Num); | ||
|
||
(e.Funcs) (s.NextIdent e.Idents) (e.Strings) | ||
e.Commands | ||
(#CmdCreateElem s.CreateMode s.ElemNo #ElIdent e.Ident) = | ||
<OutlineConstants | ||
(e.Funcs) (<Inc s.NextIdent> e.Idents (s.NextIdent e.Ident)) | ||
(e.Strings) | ||
e.Commands | ||
> | ||
(#CmdCreateElem s.CreateMode s.ElemNo #ElIdent s.NextIdent); | ||
|
||
(e.Funcs) (e.Idents) | ||
(s.NextStringId e.Strings-B (s.Id e.String) e.Strings-E) | ||
e.Commands | ||
(#CmdCreateElem s.CreateMode s.ElemNo #ElString e.String) = | ||
<OutlineConstants | ||
(e.Funcs) (e.Idents) | ||
(s.NextStringId e.Strings-B (s.Id e.String) e.Strings-E) | ||
e.Commands | ||
> | ||
(#CmdCreateElem s.CreateMode s.ElemNo #ElString s.Id); | ||
|
||
(e.Funcs) (e.Idents) (s.NextStringId e.Strings) | ||
e.Commands | ||
(#CmdCreateElem s.CreateMode s.ElemNo #ElString e.String) = | ||
<OutlineConstants | ||
(e.Funcs) (e.Idents) | ||
(<Inc s.NextStringId> e.Strings (s.NextStringId e.String)) | ||
e.Commands | ||
> | ||
(#CmdCreateElem s.CreateMode s.ElemNo #ElString s.NextStringId); | ||
|
||
(e.Funcs) (e.Idents) | ||
(s.NextStringId e.Strings-B (s.Id e.VarName) e.Strings-E) | ||
e.Commands | ||
(#CmdVariableDebugTable e.VarName s.Offset) = | ||
<OutlineConstants | ||
(e.Funcs) (e.Idents) | ||
(s.NextStringId e.Strings-B (s.Id e.VarName) e.Strings-E) | ||
e.Commands | ||
> | ||
(#CmdVariableDebugTable s.Id s.Offset); | ||
|
||
(e.Funcs) (e.Idents) | ||
(s.NextStringId e.Strings) | ||
e.Commands | ||
(#CmdVariableDebugTable e.VarName s.Offset) = | ||
<OutlineConstants | ||
(e.Funcs) (e.Idents) | ||
(<Inc s.NextStringId> e.Strings (s.NextStringId e.VarName)) | ||
e.Commands | ||
> | ||
(#CmdVariableDebugTable s.NextStringId s.Offset); | ||
|
||
(e.Funcs) (e.Idents) (e.Strings) | ||
e.Commands | ||
t.OtherCommand = | ||
<OutlineConstants (e.Funcs) (e.Idents) (e.Strings) e.Commands> | ||
t.OtherCommand; | ||
} |
Oops, something went wrong.