sfeel

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2021 License: Apache-2.0 Imports: 7 Imported by: 2

README

Install

install antlr4 lib for osx

OS X
$ cd /usr/local/lib
$ sudo curl -O https://www.antlr.org/download/antlr-4.9.2-complete.jar
$ export CLASSPATH=".:/usr/local/lib/antlr-4.9.2-complete.jar:$CLASSPATH"
$ alias antlr4='java -jar /usr/local/lib/antlr-4.9.2-complete.jar'
$ alias grun='java org.antlr.v4.gui.TestRig'

or

$ brew install antlr

Create Code Generation for SfeelParser

Following command must be executed in directory of the .g4 file.

$      antlr4 -Dlanguage=Go -o gen SFeel.g4 -visitor

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidAst = errors.New("invalid ast, can not be null in Validate() method")
)

Functions

func CreateInputEntry

func CreateInputEntry(exp string) data.EntryInterface

func CreateOutputEntry

func CreateOutputEntry(exp string) data.EntryInterface

Types

type Entry

type Entry struct {
	// contains filtered or unexported fields
}

func (Entry) Convert

func (e Entry) Convert(listener sfeel.SFeelListenerInterface)

func (Entry) ExpressionLanguage

func (e Entry) ExpressionLanguage() data.ExpressionLanguage

func (Entry) String

func (e Entry) String() string

func (Entry) Validate

func (e Entry) Validate() (bool, []error)

func (Entry) ValidateDataTypeOfExpression

func (e Entry) ValidateDataTypeOfExpression(varType data.DataTyp) (bool, error)

func (Entry) ValidateExistenceOfFieldReferencesInExpression

func (e Entry) ValidateExistenceOfFieldReferencesInExpression(fields []data.FieldInterface) ([]data.FieldInterface, []error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL