PWCT 1.9 Art Documentation ( http://doublesvsoop.sourceforge.net )

2006-2019, Mahmoud Fayed ( msfclipper@users.sourceforge.net )

_____________________________________________________________________________________

Table of contents

1 - Introduction

2 - Implementation steps

3 - Final Steps Tree

1 - Introduction

In this lesson we are going to create the Scanner.SSF

This file is part of the Supernova programming language.

The scanner read a source code file letter by letter.

2 - Implementation Steps

s1.JPG

Fig. (1) Goal Desginer - Steps Tree

Select the step (The Start Point)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Structure Programming)

                3 - Select the component (Define Procedure)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (Define Procedure)

                Note : Stop typing when you see the required component is selected

s2.JPG

Fig. (2) Component Browser – Select the component (Define Procedure)

After selecting the component click Ok or press ENTER

s3.JPG

Fig. (3) Interaction page - Set the properties and enter the required data as in the image above

s4.JPG

Fig. (4) Goal Desginer - Steps Tree

Select the step (Start Here)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Structure Programming)

                3 - Select the component (Scope of Variable)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (Scope of Variable)

                Note : Stop typing when you see the required component is selected

s5.JPG

Fig. (5) Component Browser – Select the component (Scope of Variable)

After selecting the component click Ok or press ENTER

s6.JPG

Fig. (6) Interaction page - Set the properties and enter the required data as in the image above

s7.JPG

Fig. (7) Goal Desginer - Steps Tree

Select the step (Start Here)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Variables)

                3 - Select the component (Get String/Variable/Array Length)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (Get String/Variable/Array Length)

                Note : Stop typing when you see the required component is selected

s8.JPG

Fig. (8) Component Browser – Select the component (Get String/Variable/Array Length)

After selecting the component click Ok or press ENTER

s9.JPG

Fig. (9) Interaction page - Set the properties and enter the required data as in the image above

s10.JPG

Fig. (10) Goal Desginer - Steps Tree

Select the step (Start Here)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Variables)

                3 - Select the component (Assignment)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (Assignment)

                Note : Stop typing when you see the required component is selected

s11.JPG

Fig. (11) Component Browser – Select the component (Assignment)

After selecting the component click Ok or press ENTER

s12.JPG

Fig. (12) Interaction page - Set the properties and enter the required data as in the image above

s13.JPG

Fig. (13) Goal Desginer - Steps Tree

Select the step (Start Here)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Control Structure)

                3 - Select the component (While Loop)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (While Loop)

                Note : Stop typing when you see the required component is selected

s14.JPG

Fig. (14) Component Browser – Select the component (While Loop)

After selecting the component click Ok or press ENTER

s15.JPG

Fig. (15) Interaction page - Set the properties and enter the required data as in the image above

s16.JPG

Fig. (16) Goal Desginer - Steps Tree

Select the step (srccode)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Variables)

                3 - Select the component (Assignment)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (Assignment)

                Note : Stop typing when you see the required component is selected

s17.JPG

Fig. (17) Component Browser – Select the component (Assignment)

After selecting the component click Ok or press ENTER

s18.JPG

Fig. (18) Interaction page - Set the properties and enter the required data as in the image above

s19.JPG

Fig. (19) Goal Desginer - Steps Tree

Select the step (srccode)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Variables)

                3 - Select the component (Assignment)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (Assignment)

                Note : Stop typing when you see the required component is selected

s20.JPG

Fig. (20) Component Browser – Select the component (Assignment)

After selecting the component click Ok or press ENTER

s21.JPG

Fig. (21) Interaction page - Set the properties and enter the required data as in the image above

s22.JPG

Fig. (22) Goal Desginer - Steps Tree

Select the step (Start Here)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Variables)

                3 - Select the component (Assignment)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (Assignment)

                Note : Stop typing when you see the required component is selected

s23.JPG

Fig. (23) Component Browser – Select the component (Assignment)

After selecting the component click Ok or press ENTER

s24.JPG

