Railroad diagram for Agent grammar

high-level grammar rules of AgentSpeak(L++) which defines the agent
Switch rule visibilities
Agent
AgentSpeak
ComplexType
Terminal

Agent

agent

initial grammar rule

initial_beliefs

rule to represent initial beliefs

initial_goal

rule to represent the initial goal

AgentSpeak

achievement_goal_action

achivement-goal action

annotation_atom

atomic annotations (without parameter)

annotation_literal

annotation (with parameter)

annotation_value_literal

annotations (with any parameter)

annotations

annotation for rules and plans

assignment_expression

assignment expression (for assignin a variable)

assignment_expression_multivariable

assignment of a variable list

assignment_expression_singlevariable

assignment of a single variable

belief

belief rule

belief_action

belief-action operator

binary_expression

binary expression

block_formula

block-formula of subsection

body

plan or block body

body_formula

basic executable formula

deconstruct_expression

deconstruct expression (splitting clauses)

lambda

lambda expression for iteration

lambda_initialization

initialization of lambda expression

lambda_return

return argument lambda expression

logicalruledefinition

rule definition similar to plan

logicrule

rules are similar to plans but without context and trigger event

logicrules

optional (prolog) rules

plan

plan modified against the original Jason grammar, so a context is optional (on default true) and the plan body is also optional. The definition is trigger name [ plancontent ] .

plan_belief_trigger

plan trigger for a belief

plan_goal_trigger

plan trigger for a goal

plan_trigger

plan trigger which can match a goal or belief

plandefinition

plan body & context definition The definition is [ : condition ] [ <- body ]

plans

agent plans rule @note one plan must exists

repair_formula

repairable formula

test_action

test-goal -rule action

unary_expression

unary expression

ComplexType

atom

atoms are defined like Prolog atoms @note internal action in Jason can begin with a dot, but here it is removed

digitsequence

number definition

executable_action

rule for an action

executable_rule

rule for execute a logical-rule

executable_term

executable-terms are predictable structures

expression

logical & numeric entry rule for or-expression

expression_bracket

bracket expression

expression_logical_and

logical and-expression

expression_logical_element

logic element for expressions

expression_logical_negation

negated expression

expression_logical_xor

logical xor-expression

expression_numeric

numerical entry rule for equal expression

expression_numeric_additive

numeric addition-expression

expression_numeric_element

numeric element for expression

expression_numeric_multiplicative

numeric multiply-expression

expression_numeric_power

numeric pow-expression

expression_numeric_relation

relation expression

literal

clause represent a literal structure existing atom, optional argument

number

default behaviour in Jason is only a floating-point number (double) but here exists the difference between floating and integral number types within the grammar, the div-operator (integer division) is removed, also definied constants are used

term

terms are non-predictable structures

termlist

generic list equal to collcations with empty clause

ternary_operation

ternary operation

ternary_operation_false

ternary operation false-rule

ternary_operation_true

ternary operation true-rule

unification

unification expression

unification_constraint

variable

variables are defined like Prolog variables, @-prefix creates a thread-safe variable

variable_evaluate

variable-evaluation will be used for an executable call like X(1,2,Y), it is possible for passing variables and parameters

variableatom

name structure of a variable

variablelist

list with head-tail-notation definition

Terminal

AND

logical and-concationation (c-style)

ASSIGN

ASSIGNDECREMENT

ASSIGNDIVIDE

ASSIGNINCREMENT

ASSIGNMODULO

ASSIGNMULTIPLY

ASSIGNPOW

AT

ATOMIC

AVOGADRO

BINARYOPERATOR

binary operator

BLOCKCOMMENT

block comment allowed within the grammar default behaviour does not allow block comments

BOLTZMANN

COLON

COMMA

CONSTANT

CONSTANTNUMBER

floating-point constants

DECONSTRUCT

DECREMENT

DIGIT

DOLLAR

DOT

DOUBLEEXCLAMATIONMARK

DOUBLEQUOTESTRING

ELECTRON

EQUAL

EULER

EXCLAMATIONMARK

FALSE

GRAVITY

GREATER

GREATEREQUAL

INCREMENT

variable operators

LEFTANGULARBRACKET

LEFTARROW

LEFTCURVEDBRACKET

LEFTROUNDBRACKET

LEFTSHIFT

LESS

comparator types

LESSEQUAL

LIGHTSPEED

LINECOMMENT

add for line-comment also #

LOGICALVALUE

boolean values

LOWERCASELETTER

char definitions

MAXIMUMVALUE

MINIMUMVALUE

MINUS

MODULO

MULTIPLY

NAN

NEGATIVEINFINITY

NEUTRON

NOTEQUAL

OR

logical or-concationation (c-style)

PARALLEL

plan annotation

PI

PLUS

POSITIVEINFINITY

POW

PROTON

QUESTIONMARK

RIGHTANGULARBRACKET

RIGHTARROW

RIGHTCURVEDBRACKET

RIGHTROUNDBRACKET

RIGHTSHIFT

RULEOPERATOR

SEMICOLON

SINGLEQUOTESTRING

string can be definied in single- and double-quotes

SLASH

STRING

string define with single or double quotes

STRONGNEGATION

TRUE

UNARYOPERATOR

unary operator

UNDERSCORE

UPPERCASELETTER

VLINE

prolog list seperator for head-tail definition

WHITESPACE

any whitespace

XOR

logical xor-concationation (c-style)