Browsable API2MoL Grammar

CC-BY

Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: api/api2mol/concrete/extracted
Source used for this grammar: Javier Canovas, Frédéric Jouault, Jordi Cabot, Jesus Garcia Molina, api2mol.g, 2011-04-08 [api2mol.g]

Summary

Syntax

mainRule ::=
	contextSection? defaultMetaclassSection? mapping*
contextSection ::=
	AT CONTEXT instanceName (COMMA instanceName)* SEMI
defaultMetaclassSection ::=
	AT DEFAULT_METACLASS ID LPAREN ID RPAREN SEMI
mapping ::=
	ENUM? metaclassName COLON instanceName LCURLY section* RCURLY
metaclassName ::=
	ID
instanceName ::=
	ID (DOT ID)*
section ::=
	newSection
	multipleSection
	propertySection
	valueSection
newSection ::=
	AT NEW constructorCall*
multipleSection ::=
	AT MULTIPLE statement*
propertySection ::=
	ID COLON statement*
valueSection ::=
	ID COLON instanceName SEMI
statement ::=
	ID (LPAREN variable (COMMA variable)* RPAREN)? methodCall? SEMI
constructorCall ::=
	ID LPAREN (param (COMMA param)*)? RPAREN SEMI
methodCall ::=
	ID (LPAREN (param (COMMA param)*)? RPAREN)?
variable ::=
	ID
param ::=
	ID

GrammarLabMaintained by Dr. Vadim Zaytsev a.k.a. @grammarware. Last updated in September 2015. []