Showing posts with label dsl. Show all posts
Showing posts with label dsl. Show all posts
Friday, January 21, 2011
Thursday, January 20, 2011
Some definitions about languages
A language consists of a structure definition (called abstract syntax or meta model), a definition of the notation (also called concrete syntax) and semantics. In semantics we distinguish between the static semantics (constraints, typesystem) and the operational semantics (what something means as it is executed).
Sunday, December 26, 2010
Symboles terminaux et non-terminaux
En informatique, on appelle symboles terminaux et non-terminaux les symboles utilisés dans les règles de production d'une grammaire formelle. Les symboles terminaux forment les morceaux de chaînes de caractères générés par la grammaire. Les symboles non-terminaux correspondent aux noms des règles de la grammaire, et produisent des séquences de symboles terminaux et non-terminaux.
Par exemple, pour représenter un nombre éventuellement signé, on peut proposer la grammaire suivante (exprimée en notation pseudo-BNF) :
::= ['-'] {}
::= '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
Dans cette grammaire, les symboles (-,0,1,2,3,4,5,6,7,8,9) sont terminaux ; les symboles et sont non-terminaux.
Par exemple, pour représenter un nombre éventuellement signé, on peut proposer la grammaire suivante (exprimée en notation pseudo-BNF) :
Dans cette grammaire, les symboles (-,0,1,2,3,4,5,6,7,8,9) sont terminaux ; les symboles
Thursday, December 16, 2010
Synthax versus Semantic
The synthax defines the correctness of a sequence of characters without meaning. Semantic defines the meaning of this sequence of characters.
Example: 34 + 6 = 100 ist syntactic correct but semantic wrong.
Example: 34 + 6 = 100 ist syntactic correct but semantic wrong.
Sunday, July 13, 2008
Xtext and Java VM configuration
By developing DSLs with Xtext one usually work with two Eclipse workbenches:
-Xms256m -Xmx512m -XX:MaxPermSize=256m
If you are working on Max OS you will possibly get the following errors : "Cannot load 32-bit SWT libraries on 64-bit JVM". To fix the problem I use the following VM parameters:
-d32 -Dosgi.requiredJavaVersion=1.5 -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -XX:MaxPermSize=256m -Xms256m -Xmx512m -Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
- one by design-time containing three projects: the grammar, the DSL-editor and the generator,
- and a second one started from the first where the three DSL-plugin are deployed.
-Xms256m -Xmx512m -XX:MaxPermSize=256m
If you are working on Max OS you will possibly get the following errors : "Cannot load 32-bit SWT libraries on 64-bit JVM". To fix the problem I use the following VM parameters:
-d32 -Dosgi.requiredJavaVersion=1.5 -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -XX:MaxPermSize=256m -Xms256m -Xmx512m -Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
Saturday, June 28, 2008
Graphical versus textual DSLs
We are presently developing for a customer a DSL that aims to map different data structures. Our solution is based an Xtext of oAW. As its name said, Xtext is a framework that enables the development of textual DSLs. Our customer was scarred when he understood that he will have to WRITE code with our DSL. He had in mind a more user friendly DSL, something more graphical.
But is a graphical DSL more user frienly? Here some advantages that textual representations have over graphical notations:
But is a graphical DSL more user frienly? Here some advantages that textual representations have over graphical notations:
- while graphical notations are often useful to describe structural concepts (e.g. class diagrams), textual notations are often a better fit for describing behavior or algorithms (e.g. expressions)
- expert users often find them faster and easier to modify
- there is a rich set of existing tooling for dealing with text files (diff, merge, copy & paste, search & replace ...).
- by using any source control systems (CVS, SVN, ...) it is possible to manage different versions of the DSL.
Subscribe to:
Posts (Atom)