Package astra.lang
Class Compiler
- java.lang.Object
-
- astra.core.Module
-
- astra.lang.Compiler
-
public class Compiler extends Module
Basic Compiler API.This class is highly experimental and is designed to support the creation of rules from strings.
- Author:
- Rem Collier
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class astra.core.Module
Module.ACTION, Module.EVENT, Module.FORMULA, Module.SENSOR, Module.SUPPRESS_NOTIFICATIONS, Module.TERM
-
-
Constructor Summary
Constructors Constructor Description Compiler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EventcompileEvent(String source)booleancompileRule(String source, ActionParam<Rule> rule)Action that dumps the agents beliefs to the console.booleaninline()Internal method indicating that methods in this API do not need to be threaded.
-
-
-
Method Detail
-
inline
public boolean inline()
Internal method indicating that methods in this API do not need to be threaded.
-
compileRule
public boolean compileRule(String source, ActionParam<Rule> rule)
Action that dumps the agents beliefs to the console.- Returns:
- true if the action was successful, false otherwise
-
-