|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Languages, Languages and More LanguagesNow that your grammar is complete, you need to decide which programming language you are going to use to implement your interpreter or compiler. You, naturally, already have a favorite language and have probably have already made this decision. A number of kind and generous computer scientists have translated the GOLD Engine into a number of popular programming languages. The number of languages that are support will increase over time. So far, the following are available.
Each Engine is a tad different - depending on the Engine Developer's design criteria and the preferred way of programming in the language itself. Some implementations of the Engine can work with multiple programming languages. These include, for instance, a version created and compiled to a Microsoft ActiveX (COM) object. This can be "plugged" into various development suites such as Microsoft Visual Basic 6, Microsoft C++ 6 and Borland Delphi 7. In addition, some Engines were also compiled into .NET Modules. These can run with an .NET language.
If your favorite programming language is not listed, you can create your own. The Builder does all the complex work, the Engine is basically an automaton - simple state-transition machine. This website containspseudo-code for the basic structure of the Engine. You can create you own! Creating your Skeleton ProgramThe Compiled Grammar Table file is merely a collection of data - which is not easy for a human to interact. In most cases, you will only be concerned with writing code that will handle each rule being reduced. Once compiled, each rule and symbol is are represented by a unique number. It would be particularly monotonous and problematic if you had to manually write each constant in your program. To make it easy to get started, the GOLD Builder has an important feature called "Create a Skeleton Program". This tool uses "program templates" to create basic programs that can be get you started on implementing your interpreter or compiler. Each Engine Developer can create a template to use with their engine - making the bridge between designing a grammar and writing the program much, much smaller. For instance, if an Engine is created for the Java Programming Language, a program template can be used to create a basic skeleton program that is ready to use yoru grammar. This skeleton program would contain the necessary declarations and function calls to the Engine. In other words, Program Templates help a programmer use an Engine. This way, you hit the ground running. Most of the work is already done for you.
|