From 3445e55744b7059d432516c01fdfdb5ba81909a0 Mon Sep 17 00:00:00 2001 From: Brahn Partridge Date: Wed, 26 Nov 2014 14:51:47 +0100 Subject: [PATCH] additional samples and fixed extensions list --- lib/linguist/languages.yml | 2 -- samples/Clarion/Defaults.equ | 29 +++++++++++++++++++++++++++++ samples/Clarion/Hello.inc | 9 +++++++++ samples/Clarion/HelloWorld.clw | 10 ++++++++++ samples/Clarion/SampleTemplate.tpl | 3 +++ samples/Clarion/School.txa | 8 ++++++++ samples/Clarion/Utility.tpw | 16 ++++++++++++++++ samples/Clarion/hello.clw | 12 +++++++----- 8 files changed, 82 insertions(+), 7 deletions(-) create mode 100644 samples/Clarion/Defaults.equ create mode 100644 samples/Clarion/Hello.inc create mode 100644 samples/Clarion/HelloWorld.clw create mode 100644 samples/Clarion/SampleTemplate.tpl create mode 100644 samples/Clarion/School.txa create mode 100644 samples/Clarion/Utility.tpw diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index d1c930e1..a01f5433 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -436,9 +436,7 @@ Clarion: - .tpl - .tpw - .equ - - .int - .txa - - .txd tm_scope: source.clarion Clean: diff --git a/samples/Clarion/Defaults.equ b/samples/Clarion/Defaults.equ new file mode 100644 index 00000000..4ec2992e --- /dev/null +++ b/samples/Clarion/Defaults.equ @@ -0,0 +1,29 @@ +! Severity of error +Level:Benign EQUATE(0) +Level:User EQUATE(1) +Level:Program EQUATE(2) +Level:Fatal EQUATE(3) +Level:Cancel EQUATE(4) +Level:Notify EQUATE(5) + +ICON:VCRtop EQUATE ('<0FFH,02H,81H,7FH>') +ICON:VCRrewind EQUATE ('<0FFH,02H,82H,7FH>') +ICON:VCRback EQUATE ('<0FFH,02H,83H,7FH>') +ICON:VCRplay EQUATE ('<0FFH,02H,84H,7FH>') +ICON:VCRfastforward EQUATE ('<0FFH,02H,85H,7FH>') +ICON:VCRbottom EQUATE ('<0FFH,02H,86H,7FH>') +ICON:VCRlocate EQUATE ('<0FFH,02H,87H,7FH>') + + +ff_:queue QUEUE,PRE(ff_),TYPE +name string(13) +date long +time long +size long +attrib byte + END + +UINT64 GROUP,TYPE +lo ULONG +hi ULONG + END \ No newline at end of file diff --git a/samples/Clarion/Hello.inc b/samples/Clarion/Hello.inc new file mode 100644 index 00000000..1dfda5f6 --- /dev/null +++ b/samples/Clarion/Hello.inc @@ -0,0 +1,9 @@ +HelloClass Class(),Type,Module('HelloClass.Clw'),LINK('HelloClass.Clw',1) +! Properties + +! Methods +Construct PROCEDURE +Destruct PROCEDURE () ,VIRTUAL +SayHello PROCEDURE + END +!_EndOfInclude_ diff --git a/samples/Clarion/HelloWorld.clw b/samples/Clarion/HelloWorld.clw new file mode 100644 index 00000000..8cad46dc --- /dev/null +++ b/samples/Clarion/HelloWorld.clw @@ -0,0 +1,10 @@ + PROGRAM + + MAP + END + + CODE + + MESSAGE('Hello World!') + + RETURN \ No newline at end of file diff --git a/samples/Clarion/SampleTemplate.tpl b/samples/Clarion/SampleTemplate.tpl new file mode 100644 index 00000000..7627699a --- /dev/null +++ b/samples/Clarion/SampleTemplate.tpl @@ -0,0 +1,3 @@ +#TEMPLATE(SampleTemplate,'This is a sample Template'),PRIVATE,FAMILY('ABC') +#INCLUDE('FileTwo.TPW') +#INCLUDE('FileThree.TPW') diff --git a/samples/Clarion/School.txa b/samples/Clarion/School.txa new file mode 100644 index 00000000..0aba0bcc --- /dev/null +++ b/samples/Clarion/School.txa @@ -0,0 +1,8 @@ +[PROCEDURE] +NAME SampleProc +[COMMON] +FROM ABC Source +MODIFIED '2014/11/26' '14:48:17' +[PROMPTS] +%GenerateOpenClose LONG (0) +%GenerateSaveRestore LONG (0) diff --git a/samples/Clarion/Utility.tpw b/samples/Clarion/Utility.tpw new file mode 100644 index 00000000..d6d70df2 --- /dev/null +++ b/samples/Clarion/Utility.tpw @@ -0,0 +1,16 @@ +#UTILITY(ProcCallTree, 'Output procedure call tree') + #CREATE(%Application & '.TRE') +Procedure Call Tree: for %Application +#INSERT(%DisplayTree, %FirstProcedure, '', ' ') +#CLOSE +#!*********************************************************** +#GROUP(%DisplayTree, %ThisProc, %Level, %NextIndent) + #FIX(%Procedure, %ThisProc) +%Level+-%ThisProc (%ProcedureTemplate) + #FOR(%ProcedureCalled) + #IF(INSTANCE(%ProcedureCalled) = ITEMS(%ProcedureCalled)) +#INSERT(%DisplayTree, %ProcedureCalled, %Level & %NextIndent, ' ') + #ELSE +#INSERT(%DisplayTree, %ProcedureCalled, %Level & %NextIndent, '| ') + #ENDIF +#ENDFOR diff --git a/samples/Clarion/hello.clw b/samples/Clarion/hello.clw index 8cad46dc..14328c84 100644 --- a/samples/Clarion/hello.clw +++ b/samples/Clarion/hello.clw @@ -1,10 +1,12 @@ - PROGRAM - + MEMBER() + INCLUDE('HelloClass.inc'),ONCE MAP END +HelloClass.Construct PROCEDURE + CODE +HelloClass.Destruct PROCEDURE() !,VIRTUAL + CODE +HelloClass.SayHello PROCEDURE CODE - MESSAGE('Hello World!') - - RETURN \ No newline at end of file