|
SDefGlobalKeyword
|
'defglobal'
|
|
SDefGlobalSyntax
|
'(defglobal [?*<variable-name>* = <global-value>]+)'+sLineBreak+' where'+sLineBreak+' <variable-name> must be a unique name and '+sLineBreak+' <global-value> = <constant>|<function-call>'
|
|
SDefinedTypeKeyword
|
'deftype'
|
|
SDefinedTypeSyntax
|
'deftype [<module-name>::]<symbol-name>'+sLineBreak+' [<string-comment>] extends <type-name>'+sLineBreak+' [ [<range-definition>]'+sLineBreak+' [<unit-definition>]'+sLineBreak+' [<cardinality-definition>]'+sLineBreak+' [<allowed-definition>*]'+sLineBreak+' ] |'+sLineBreak+' [fuzzy-variable-definition]'+sLineBreak+''+sLineBreak+'<type-name> = (type <ATOM| STRING| INTEGER| FACTID| FLOAT| DESCRIPTOR| OBJECT| CLASS| EXTERNALADDRESS>+|FUZZY)'+sLineBreak+'<range-definition> = (range <min-float-expression> <max-float-expression>)'+sLineBreak+'<unit-definition> = (units <string-expression>)'+sLineBreak+'<cardinality-definition> = (range <min-float> <max-float>)'+sLineBreak+'<allowed-definition> = (allowed-values <expression>+)|'+sLineBreak+' (allowed-numbers <numeric-expression>+)|'+sLineBreak+' (allowed-integers <integer-expression>+)|'+sLineBreak+' (allowed-floats <float-expression>+)|'+sLineBreak+' (allowed-lexemes <string-or-symbol-expression>+)'+sLineBreak+' (allowed-symbols <symbol-expression>+)|'+sLineBreak+' (allowed-strings <string-expression>+)'+sLineBreak+'<fuzzy-variable-definition>= (range <min-float-expression> <max-float-expression>) [(values <fuzzy-term-definition>+)]'+sLineBreak+'<fuzzy-term-definition> = (term <symbol-name> [<fuzzy-singletons>]|'+sLineBreak+' [(s <leftbound-numeric-expression> <rightbound-numeric-expression>)]|'+sLineBreak+' [(z <leftbound-numeric-expression> <rightbound-numeric-expression>)]|'+sLineBreak+' [(tri <leftbound-numeric-expression> <center-numeric-expression> <rightbound-numeric-expression>)]|'+sLineBreak+' [(pi [ <center-numeric-expression> <range-numeric-expression> ] | [ <left-numeric-expression> <center-numeric-expression> <right-numeric-expression> ])]'+sLineBreak+'<fuzzy-singletons> = ((x0 y0)+)'+sLineBreak+':: = Module separator. Module name is optional. If not specified, a rule belongs to the currently active module'
|
|
SFactSetKeyword
|
'deffacts'
|
|
SFactSetSyntax
|
'(deffacts <name> ["comment"] <fact>*)'
|
|
SFactTemplateKeyword
|
'deftemplate'
|
|
SFactTemplateSyntax
|
'(deftemplate [<module-name>::]<symbol-name> '+sLineBreak+' [<string-comment>] '+sLineBreak+' <slot-definition>*)'+sLineBreak+''+sLineBreak+'<slot-definition> = (slot|field <symbol-name> <slot-attribute>*) | (multislot <symbol-name> <slot-attribute>*)'+sLineBreak+'<slot-attribute> = (default ?DERIVE|?NONE|<constant>|<variable>|<function-call>)'+sLineBreak+' (default-dynamic <value-expression>) |'+sLineBreak+' (type SYMBOL | ATOM | STRING | INTEGER | FLOAT |'+sLineBreak+' LEXEME | NUMBER | CLASS | DESCRIPTOR | OBJECT |'+sLineBreak+' EXTERNALADDRESS | FUZZY | FACT | FACTID |'+sLineBreak+' ?VARIABLE | <deftype-name-expression>) |'+sLineBreak+' (range ?VARIABLE|<numeric-expression> ?VARIABLE|<numeric-expression>)|'+sLineBreak+' (cardinality ?VARIABLE|<integer-expression> ?VARIABLE|<integer-expression>)|'+sLineBreak+' (allowed-values <expression>+)|'+sLineBreak+' (allowed-lexemes <lexeme-expression>+) |'+sLineBreak+' (allowed-strings <string-expression>+) |'+sLineBreak+' (allowed-symbols <symbol-expression>+) |'+sLineBreak+' (allowed-numbers <numeric-expression>+) |'+sLineBreak+' (allowed-integers <integer-expression>+) |'+sLineBreak+' (allowed-floats <float-expression>+) |'+sLineBreak+' (units <string-expression>)'+sLineBreak+':: = Module separator. Module name is optional. If not specified, a rule belongs to the currently active module'
|
|
SFunctionKeyword
|
'function'
|
|
SFuzzyTermKeyword
|
'term'
|
|
SModuleKeyword
|
'defmodule'
|
|
SModuleSyntax
|
'(defmodule <symbol-name> [<string-comment>] [[<export-statement>]|[<import-statement>*]])'+sLineBreak+''+sLineBreak+'<export-statement> ='+sLineBreak+' (export ?ALL)|'+sLineBreak+' (export ?NONE)|'+sLineBreak+' (export deftype|deftemplate ?ALL)|'+sLineBreak+' (export deftype|deftemplate ?NONE)|'+sLineBreak+' (export deftype|deftemplate <names>+)'+sLineBreak+'<import-statement> ='+sLineBreak+' (import <module-name> ?ALL)|'+sLineBreak+' (import <module-name> ?NONE)|'+sLineBreak+' (import <module-name> deftype|deftemplate ?ALL)|'+sLineBreak+' (import <module-name> deftype|deftemplate ?NONE)|'+sLineBreak+' (import <module-name> deftype|deftemplate <construct-names>+)'+sLineBreak+'<construct-names> = (<template-name> | <deftype-name>*)'+sLineBreak+'?ALL = literal, meaning to import/export all constructs of that type for the module'+sLineBreak+'?NONE = literal, meaning to import/export NO constructs of that type for the module'
|
|
SRuleKeyword
|
'defrule'
|
|
SRuleSyntax
|
'(defrule [<module-name>::]<symbol-name>'+sLineBreak+' [<string-comment>]'+sLineBreak+' [(declare [(auto-focus <boolean-expression>])|'+sLineBreak+' [(salience <integer-expression>)]|'+sLineBreak+' [(oneshot <boolean-expression>])|'+sLineBreak+' [(enabled <boolean-expression>])]'+sLineBreak+' <conditional-element>*'+sLineBreak+' =>'+sLineBreak+' <action>*)'+sLineBreak+''+sLineBreak+'<conditional-element> = <pattern> | ?<variable-name> <- <pattern> |'+sLineBreak+' (test <function-call>) |'+sLineBreak+' (not <conditional-element>) |'+sLineBreak+' (unique <conditional-element>) |'+sLineBreak+' (explicit <conditional-element>) |'+sLineBreak+' (exists <conditional-element>+)'+sLineBreak+'<pattern> = (<template-name> <slot>*)'+sLineBreak+'<slot> = (<slot-name> <constraint>*)'+sLineBreak+'<constraint> = ? | $? | <connected-constraint>'+sLineBreak+'<connected-constraint> = <single-constraint> | <<single-constraint>&<connected-constraint>> |'+sLineBreak+' <<single-constraint>|<connected-constraint>>'+sLineBreak+'<single-constraint> = <constant> | <variable> | :<function-call> | =<function-call> |'+sLineBreak+' ~<constant> | ~<variable> | ~:<function-call> | ~=<function-call>'+sLineBreak+'<action> = <constant>|<variable>|<function-call>'+sLineBreak+':: = Module separator. Module name is optional. If not specified, a rule belongs to the currently active module'
|
|
SSyntax
|
'Syntax:'
|
|
SUserFunctionKeyword
|
'deffunction'
|
|
SUserFunctionSyntax
|
'(deffunction <function-name> (<argument>*)'+sLineBreak+' ["optional comment"]'+sLineBreak+' <statement>* '+sLineBreak+')'+sLineBreak+' where'+sLineBreak+' <function-name> must be a unique name and'+sLineBreak+' <statement> = <constant>|<variable>|<function-call>'
|