Fig. (24) Interaction page - Set the properties and enter the required data as in the image above

s25.JPG

Fig. (25) Goal Desginer - Steps Tree

Select the step (Start Here)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Files / Folders)

                3 - Select the component (Open File)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (Open File)

                Note : Stop typing when you see the required component is selected

s26.JPG

Fig. (26) Component Browser – Select the component (Open File)

After selecting the component click Ok or press ENTER

s27.JPG

Fig. (27) Interaction page - Set the properties and enter the required data as in the image above

s28.JPG

Fig. (28) Goal Desginer - Steps Tree

Select the step (Start Here)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Variables)

                3 - Select the component (Assignment)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (Assignment)

                Note : Stop typing when you see the required component is selected

s29.JPG

Fig. (29) Component Browser – Select the component (Assignment)

After selecting the component click Ok or press ENTER

s30.JPG

Fig. (30) Interaction page - Set the properties and enter the required data as in the image above

s31.JPG

Fig. (31) Goal Desginer - Steps Tree

Select the step (Start Here)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Control Structure)

                3 - Select the component (While Loop)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (While Loop)

                Note : Stop typing when you see the required component is selected

s32.JPG

Fig. (32) Component Browser – Select the component (While Loop)

After selecting the component click Ok or press ENTER

s33.JPG

Fig. (33) Interaction page - Set the properties and enter the required data as in the image above

s34.JPG

Fig. (34) Goal Desginer - Steps Tree

Select the step (Start Here)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Variables)

                3 - Select the component (Assignment)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (Assignment)

                Note : Stop typing when you see the required component is selected

s35.JPG

Fig. (35) Component Browser – Select the component (Assignment)

After selecting the component click Ok or press ENTER

s36.JPG

Fig. (36) Interaction page - Set the properties and enter the required data as in the image above

s37.JPG

Fig. (37) Goal Desginer - Steps Tree

Select the step (Start Here)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Files / Folders)

                3 - Select the component (Read From File)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (Read From File)

                Note : Stop typing when you see the required component is selected

s38.JPG

Fig. (38) Component Browser – Select the component (Read From File)

After selecting the component click Ok or press ENTER

s39.JPG

Fig. (39) Interaction page - Set the properties and enter the required data as in the image above

s40.JPG

Fig. (40) Goal Desginer - Steps Tree

Select the step (Start Here)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Variables)

                3 - Select the component (Assignment)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (Assignment)

                Note : Stop typing when you see the required component is selected

s41.JPG

Fig. (41) Component Browser – Select the component (Assignment)

After selecting the component click Ok or press ENTER

s42.JPG

Fig. (42) Interaction page - Set the properties and enter the required data as in the image above

s43.JPG

Fig. (43) Goal Desginer - Steps Tree

Select the step (Start Here)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Control Structure)

                3 - Select the component (IF Statement)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (IF Statement)

                Note : Stop typing when you see the required component is selected

s44.JPG

Fig. (44) Component Browser – Select the component (IF Statement)

After selecting the component click Ok or press ENTER

s45.JPG

Fig. (45) Interaction page - Set the properties and enter the required data as in the image above

s46.JPG

Fig. (46) Goal Desginer - Steps Tree

Select the step (Main condition)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Variables)

                3 - Select the component (ALL Trim)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (ALL Trim)

                Note : Stop typing when you see the required component is selected

s47.JPG

Fig. (47) Component Browser – Select the component (ALL Trim)

After selecting the component click Ok or press ENTER

s48.JPG

Fig. (48) Interaction page - Set the properties and enter the required data as in the image above

s49.JPG

Fig. (49) Goal Desginer - Steps Tree

Select the step (Main condition)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Variables)

                3 - Select the component (lower Case)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (lower Case)

                Note : Stop typing when you see the required component is selected

s50.JPG

Fig. (50) Component Browser – Select the component (lower Case)

After selecting the component click Ok or press ENTER

s51.JPG

Fig. (51) Interaction page - Set the properties and enter the required data as in the image above

