Home

Downloads


        

swtop.gif (1189 bytes)
Products
Services
Downloads
swbottom.gif (528 bytes)

 

 

 

 

 

There are a number of example programs available for download :

console or command line
visual form based
component
see also the 'Cocolsoft Delphi Grammar' homepage

An example of one use of Cogencee is to produce a simple expression calculator.

An expression calculator to a compiler generator is the same as a "Hello World" program is to a compiler. (If we didn't include it we would be faced with the question - Why can't your program create an expression calculator?)

Error handling is to an output file which reports the first 30 errors.

The download is only 37 kb. Please note that this program is a very rudimentary program placed here as proof of concept. We recommend you also look at the visual version!

The calculator is named CHD3 and is based on a grammar developed in the User Guide.

The EBNF (Extended Backus-Naur Form) for the calculator CHD3 is :

CHD3 = Expr.
Expr = Term { "+" Term }.
Term = Fact { "*" Fact }.
Fact = Prim [ Exp ].
Prim = num | "(" Expr ")".
Exp = "^" num.

The download has two parts :

  1. A text file giving the EBNF and other notes and the Cocol source code including embedded Delphi 4 code
  2. The executable 'CHD3.exe', a console application, which you can run and play around with.

[Posted 19 Oct 98]

Download 'calc.zip'

 

Another example is a visual version of the simple expression calculator.

In this example the expression is keyed into a data entry field. A button is clicked to produce the result.

Although the grammar which is the basis for the program differs in only a few lines, the program is much larger than the simple expression calculator console application. This is due solely to the extra code required by Delphi for a visual look and feel.

Error handling is via a message to the screen.

The download is 174 kb.

View a screenshot of Calcgui? Yes

The download has two parts :

  1. A text file giving the EBNF and other notes and the Cocol source code including embedded Delphi 4 code
  2. The executable 'CHD3GUI.exe', which you can run and play around with.

[Posted 31 Oct 98]

Download 'calcgui.zip'

 Another example is the simple expression calculator as a component.

In this example a component has been made which can be used in either design time or runtime modes.

The component has these new events, methods and properties.

Events
OnResult
Methods
Calculate
Properties
Result
Error
ErrorMsg

Again, the grammar which is the basis for the program, differs in only a few lines.

However, the size of the executable program is only about 16kb, a very impressive "thin client". This small size is achieved by making the component into a Package which can be installed into the Delphi 4 IDE.

Although the example has been made for Delphi 4 the download has been split into four, with the first part being a text file of source code which can be read regardless of what version of Delphi you have.

The source code is instructive because it demonstrates the means to create a new event in a component. There is no need to read a weighty tome on component design to find out how to do this! The text file also demonstrates what checks you need to follow when installing a Package of Components and how to use the component at design time.

The download is 41 kb.

The download has four parts :

  1. A text file giving
    1. the EBNF and other notes
    2. the Cocol source code including embedded Delphi 4 code
    3. the source code to the main unit in 'CHD3GUItst.exe'
    4. the Interface code to the component TColCHD3GUIC.
  2. The executable 'CHD3GUItst.exe', which you can run and play around with.
  3. The form associated with above.
  4. The Delphi 4 package named 'CocolPk.dpc'.

[Posted 23 Nov 98]

Download 'calcc.zip'

LingualSCP Utility

This program is a utility that will enable the developer who has the product Shell Control Pack (by Plasmatech) to easily have language switching for that product.

Language switching is done with one line of code.

A requirement is that the developer has the registered version of Shell Control Pack by Plasmatech. This is because the utility needs the source code in order to generate further code.

View a screenshot of LingualSCP? Yes

Version 1.01 of 9 Jan 2004. This is same 1.01 EXE of 3Jan04, however the notes have been updated.

Download 'LingualSCP.zip'

LingualQE Utility

This program is a utility that will enable the developer who has the product QuickExport (by EMS-Hitech) to easily have language switching for that product.

Language switching is done with one line of code.

A requirement is that the developer has the registered version of QuickExport by EMS-Hitech. This is because the utility needs the source code in order to generate further code.

The interface is similar to the utility LingualSCP.

Version 1.00 of 9 Jan 2004.

Download 'LingualQE.zip'

 (This page updated 9 Jan 2004)

http://www.cocolsoft.com.au

Email
Copyright © 1998-2010 Cocolsoft Computer Solutions. All Rights Reserved.

Back Home