Documentation
¶
Overview ¶
Package lexer implements the lexer used bye the BadWolf query language. The lexer is losely written after the parsel model described by Rob Pike in his presentation "Lexical Scanning in Go". Slides can be found at http://cuddle.googlecode.com/hg/talk/lex.html#landing-slide.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TokenType ¶
type TokenType int
TokenType list all the possible tokens returned by a lexer.
const ( // ItemError contains information about an error triggered while scanning. ItemError TokenType = iota // ItemEOF indicates end of input to be scanned in BQL. ItemEOF // ItemQuery represents the select keyword in BQL. ItemQuery // ItemInsert represents insert keyword in BQL. ItemInsert // ItemDelete represents insert keyword in BQL. ItemDelete // ItemCreate represents the creation of a graph in BQL. ItemCreate // ItemDrop represent the destruction of a graph in BQL. ItemDrop // ItemGraph represent the graph to be created of destroyed in BQL. ItemGraph // ItemData represents the data keyword in BQL. ItemData // ItemInto represents the into keyword in BQL. ItemInto // ItemFrom represents the from keyword in BQL. ItemFrom // ItemWhere represents the where keyword in BQL. ItemWhere // ItemAs represents the as keyword in BQL. ItemAs // ItemType represents keyword type in BQL. ItemType // ItemID represents id keyword in BQL. ItemID // ItemAt represents at keyword in BQL. ItemAt // ItemBefore represents the before keyword in BQL. ItemBefore // ItemAfter represents the after keyword in BQL. ItemAfter // ItemBetween represents the betwen keyword in BQL. ItemBetween // ItemCount represents the count funtion in BQL. ItemCount // ItemDistinct represents the distinct modifier in BQL. ItemDistinct // ItemSum represents the sum function in BQL. ItemSum // ItemGroup represents the group keyword in group by clause in BQL. ItemGroup // ItemBy represents the by keyword in group by clause in BQL. ItemBy // ItemOrder represent the order keyword in group by clause in BQL. ItemOrder // ItemHaving represents the having clause keyword clause in BQL. ItemHaving // ItemAsc represents asc keywork on order by clause in BQL. ItemAsc // ItemDesc represents desc keywork on order by clause in BQL ItemDesc // ItemLimit represetnts the limit clause in BQL. ItemLimit // ItemBinding respresents a variable binding in BQL. ItemBinding // ItemNode respresents a BadWolf node in BQL. ItemNode // ItemLiteral represents a BadWolf literal in BQL. ItemLiteral // ItemPredicate represents a BadWolf predicates in BQL. ItemPredicate // ItemPredicateBound represents a BadWolf predicate bound in BQL. ItemPredicateBound // ItemLBracket representes the left opening bracket token in BQL. ItemLBracket // ItemRBracket representes the right opening bracket token in BQL. ItemRBracket // ItemLPar representes the left opening parentesis token in BQL. ItemLPar // ItemRPar representes the right closing parentesis token in BQL. ItemRPar // ItemDot represents the graph clause separator . in BQL. ItemDot // ItemSemicolon represents the final statement semicolon in BQL. ItemSemicolon // ItemComma respresnts the graph join operator in BQL. ItemComma // ItemLT represents < in BQL. ItemLT // ItemGT represents > in BQL. ItemGT // ItemEQ represents = in BQL. ItemEQ // ItemNot represents keyword not in BQL. ItemNot // ItemAnd represents keyword and in BQL. ItemAnd // ItemOr represents keyword or in BQL. ItemOr )
Click to show internal directories.
Click to hide internal directories.