s52.JPG

Fig. (52) Goal Desginer - Steps Tree

Select the step (Main condition)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Variables)

                3 - Select the component (Assignment)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (Assignment)

                Note : Stop typing when you see the required component is selected

s53.JPG

Fig. (53) Component Browser – Select the component (Assignment)

After selecting the component click Ok or press ENTER

s54.JPG

Fig. (54) Interaction page - Set the properties and enter the required data as in the image above

s55.JPG

Fig. (55) Goal Desginer - Steps Tree

Select the step (Main condition)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Structure Programming)

                3 - Select the component (Call Procedure)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (Call Procedure)

                Note : Stop typing when you see the required component is selected

s56.JPG

Fig. (56) Component Browser – Select the component (Call Procedure)

After selecting the component click Ok or press ENTER

s57.JPG

Fig. (57) Interaction page - Set the properties and enter the required data as in the image above

s58.JPG

Fig. (58) Goal Desginer - Steps Tree

Select the step (Start Here)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Control Structure)

                3 - Select the component (IF Statement)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (IF Statement)

                Note : Stop typing when you see the required component is selected

s59.JPG

Fig. (59) Component Browser – Select the component (IF Statement)

After selecting the component click Ok or press ENTER

s60.JPG

Fig. (60) Interaction page - Set the properties and enter the required data as in the image above

s61.JPG

Fig. (61) Goal Desginer - Steps Tree

Select the step (Start Here)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Variables)

                3 - Select the component (Assignment)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (Assignment)

                Note : Stop typing when you see the required component is selected

s62.JPG

Fig. (62) Component Browser – Select the component (Assignment)

After selecting the component click Ok or press ENTER

s63.JPG

Fig. (63) Interaction page - Set the properties and enter the required data as in the image above

s64.JPG

Fig. (64) Goal Desginer - Steps Tree

Select the step (Start Here)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Variables)

                3 - Select the component (Get String/Variable/Array Length)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (Get String/Variable/Array Length)

                Note : Stop typing when you see the required component is selected

s65.JPG

Fig. (65) Component Browser – Select the component (Get String/Variable/Array Length)

After selecting the component click Ok or press ENTER

s66.JPG

Fig. (66) Interaction page - Set the properties and enter the required data as in the image above

s67.JPG

Fig. (67) Goal Desginer - Steps Tree

Select the step (Assign)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Variables)

                3 - Select the component (Assignment)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (Assignment)

                Note : Stop typing when you see the required component is selected

s68.JPG

Fig. (68) Component Browser – Select the component (Assignment)

After selecting the component click Ok or press ENTER

s69.JPG

Fig. (69) Interaction page - Set the properties and enter the required data as in the image above

s70.JPG

Fig. (70) Goal Desginer - Steps Tree

Select the step (Assign)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Variables)

                3 - Select the component (Assignment)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (Assignment)

                Note : Stop typing when you see the required component is selected

s71.JPG

Fig. (71) Component Browser – Select the component (Assignment)

After selecting the component click Ok or press ENTER

s72.JPG

Fig. (72) Interaction page - Set the properties and enter the required data as in the image above

s73.JPG

Fig. (73) Goal Desginer - Steps Tree

Select the step (Assign)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Variables)

                3 - Select the component (Assignment)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (Assignment)

                Note : Stop typing when you see the required component is selected

s74.JPG

Fig. (74) Component Browser – Select the component (Assignment)

After selecting the component click Ok or press ENTER

s75.JPG

Fig. (75) Interaction page - Set the properties and enter the required data as in the image above

s76.JPG

Fig. (76) Goal Desginer - Steps Tree

Select the step (Assign)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Variables)

                3 - Select the component (Assignment)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (Assignment)

                Note : Stop typing when you see the required component is selected

s77.JPG

Fig. (77) Component Browser – Select the component (Assignment)

After selecting the component click Ok or press ENTER

s78.JPG

Fig. (78) Interaction page - Set the properties and enter the required data as in the image above

