Program:

Program  ::= Type_declaration*

no references


Type_declaration:

Type_declaration
         ::= Doc_comment Class_declaration ';'
           | Class_declaration ';'

referenced by:


Doc_comment:

Doc_comment
         ::= '/*' String '*/'

referenced by:


Class_declaration:

Class_declaration
         ::= 'class' Identifier '{' Field_eclaration* '}'
           | 'class' Identifier 'extends' Class_name '{' Field_declaration* '}'

referenced by:


Field_declaration:

Field_declaration
         ::= Doc_comment* Variable_declaration* Constructor_declaration Method_declaration_with_main

referenced by:


Method_declaration_with_main:

Method_declaration_with_main
         ::= 'fun' 'main' '=' Expression ';' Method_declaration*

referenced by:


Method_declaration:

Method_declaration
         ::= 'fun' Identifier ( Parameter_list '=' | '=' ) Expression ';'

referenced by:


Constructor_declaration:

Constructor_declaration
         ::= ( Identifier '(' ')' | Identifier '(' Parameter_list ')' ) Expression

referenced by:


Parameter_list:

Parameter_list
         ::= Parameter ( ',' Parameter )*

referenced by:


Parameter:

Parameter
         ::= Type ( Identifier | '=>' Identifier )

referenced by:


Expression_list:

Expression_list
         ::= Expression ( ',' Expression )*

referenced by:


Expression:

Expression
         ::= Variable_declaration
           | '(' Expression ')'
           | Expression_block
           | If_Expression
           | While_Expression
           | For_Expression
           | IO
           | Attribution
           | Expression_list
           | Value
           | Binary_expression
           | Unary_expression
           | Logical_expression
           | Creating_expression
           | CallExpression
           | AccessExpression

referenced by:


Expression_block:

Expression_block
         ::= '{' Expression* '}'

referenced by:


Attribution:

Attribution
         ::= Identifier '=' Expression ';'

referenced by:


IO:

IO       ::= 'write' '(' Expression ')'
           | 'read' '(' Identifier ')'

referenced by:


Variable_declaration:

Variable_declaration
         ::= Type Identifier '=' Expression ( ',' Variable_declarator '=' Expression )* ';'

referenced by:


If_Expression:

If_Expression
         ::= 'if' Expression 'then' Expression
           | 'if' Expression 'then' Expression 'else' Expression

referenced by:


While_Expression:

While_Expression
         ::= 'while' '(' Expression ')' Expression

referenced by:


For_Expression:

For_Expression
         ::= 'for' '(' ( Variable_declaration ';' | Expression ';' | ';' ) ( Expression ';' | ';' ) ( Expression ')' | ')' ) Expression

referenced by:


Value:

Value    ::= ConcretValue
           | AbstractValue

referenced by:


SpecialAccess:

SpecialAccess
         ::= Super
           | This

referenced by:


CallExpression:

CallExpression
         ::= ( Super | Identifier ) ( '(' ')' | '(' Expression_list ')' )

referenced by:


AccessExpression:

AccessExpression
         ::= ( SpecialAccess | Identifier ) '.' Expression

referenced by:


Super:

Super    ::= 'super'

referenced by:


This:

This     ::= 'this'

referenced by:


ConcretValue:

ConcretValue
         ::= Literal_value
           | List_value

referenced by:


AbstractValue:

AbstractValue
         ::= funcValue

referenced by:


Unary_expression:

Unary_expression
         ::= '-' Expression
           | 'not' Expression
           | 'length' Expression
           | head Expression
           | tail Expression
           | Compression_list_exp

referenced by:


Compression_list_exp:

Compression_list_exp
         ::= Expression Generator
           | Expression Generator Filter

referenced by:


Generator:

Generator
         ::= 'for' Identifier 'in' Expression
           | 'for' Identifier 'in' Expression [","] Generator

referenced by:


Filter:

Filter   ::= 'if' Expression

referenced by:


Binary_expression:

Binary_expression
         ::= Testing_expression
           | String_expression
           | Numeric_expression
           | List_expression

referenced by:


List_expression:

List_expression
         ::= Unary_expression ( '..' | ':' | '^^' ) Unary_expression

referenced by:


Numeric_expression:

Numeric_expression
         ::= Unary_expression ( '+' | '-' | '*' | '/' ) Unary_expression

referenced by:


Testing_expression:

Testing_expression
         ::= Unary_expression ( '>' | '<' | '>=' | '<=' | '==' | '!=' ) Unary_expression

referenced by:


Logical_expression:

Logical_expression
         ::= Expression '?' Expression ':' Expression
           | 'true'
           | 'false'

referenced by:


String_expression:

String_expression
         ::= Expression '+' Expression .

referenced by:


Creating_expression:

Creating_expression
         ::= 'new' Classe_name '(' ')'
           | 'new' Classe_name '(' Arglist ')'

referenced by:


Literal_value:

Literal_value
         ::= Integer_literal
           | Float_literal
           | String
           | Character
           | Boolean_literal
           | NULL

referenced by:


Arglist:

Arglist  ::= Expression ( ',' Expression )*

referenced by:


Type:

Type     ::= Type_specifier
           | Type_specifier '[' ']'

referenced by:


Type_specifier:

Type_specifier
         ::= ClassType
           | PrimitiveType

referenced by:


PrimitiveType:

PrimitiveType
         ::= 'boolean'
           | 'char'
           | 'int'
           | 'float'
           | 'long'
           | 'double'
           | 'String'
           | 'funcValue'

referenced by:


ClassType:

ClassType
         ::= Identifier

referenced by:


Integer_literal:

Integer_literal
         ::= '1..9' '0..9'*

referenced by:


Float_literal:

Float_literal
         ::= Decimal_digits
           | Decimal_digits '.' Decimal_digits
           | Decimal_digits Exponent_part
           | Decimal_digits '.' Decimal_digits Exponent_part

referenced by:


Decimal_digits:

Decimal_digits
         ::= '0..9' '0..9'*

referenced by:


Exponent_part:

Exponent_part
         ::= ( 'e' | 'e' ( '+' | '-' ) ) Decimal_digits

referenced by:


Character:

Character
         ::= 'based on the unicode character set'

referenced by:


String:

String   ::= "' '" character* "' '" .

referenced by:


Identifier:

Identifier
         ::= 'a..z,$,_' 'a..z,$,_,0..9,unicode character over 00C0'*

referenced by:



  ... generated by Railroad Diagram Generator