Maple für Professional
Maple für Akademiker
Maple für Studenten
Maple Personal Edition
Maple Player
Maple Player für iPad
MapleSim für Professional
MapleSim für Akademiker
Maple T.A. - Testen & beurteilen
Maple T.A. MAA Placement Test Suite
Möbius - Online-Courseware
Machine Design / Industrial Automation
Luft- und Raumfahrt
Fahrzeugtechnik
Robotics
Energiebranche
System Simulation and Analysis
Model development for HIL
Anlagenmodelle für den Regelungsentwurf
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematikausbildung
Technik
Allgemein- und berufsbildende Schulen
Testen und beurteilen
Studierende
Finanzmodelle
Betriebsforschung
Hochleistungsrechnen
Physik
Live-Webinare
Aufgezeichnete Webinare
Geplante Veranstaltungen
MaplePrimes
Maplesoft-Blog
Maplesoft-Mitgliedschaft
Maple Ambassador Program
MapleCloud
Technische Whitepapers
E-Mail Newsletters
Maple-Bücher
Math Matters
Anwendungs-Center
MapleSim Modell-Galerie
Anwenderberichte
Exploring Engineering Fundamentals
Lehrkonzepte mit Maple
Maplesoft Welcome-Center
Resource-Center für Lehrer
Help-Center für Studierende
Overview of the LanguageDefinition Subpackage
Calling Sequence
LanguageDefinition[command](arguments)
command(arguments)
Description
With the LanguageDefinition subpackage, you can enable CodeGeneration to perform translations to new, user-defined languages.
The Translate command translates Maple code to any specified language currently recognized by CodeGeneration. A language is recognized if it is one of the pre-defined languages supported by CodeGeneration, or if it has been defined for use by CodeGeneration with Add or Define.
Code translation in the CodeGeneration package operates by first translating Maple input to a intermediate structure . This is followed by the printing phase, in which the work of translation to the new language is done. During this phase, the intermediate form is traversed, and at each node in the expression tree, a language-specific print handler procedure is called, which is responsible for issuing the necessary statements to translate a given subexpression of the intermediate form into a string.
Necessary Steps for Defining a Language
There are two distinct methods by which you can enable CodeGeneration to perform translations from Maple to a new target language.
Create a language module. You can create a language module by extending an existing language module or defining a new module. For information, see Language Definition Module. Once created, add this module to the set of languages recognized by CodeGeneration with the Add command.
Define the language with Define.
Once you have defined the language by either of these methods, you can perform translations to the new language using Translate.
To save your language definition in order to make it available for use in later sessions, use the Save command.
List of CodeGeneration[LanguageDefinition] Commands
The following is a list of available commands in the CodeGeneration[LanguageDefinition] subpackage.
Add
DefaultPrinter
Define
GenericPrinter
Get
IsDefined
ListLanguages
Sample Source Code
Sample source code associated with each of the built-in translators is located in the samples\\CodeGeneration directory of your Maple installation. These examples of large scale language translators are provided as a reference for users seeking to write custom translators.
See Also
CodeGeneration, LanguageModule, Translate
Download Help Document