s79.JPG

Fig. (79) Goal Desginer - Steps Tree

Select the step (Assign)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Variables)

                3 - Select the component (Assignment)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (Assignment)

                Note : Stop typing when you see the required component is selected

s80.JPG

Fig. (80) Component Browser – Select the component (Assignment)

After selecting the component click Ok or press ENTER

s81.JPG

Fig. (81) Interaction page - Set the properties and enter the required data as in the image above

s82.JPG

Fig. (82) Goal Desginer - Steps Tree

Select the step (Assign)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Variables)

                3 - Select the component (Assignment)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (Assignment)

                Note : Stop typing when you see the required component is selected

s83.JPG

Fig. (83) Component Browser – Select the component (Assignment)

After selecting the component click Ok or press ENTER

s84.JPG

Fig. (84) Interaction page - Set the properties and enter the required data as in the image above

s85.JPG

Fig. (85) Goal Desginer - Steps Tree

Select the step (Start Here)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Variables)

                3 - Select the component (Assignment)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (Assignment)

                Note : Stop typing when you see the required component is selected

s86.JPG

Fig. (86) Component Browser – Select the component (Assignment)

After selecting the component click Ok or press ENTER

s87.JPG

Fig. (87) Interaction page - Set the properties and enter the required data as in the image above

s88.JPG

Fig. (88) Goal Desginer - Steps Tree

Select the step (Start Here)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

                1 - Click Interact to open the components browser

                2 - Select the domain (Structure Programming)

                3 - Select the component (Call Procedure)

The fast way (Using Keyboard shortcuts):

                1 - Get the component using its name by typing (Call Procedure)

                Note : Stop typing when you see the required component is selected

s89.JPG

Fig. (89) Component Browser – Select the component (Call Procedure)

After selecting the component click Ok or press ENTER

s90.JPG

Fig. (90) Interaction page - Set the properties and enter the required data as in the image above

s91.JPG

Fig. (91) Goal Desginer - Final Steps Tree

3 - Final Steps Tree

====================

Scanner.SSF

====================

The Start Point

                Define Procedure myscanner

                                Start Here

                                                Local scanx,mymax

                                                mymax = Get Length of String/Variable/Array FilesList

                                                scanx = 1

                                                WHILE ( scanx <= mymax )

                                                                Start Here

                                                                                srccode

                                                                                                srccodefile = FilesList[scanx]

                                                                                                srccodeline = 1

                                                                                cFileName = FilesList[scanx]

                                                                                Open file cFileName store handle in myFile

                                                                                myerror = 1

                                                                                WHILE ( myerror = 1 )

                                                                                                Start Here

                                                                                                                mychar = " "

                                                                                                                Read From file, handle myFile , buffer mychar bytes 1 check myerror

                                                                                                                myrealstack = myrealstack+mychar

                                                                                                                IF ( mychar != chr(13) .and. mychar != chr(10) .and. myerror = 1 )

                                                                                                                                Start Here

                                                                                                                                                Main condition

                                                                                                                                                                mychar = All Trim mychar

                                                                                                                                                                myChar = CONVERT String myChar To LOWER CASE

                                                                                                                                                                mystack = mystack + mychar

                                                                                                                                                                Call Procedure mySyntax

                                                                                                                                                ELSEIF ( mychar = chr(13) )

                                                                                                                                                                Start Here

                                                                                                                                                                                srccodeline = srccodeline + 1

                                                                                                                                END OF IF STATEMENT

                                                                                                END OF While Loop

                                                                                mymax = Get Length of String/Variable/Array FilesList

                                                                                Assign

                                                                                                myopproc = "baseproc"

                                                                                                myoplevel = 0

                                                                                                myopcode = 0

                                                                                                myopdata = {}

                                                                                                myactiveproc = "baseproc"

                                                                                                myactivelevel = 0

                                                                                scanx = scanx+1

                                                                END OF While Loop

                                                Call Procedure RTE_Check

                                End of Procedure