Revision: 815
Author:
wanderl...@gmail.com
Date: Thu Apr 4 11:42:55 2013
Log: Parser for embedded config objects
http://code.google.com/p/extpascal/source/detail?r=815
Modified:
/trunk/ExtJSWrapper/Ext.pas
/trunk/ExtJSWrapper/ExtFixes.txt
/trunk/ExtJSWrapper/ExtToPascal.dpr
/trunk/ExtJSWrapper/ExtToPascal.dsk
=======================================
--- /trunk/ExtJSWrapper/Ext.pas Thu Apr 4 07:45:06 2013
+++ /trunk/ExtJSWrapper/Ext.pas Thu Apr 4 11:42:55 2013
File is too large to display a diff.
=======================================
--- /trunk/ExtJSWrapper/ExtFixes.txt Thu Apr 4 07:45:06 2013
+++ /trunk/ExtJSWrapper/ExtFixes.txt Thu Apr 4 11:42:55 2013
@@ -42,8 +42,6 @@
ExtMessageBox, ExtWindowMessageBox, singleton, Ext.MessageBox
-ExtWindowMessageBox, show, ExtFunction, false, false, Config,
ExtShowConfig, false
-
ExtMessageBoxSingleton, ERROR, string, true, false, 'ext-mb-error'
ExtMessageBoxSingleton, INFO, string, true, false, 'ext-mb-info'
ExtMessageBoxSingleton, QUESTION, string, true, false, 'ext-mb-question'
@@ -56,40 +54,7 @@
ExtMessageBoxSingleton, YESNO, Integer, true, false, 6
ExtMessageBoxSingleton, YESNOCANCEL, Integer, true, false, 14
-ExtShowConfig,, Ext, Object
-ExtShowConfig, animTarget, string, false, true,
-ExtShowConfig, buttons, Integer, false, true,
-ExtShowConfig, closable, Boolean, false, true, true
-ExtShowConfig, cls, string, false, true,
-ExtShowConfig, defaultTextHeight, Integer, false, true, 75
-ExtShowConfig, fn, ExtFunction, false, true,
-ExtShowConfig, scope, ExtObject, false, true,
-ExtShowConfig, icon, string, false, true,
-ExtShowConfig, iconCls, string, false, true,
-ExtShowConfig, defaultFocus, string, false, true,
-ExtShowConfig, maxWidth, Integer, false, true, 600
-ExtShowConfig, minWidth, Integer, false, true, 100
-ExtShowConfig, modal, Boolean, false, true, true
-ExtShowConfig, msg, string, false, true,
-ExtShowConfig, multiline, Boolean, false, true,
-ExtShowConfig, progress, Boolean, false, true,
-ExtShowConfig, progressText, string, false, true,
-ExtShowConfig, prompt, Boolean, false, true,
-ExtShowConfig, proxyDrag, Boolean, false, true,
-ExtShowConfig, title, string, false, true,
-ExtShowConfig, value, string, false, true,
-ExtShowConfig, wait, Boolean, false, true,
-ExtShowConfig, waitConfig, ExtProgressWaitConfig, false, true,
-ExtShowConfig, width, Integer, false, true,
-
-ExtProgressWaitConfig,, Ext, Object
-ExtProgressWaitConfig, duration, Integer, false, true,
-ExtProgressWaitConfig, interval, Integer, false, true, 1000
-ExtProgressWaitConfig, animate, Boolean, false, true,
-ExtProgressWaitConfig, increment, Integer, false, true, 10
-ExtProgressWaitConfig, text, string, false, true,
-ExtProgressWaitConfig, fn, ExtFunction, false, true,
-ExtProgressWaitConfig, scope, ExtObject, false, true,
+ExtShowConfig, waitConfig, ExtWaitConfig, false, true,
ExtGridColumn, align, (alLeft, alRight, alCenter)
ExtPanel, buttonAlign, (buRight, buLeft, buCenter)
=======================================
--- /trunk/ExtJSWrapper/ExtToPascal.dpr Wed Apr 3 15:06:33 2013
+++ /trunk/ExtJSWrapper/ExtToPascal.dpr Thu Apr 4 11:42:55 2013
@@ -415,15 +415,69 @@
CurClass : TClass;
Matches : TStringList;
+ procedure ParseConfigEmbedded(MetName, ConfigName, PropName, Type_ :
string; LastParam : TParam);
+ var
+ I : Integer;
+ ConfigClass : TClass;
+ begin
+ ConfigName := FixIdent(JS_LIB + MetName + FixIdent(ConfigName));
+ I := AllClasses.IndexOf('T' + ConfigName);
+ if I = -1 then begin
+ ConfigClass := TClass.Create(ConfigName, 'ExtObject');
+ AllClasses.AddObject(ConfigClass.Name, ConfigClass);
+ LastParam.Typ := ConfigClass.Name;
+ end
+ else
+ ConfigClass := TClass(AllClasses.Objects[I]);
+ PropName := FixIdent(PropName);
+ if pos('/', Type_) <> 0 then
+ case First(['String', 'Number', 'Object'], Type_) of
+ 0 : Type_ := 'String';
+ 1 : Type_ := 'Number';
+ 2 : Type_ := 'Object';
+ end;
+ ConfigClass.Properties.AddObject(PropName, TProp.Create(PropName,
PropName, Type_, False, True))
+ end;
+
+ procedure ParseArgs(MetName : string; var Args : TStringList; IsEvent :
Boolean);
+ var
+ Params : String;
+ I : Integer;
+ Optional : Boolean;
+ LastParam : TParam;
+ begin
+ Params := IfThen(IsEvent, Matches[1], Matches[0]);
+ Args := TStringList.Create;
+ while pos('@param', Params) <> 0 do begin
+ if not Extract(['@param', '{', '} ', ' ', ' '], Params, Matches) then
+ break;
+ if Trim(Matches[2]) = '' then continue;
+ Optional := pos('[', Matches[2]) = 1;
+ if Matches.Count = 4 then
+ Optional := Optional or (pos('(optional)', LowerCase(Matches[3]))
<> 0);
+ I := pos('.', Matches[2]);
+ if (I <> 0) and (Args.Count <> 0) then begin
+ LastParam := TParam(Args.Objects[Args.Count-1]);
+ if LastParam.Typ <> 'TExtFunction' then
+ ParseConfigEmbedded(MetName, Copy(Matches[2], 1, I-1),
Copy(Matches[2], I+1, 30), Matches[1], LastParam);
+ end
+ else begin
+ Matches[2] := Unique(FixIdent(Matches[2]), Args);
+ if IsEvent and SameText(Matches[2], 'This') then
+ Matches[1] := CurClass.Name;
+ Args.AddObject(Matches[2], TParam.Create(Matches[2],
FixType(Matches[1]), Optional));
+ end;
+ end;
+ end;
+
procedure ParseFunction(IsEvent : boolean);
var
- JSName, Params, MetName, Return : string;
- Static, Optional : boolean;
+ JSName, MetName, Return : string;
+ Static : boolean;
CurMethod : TMethod;
Args : TStringList;
begin
JSName := IfThen(IsEvent, Matches[0], Matches[1]);
- Params := IfThen(IsEvent, Matches[1], Matches[0]);
if (length(JSName) > 30) or (FixIdent(JSName) = '') or // Doc fault
((JSName = 'destroy') and not IsEvent) then exit;
if JSName = 'create' then CurClass.AltCreate := true;
@@ -443,20 +497,7 @@
else
Return := 'TExtFunction';
end;
- Args := TStringList.Create;
- while pos('@param', Params) <> 0 do begin
- if not Extract(['@param', '{', '} ', ' ', ' '], Params, Matches) then
- break;
- if (Trim(Matches[2]) = '') or (pos('.', Matches[2]) <> 0) then
- continue; // Discard embedded config objects
- Optional := pos('[', Matches[2]) = 1;
- if Matches.Count = 4 then
- Optional := Optional or (pos('(optional)', LowerCase(Matches[3]))
<> 0);
- Matches[2] := Unique(FixIdent(Matches[2]), Args);
- if IsEvent and SameText(Matches[2], 'This') then
- Matches[1] := CurClass.Name;
- Args.AddObject(Matches[2], TParam.Create(Matches[2],
FixType(Matches[1]), Optional));
- end;
+ ParseArgs(MetName, Args, IsEvent);
CurMethod := TMethod.Create(MetName, JSName, Return, Args, Static,
false);
if IsEvent then
CurClass.Events.AddObject(CurMethod.Name, CurMethod)
@@ -838,9 +879,9 @@
C := TClass(AllClasses.Objects[I]);
P := C.Parent;
write(I, ^M);
- if C.Name <> BASE_CLASS then begin
+ if (C.Name <> BASE_CLASS) and (C.Name <> 'TExtObject') then begin
if P = '' then C.Parent := BASE_CLASS;
- while P <> '' do begin
+ while (P <> '') and (P <> 'TExtObject') do begin
J := AllClasses.IndexOf(P);
if J = -1 then begin
writeln('Parent: ', P, ' not found at class: ', C.Name);
=======================================
--- /trunk/ExtJSWrapper/ExtToPascal.dsk Wed Apr 3 15:06:33 2013
+++ /trunk/ExtJSWrapper/ExtToPascal.dsk Thu Apr 4 11:42:55 2013
@@ -1,58 +1,58 @@
[Closed Files]
-File_0=TSourceModule,'c:\program files (x86)\embarcadero\rad
studio\10.0\SOURCE\RTL\SYS\System.pas',0,1,15025,1,15046,0,0,,
-File_1=TSourceModule,'c:\program files (x86)\embarcadero\rad
studio\10.0\source\rtl\common\System.Classes.pas',0,1,6619,1,6644,0,0,,
-File_2=TSourceModule,'E:\extpascal\ext-4.2.0\src\window\MessageBox.js',0,1,353,1,148,0,0,,
-File_3=TSourceModule,'E:\extpascal\ext-4.2.0\src\data\reader\Reader.js',0,1,280,23,302,0,0,,
-File_4=TSourceModule,'E:\extpascal\ext-4.2.0\src\draw\Sprite.js',0,1,133,25,160,0,0,,
-File_5=TSourceModule,'E:\extpascal\ext-4.2.0\src\data\proxy\JsonP.js',0,1,145,16,180,0,0,,
-File_6=TSourceModule,'E:\extpascal\ext-4.2.0\src\view\View.js',0,1,389,27,390,0,0,,
-File_7=TSourceModule,'E:\extpascal\ext-4.2.0\src\selection\Model.js',0,1,76,16,89,0,0,,
-File_8=TSourceModule,'E:\extpascal\ext-4.2.0\src\data\SortTypes.js',0,1,44,24,65,0,0,,
-File_9=TSourceModule,'E:\extpascal\ext-4.2.0\src\Ext.js',0,1,1,14,6,0,0,,
-File_10=TSourceModule,'E:\extpascal\ext-4.2.0\src\data\Model.js',0,1,692,12,689,0,0,,
-File_11=TSourceModule,'E:\extpascal\ext-4.2.0\src\util\History.js',0,1,22,8,51,0,0,,
-File_12=TSourceModule,'E:\extpascal\ext-4.2.0\src\form\action\Action.js',0,1,269,12,292,0,0,,
-File_13=TSourceModule,'E:\extpascal\ext-4.2.0\src\draw\Surface.js',0,1,211,16,216,0,0,,
-File_14=TSourceModule,'E:\extpascal\ext-4.2.0\src\tab\Panel.js',0,1,413,47,415,0,0,,
-File_15=TSourceModule,'E:\extpascal\ext-4.2.0\src\dom\AbstractElement.js',0,1,5,46,9,0,0,,
-File_16=TSourceModule,'E:\extpascal\ext-4.2.0\src\draw\Component.js',0,1,261,60,262,0,0,,
-File_17=TSourceModule,'E:\extpascal\ext-4.2.0\src\draw\CompositeSprite.js',0,1,69,70,70,0,0,,
-File_18=TSourceModule,'E:\extpascal\ext-4.2.0\docs\resources\prettify\prettify.css',0,1,1,59,2,0,0,,
-File_19=TSourceModule,'E:\extpascal\ext-4.2.0\examples\build\KitchenSink\ext-theme-access\lib\prettify\prettify.css',0,1,16,5,35,0,0,,
+File_0=TSourceModule,'c:\program files (x86)\embarcadero\rad
studio\10.0\source\rtl\common\System.Classes.pas',0,1,6638,1,6659,0,0,,
+File_1=TSourceModule,'c:\program files (x86)\embarcadero\rad
studio\10.0\SOURCE\RTL\SYS\System.pas',0,1,27737,1,27777,0,0,,
+File_2=TSourceModule,'E:\extpascal\ExtJSWrapper\ExtFixes3.txt',0,1,37,1,37,0,0,,
+File_3=TSourceModule,'E:\extpascal\ext-4.2.0\src\window\MessageBox.js',0,1,353,1,148,0,0,,
+File_4=TSourceModule,'E:\extpascal\ext-4.2.0\src\data\reader\Reader.js',0,1,280,23,302,0,0,,
+File_5=TSourceModule,'E:\extpascal\ext-4.2.0\src\draw\Sprite.js',0,1,133,25,160,0,0,,
+File_6=TSourceModule,'E:\extpascal\ext-4.2.0\src\data\proxy\JsonP.js',0,1,145,16,180,0,0,,
+File_7=TSourceModule,'E:\extpascal\ext-4.2.0\src\view\View.js',0,1,389,27,390,0,0,,
+File_8=TSourceModule,'E:\extpascal\ext-4.2.0\src\selection\Model.js',0,1,76,16,89,0,0,,
+File_9=TSourceModule,'E:\extpascal\ext-4.2.0\src\data\SortTypes.js',0,1,44,24,65,0,0,,
+File_10=TSourceModule,'E:\extpascal\ext-4.2.0\src\Ext.js',0,1,1,14,6,0,0,,
+File_11=TSourceModule,'E:\extpascal\ext-4.2.0\src\data\Model.js',0,1,692,12,689,0,0,,
+File_12=TSourceModule,'E:\extpascal\ext-4.2.0\src\util\History.js',0,1,22,8,51,0,0,,
+File_13=TSourceModule,'E:\extpascal\ext-4.2.0\src\form\action\Action.js',0,1,269,12,292,0,0,,
+File_14=TSourceModule,'E:\extpascal\ext-4.2.0\src\draw\Surface.js',0,1,211,16,216,0,0,,
+File_15=TSourceModule,'E:\extpascal\ext-4.2.0\src\tab\Panel.js',0,1,413,47,415,0,0,,
+File_16=TSourceModule,'E:\extpascal\ext-4.2.0\src\dom\AbstractElement.js',0,1,5,46,9,0,0,,
+File_17=TSourceModule,'E:\extpascal\ext-4.2.0\src\draw\Component.js',0,1,261,60,262,0,0,,
+File_18=TSourceModule,'E:\extpascal\ext-4.2.0\src\draw\CompositeSprite.js',0,1,69,70,70,0,0,,
+File_19=TSourceModule,'E:\extpascal\ext-4.2.0\docs\resources\prettify\prettify.css',0,1,1,59,2,0,0,,
[Modules]
-Module0=E:\extpascal\ExtJSWrapper\Ext.pas
-Module1=E:\extpascal\ExtJSWrapper\ExtToPascal.dproj
-Module2=E:\extpascal\ExtPascal.pas
-Module3=E:\extpascal\ExtJSWrapper\ExtFixes.txt
-Module4=E:\extpascal\ExtPascalUtils.pas
+Module0=E:\extpascal\ExtJSWrapper\ExtToPascal.dproj
+Module1=E:\extpascal\ExtJSWrapper\ExtFixes.txt
+Module2=E:\extpascal\ExtJSWrapper\Ext.pas
+Module3=E:\extpascal\ExtPascalUtils.pas
+Module4=E:\extpascal\ExtPascal.pas
Count=5
EditWindowCount=1
+[E:\extpascal\ExtJSWrapper\ExtToPascal.dproj]
+ModuleType=TBaseProject
+
+[E:\extpascal\ExtJSWrapper\ExtFixes.txt]
+ModuleType=TSourceModule
+
[E:\extpascal\ExtJSWrapper\Ext.pas]
ModuleType=TSourceModule
FormState=0
FormOnTop=0
-[E:\extpascal\ExtJSWrapper\ExtToPascal.dproj]
-ModuleType=TBaseProject
-
-[E:\extpascal\ExtPascal.pas]
+[E:\extpascal\ExtPascalUtils.pas]
ModuleType=TSourceModule
FormState=0
FormOnTop=0
-[E:\extpascal\ExtJSWrapper\ExtFixes.txt]
-ModuleType=TSourceModule
-
-[E:\extpascal\ExtPascalUtils.pas]
+[E:\extpascal\ExtPascal.pas]
ModuleType=TSourceModule
FormState=0
FormOnTop=0
[EditWindow0]
ViewCount=5
-CurrentEditView=E:\extpascal\ExtJSWrapper\Ext.pas
+CurrentEditView=E:\extpascal\ExtJSWrapper\ExtToPascal.dpr
View0=0
View1=1
View2=2
@@ -74,75 +74,74 @@
DockedToMainForm=1
BorlandEditorCodeExplorer=BorlandEditorCodeExplorer@EditWindow0
TopPanelSize=0
-LeftPanelSize=1648
-LeftPanelClients=DockSite2
-LeftPanelData=000008000100000000009A1D00000000000000000000000000000001000000009A1D000009000000446F636B5369746532FFFFFFFF
+LeftPanelSize=0
RightPanelSize=0
BottomPanelSize=0
BottomPanelClients=DockSite1
BottomPanelData=0000080001000100000009000000446F636B5369746531D430000000000000002406000000000000FFFFFFFF
BottomMiddlePanelSize=1348
BottomMiddlePanelClients=DockSite0,GraphDrawingModel,MessageView
-BottomMiddelPanelData=0000080001020200000009000000446F636B536974653010000000477261706844726177696E6756696577AA280000000000000244050000000000000100000000AA2800000F0000004D65737361676556696577466F726DFFFFFFFF
+BottomMiddelPanelData=0000080001020200000009000000446F636B536974653010000000477261706844726177696E6756696577F32F0000000000000244050000000000000100000000F32F00000F0000004D65737361676556696577466F726DFFFFFFFF
+TabDockLeftClients=DockSite2=0
[View0]
CustomEditViewType=TEditView
-Module=E:\extpascal\ExtJSWrapper\Ext.pas
-CursorX=23
-CursorY=3040
-TopLine=3018
+Module=E:\extpascal\ExtJSWrapper\ExtToPascal.dpr
+CursorX=19
+CursorY=7
+TopLine=1
LeftCol=1
Elisions=
Bookmarks=
-EditViewName=E:\extpascal\ExtJSWrapper\Ext.pas
+EditViewName=E:\extpascal\ExtJSWrapper\ExtToPascal.dpr
[View1]
CustomEditViewType=TEditView
-Module=E:\extpascal\ExtJSWrapper\ExtToPascal.dpr
-CursorX=3
-CursorY=15
-TopLine=1
+Module=E:\extpascal\ExtJSWrapper\ExtFixes.txt
+CursorX=1
+CursorY=45
+TopLine=25
LeftCol=1
Elisions=
Bookmarks=
-EditViewName=E:\extpascal\ExtJSWrapper\ExtToPascal.dpr
+EditViewName=E:\extpascal\ExtJSWrapper\ExtFixes.txt
[View2]
CustomEditViewType=TEditView
-Module=E:\extpascal\ExtPascal.pas
-CursorX=1
-CursorY=815
-TopLine=794
+Module=E:\extpascal\ExtJSWrapper\Ext.pas
+CursorX=23
+CursorY=17306
+TopLine=17276
LeftCol=1
Elisions=
Bookmarks=
-EditViewName=E:\extpascal\ExtPascal.pas
+EditViewName=E:\extpascal\ExtJSWrapper\Ext.pas
[View3]
CustomEditViewType=TEditView
-Module=E:\extpascal\ExtJSWrapper\ExtFixes.txt
-CursorX=17
-CursorY=93
-TopLine=73
+Module=E:\extpascal\ExtPascalUtils.pas
+CursorX=1
+CursorY=318
+TopLine=297
LeftCol=1
Elisions=
Bookmarks=
-EditViewName=E:\extpascal\ExtJSWrapper\ExtFixes.txt
+EditViewName=E:\extpascal\ExtPascalUtils.pas
[View4]
CustomEditViewType=TEditView
-Module=E:\extpascal\ExtPascalUtils.pas
+Module=E:\extpascal\ExtPascal.pas
CursorX=1
-CursorY=318
-TopLine=297
+CursorY=815
+TopLine=794
LeftCol=1
Elisions=
Bookmarks=
-EditViewName=E:\extpascal\ExtPascalUtils.pas
+EditViewName=E:\extpascal\ExtPascal.pas
[Watches]
Count=4
-Watch0='Result',256,0,18,1,0,'Watches',1
+Watch0='Matches[3]',256,0,18,1,0,'Watches',1
Watch1='Ident',256,0,18,1,0,'Watches',1
Watch2='M.Methods[I]',256,0,18,1,0,'Watches',1
Watch3='TMethod(M.Methods.Objects[I]).Overload',256,0,18,1,0,'Watches',1
@@ -169,7 +168,8 @@
StayOnTop=0
[Breakpoints]
-Count=0
+Count=1
+Breakpoint0='E:\extpascal\ExtJSWrapper\ExtToPascal.dpr',824,'',0,1,'',1,0,0,'',1,'','','',0,''
[EmbarcaderoWin32Debugger_AddressBreakpoints]
Count=0
@@ -206,11 +206,11 @@
Left=0
Top=0
Width=1648
-Height=9053
+Height=8770
MaxLeft=-1
MaxTop=-1
ClientWidth=1648
-ClientHeight=9053
+ClientHeight=8770
TBDockHeight=5898
LRDockWidth=2352
Dockable=1
@@ -224,11 +224,11 @@
State=0
Left=0
Top=23
-Width=8328
+Width=9820
Height=1123
MaxLeft=-1
MaxTop=-1
-ClientWidth=8328
+ClientWidth=9820
ClientHeight=1123
TBDockHeight=1123
LRDockWidth=2766
@@ -244,11 +244,11 @@
Left=0
Top=0
Width=1648
-Height=7109
+Height=8770
MaxLeft=-1
MaxTop=-1
ClientWidth=1648
-ClientHeight=7109
+ClientHeight=8770
TBDockHeight=7158
LRDockWidth=2000
Dockable=1
@@ -260,8 +260,8 @@
Visible=0
Docked=1
State=0
-Left=0
-Top=291
+Left=-1280
+Top=314
Width=273
Height=361
MaxLeft=-1
@@ -365,11 +365,11 @@
Left=0
Top=0
Width=1648
-Height=7109
+Height=8770
MaxLeft=-1
MaxTop=-1
ClientWidth=1648
-ClientHeight=7109
+ClientHeight=8770
TBDockHeight=4883
LRDockWidth=7148
Dockable=1
@@ -384,11 +384,11 @@
Left=0
Top=0
Width=1648
-Height=7109
+Height=8770
MaxLeft=-1
MaxTop=-1
ClientWidth=1648
-ClientHeight=7109
+ClientHeight=8770
TBDockHeight=9014
LRDockWidth=1891
Dockable=1
@@ -401,8 +401,8 @@
Visible=0
Docked=1
State=0
-Left=78
-Top=15
+Left=-1202
+Top=38
Width=2844
Height=6201
MaxLeft=-1
@@ -507,11 +507,11 @@
Left=0
Top=0
Width=1648
-Height=7109
+Height=8770
MaxLeft=-1
MaxTop=-1
ClientWidth=1648
-ClientHeight=7109
+ClientHeight=8770
TBDockHeight=4883
LRDockWidth=5305
Dockable=1
@@ -523,8 +523,8 @@
Visible=0
Docked=1
State=0
-Left=0
-Top=-72
+Left=-1280
+Top=-49
Width=1844
Height=3145
MaxLeft=-1
@@ -609,11 +609,11 @@
Left=0
Top=0
Width=1648
-Height=7109
+Height=8770
MaxLeft=-1
MaxTop=-1
ClientWidth=1648
-ClientHeight=7109
+ClientHeight=8770
TBDockHeight=3672
LRDockWidth=1891
Dockable=1
@@ -690,21 +690,21 @@
TabDockClients=DebugLogView,BreakpointWindow,ThreadStatusWindow,CallStackWindow,WatchWindow,LocalVarsWindow
[DockSite2]
-HostDockSite=DockLeftPanel
+HostDockSite=LeftDockTabSet
DockSiteType=1
PercentageSizes=1
Create=1
-Visible=1
+Visible=0
Docked=1
State=0
-Left=0
-Top=23
+Left=1280
+Top=49
Width=1648
-Height=9297
+Height=9014
MaxLeft=-1
MaxTop=-1
ClientWidth=1648
-ClientHeight=9297
+ClientHeight=9014
TBDockHeight=9014
LRDockWidth=1648
Dockable=1