Documentation
¶
Index ¶
Constants ¶
View Source
const ( ILLEGAL token = iota IDENT // main ARG // arg[0-5] INT // 12345, 0b01010, 0xFFF, 0777 ADD // + SUB // - MUL // * DIV // / MOD // % AND // & OR // | XOR // ^ LSH // << RSH // >> INV // ~ LAND // && LOR // || EQL // == LT // < GT // > NOT // ! NEQ // != LTE // <= GTE // >= BITSET // &? LPAREN // ( LBRACK // [ COMMA // , RPAREN // ) RBRACK // ] TRUE // true FALSE // false IN // in NOTIN //notin EOF )
These define all legal token types
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CombinedSource ¶
type CombinedSource struct { // Sources is a list of the sources to parse Sources []Source }
CombinedSource allow you to combine more than one source and have them parsed as a unit
func CombineSources ¶
func CombineSources(s ...Source) *CombinedSource
CombineSources returns a CombinedSource with all the given sources
type FileSource ¶
type FileSource struct { // Filename is the name of the file to parse definitions from Filename string }
FileSource represents the source of parsing coming from a file
type LineType ¶
type LineType int
LineType represents the different types of lines available in a policy file
type ParseError ¶
type ParseError struct {
// contains filtered or unexported fields
}
ParseError represents error parsing a policy file. It will report the filename and the line number as well as the actual error.
func (*ParseError) Error ¶
func (e *ParseError) Error() string
type StringSource ¶
type StringSource struct { // Name is the name to report for this string during parsing errors Name string // Content is the actual string containing definitions Content string }
StringSource contains the definitions as a string
Click to show internal directories.
Click to hide internal directories.