Difference between revisions of "ETrice/GSoC/2012/GACL"

From Eclipsepedia

Jump to: navigation, search
(Development Details and Core Information)
Line 1: Line 1:
== Generic Action Code Language (GACL) ==
+
== Generic Action Code Language (GACL) ==
  
 
GACL is the language to describe the Detail Code for execution of ROOM Models in eTrice plugin . GACL aims at dealing with all features commonly available in imperative languages , especially Java , C/C++ . It will act as complement of current version of eTrice which uses code written in target language stored in a string as execution code . GACL would make user able to write execution code independent of target language .  
 
GACL is the language to describe the Detail Code for execution of ROOM Models in eTrice plugin . GACL aims at dealing with all features commonly available in imperative languages , especially Java , C/C++ . It will act as complement of current version of eTrice which uses code written in target language stored in a string as execution code . GACL would make user able to write execution code independent of target language .  
Line 21: Line 21:
 
Although syntax for GACL is still being designed but here are few thought regarding syntax .  
 
Although syntax for GACL is still being designed but here are few thought regarding syntax .  
  
*Variable Declaration
+
*Empty
  
== Project Proposal ==
+
  {}
  
[http://www.google-melange.com/gsoc/proposal/review/google/gsoc2012/hckkid/1 Click Here] to see the project proposal at gsoc's website .
+
*Type Declaration
  
[https://github.com/hckkid/my-eTrice-work/blob/master/Proposal.txt Click Here] to see the project proposal in my github repository .
+
  "type" typename [ '''type''' | "{" TypeCode "}"]
  
== Useful Links ==
+
*VariableDeclaration
* [http://www.eclipse.org/etrice/documentation/doc/etrice.html eTrice Documentation Page]
+
 
* [http://www.eclipse.org/Xtext/ Xtext Home Page]
+
  ['''type'''] varname [ "=" { varname2 | Expression } ] { ";" | "\n" }
* [http://www.eclipse.org/etrice/ eTrice Home Page]
+
 
* [http://github.com/hckkid My Github profile page]
+
*Expression
* [http://www.eclipse.org/forums/eclipse.etrice eTrice Forums page]
+
 
 +
  { ArithmeticExpression | LogicalExpression }
 +
 
 +
**ArithmeticExpression
 +
 
 +
  { Expression { "+" | "-" | "*" | "/" | "**" | "^" | "%" | "div" } Expression } | {Expression { "++" | "--" } } | { { "++" | "--" } Expression }
 +
 
 +
**LogicalExpression
 +
 
 +
  { Expression { "<" | "<=" | "==" | ">" | ">=" | "|" | "||" | "&" | "&&" | "^" } Expression }
 +
 
 +
*Statement
 +
 
 +
  { Expression | VariableDeclaration }
 +
 
 +
*StatementList
 +
 
 +
  { Empty | Statement StatementList }
 +
 
 +
*Program
 +
 
 +
  { StatementList}
 +
 
 +
<br>
 +
 
 +
== Disambiguation ==
 +
 
 +
The syntax used to specify the grammar in brief is
 +
 
 +
  Things written in double quotes ("") stand as string detacted
 +
 
 +
== Project Proposal  ==
 +
 
 +
[http://www.google-melange.com/gsoc/proposal/review/google/gsoc2012/hckkid/1 Click Here] to see the project proposal at gsoc's website .
 +
 
 +
[https://github.com/hckkid/my-eTrice-work/blob/master/Proposal.txt Click Here] to see the project proposal in my github repository .
 +
 
 +
== Useful Links ==
 +
 
 +
*[http://www.eclipse.org/etrice/documentation/doc/etrice.html eTrice Documentation Page]  
 +
*[http://www.eclipse.org/Xtext/ Xtext Home Page]  
 +
*[http://www.eclipse.org/etrice/ eTrice Home Page]  
 +
*[http://github.com/hckkid My Github profile page]  
 +
*[http://www.eclipse.org/forums/eclipse.etrice eTrice Forums page]

Revision as of 15:30, 30 March 2012

Contents

Generic Action Code Language (GACL)

GACL is the language to describe the Detail Code for execution of ROOM Models in eTrice plugin . GACL aims at dealing with all features commonly available in imperative languages , especially Java , C/C++ . It will act as complement of current version of eTrice which uses code written in target language stored in a string as execution code . GACL would make user able to write execution code independent of target language .

Development Details and Core Information

Features of GACL

  • Variable Declarations ( with optional initializers ) and Function Declaration .
  • Comparison & arithmetic expressions .
  • Basic types , and user defined types .
  • If-else blocks and ladders .
  • For , while , for each , enhanched for each .
  • Support for iterators (that can be used by for each loops ) .
  • Function Calls with arguments & diff types i.e. ref/value/address .
  • type checking and as much as possible implicit type casting .
  • Casts corresponding to static casts in C .

Thoughts on Syntax

Although syntax for GACL is still being designed but here are few thought regarding syntax .

  • Empty
 {}
  • Type Declaration
 "type" typename [ type | "{" TypeCode "}"]
  • VariableDeclaration
 [type] varname [ "=" { varname2 | Expression } ] { ";" | "\n" }
  • Expression
 { ArithmeticExpression | LogicalExpression }
    • ArithmeticExpression
 { Expression { "+" | "-" | "*" | "/" | "**" | "^" | "%" | "div" } Expression } | {Expression { "++" | "--" } } | { { "++" | "--" } Expression }
    • LogicalExpression
 { Expression { "<" | "<=" | "==" | ">" | ">=" | "|" | "||" | "&" | "&&" | "^" } Expression }
  • Statement
 { Expression | VariableDeclaration }
  • StatementList
 { Empty | Statement StatementList }
  • Program
 { StatementList}


Disambiguation

The syntax used to specify the grammar in brief is

  Things written in double quotes ("") stand as string detacted

Project Proposal

Click Here to see the project proposal at gsoc's website .

Click Here to see the project proposal in my github repository .

Useful Links