Documentation ¶
Index ¶
- Variables
- func LexBase(lex *lexer.Lexer) lexer.LexFn
- func LexBlankNode(lex *lexer.Lexer) lexer.LexFn
- func LexBlankNodePropertyList(lex *lexer.Lexer) lexer.LexFn
- func LexBooleanLiteral(lex *lexer.Lexer) lexer.LexFn
- func LexCollection(lex *lexer.Lexer) lexer.LexFn
- func LexComment(lexer *lexer.Lexer) lexer.LexFn
- func LexDirective(lex *lexer.Lexer) lexer.LexFn
- func LexIri(lex *lexer.Lexer) lexer.LexFn
- func LexIriRef(lex *lexer.Lexer) lexer.LexFn
- func LexLiteral(lex *lexer.Lexer) lexer.LexFn
- func LexNumericLiteral(lex *lexer.Lexer) lexer.LexFn
- func LexObject(lex *lexer.Lexer) lexer.LexFn
- func LexObjectList(lex *lexer.Lexer) lexer.LexFn
- func LexPredicate(lex *lexer.Lexer) lexer.LexFn
- func LexPredicateObjectList(lex *lexer.Lexer) lexer.LexFn
- func LexPrefixId(lex *lexer.Lexer) lexer.LexFn
- func LexPrefixedName(lex *lexer.Lexer) lexer.LexFn
- func LexRDFLiteral(lex *lexer.Lexer) lexer.LexFn
- func LexSparqlBase(lex *lexer.Lexer) lexer.LexFn
- func LexSparqlPrefix(lex *lexer.Lexer) lexer.LexFn
- func LexStatement(lex *lexer.Lexer) lexer.LexFn
- func LexString(lex *lexer.Lexer) lexer.LexFn
- func LexSubject(lex *lexer.Lexer) lexer.LexFn
- func LexTriples(lex *lexer.Lexer) lexer.LexFn
- func LexTurtleDoc(lex *lexer.Lexer) lexer.LexFn
- func LexVerb(lex *lexer.Lexer) lexer.LexFn
Constants ¶
This section is empty.
Variables ¶
var LEXER_ERROR_UNEXPECTED_EOF = "Unexpected EOF"
Functions ¶
func LexDirective ¶
Directive
directive ::= prefixID | base | sparqlPrefix | sparqlBase
Simple string match for this one
func LexPredicateObjectList ¶
predicateObjectList ::= verb objectList (';' (verb objectList)?)*
func LexPrefixId ¶
prefixID ::= '@prefix' PNAME_NS IRIREF '.'
func LexStatement ¶
https://www.w3.org/TR/2014/REC-turtle-20140225/#grammar-production-statement statement ::= directive | triples '.' A Statement is either a directive (@prefix, BASE stuff like that) or a triple that ends in a .
This lexer.Lexer function does nothing except direct towards a directive or triple lex func I've included lexing a line wide comment here, however a comment may appear on any line till the end of it
func LexSubject ¶
Subject ::= iri | BlankNode | collection
func LexTriples ¶
Triples ::= subject predicateObjectList | blankNodePropertyList predicateObjectList?
func LexTurtleDoc ¶
https://www.w3.org/TR/2014/REC-turtle-20140225/#grammar-production-turtleDoc turtleDoc ::= statement* A turtle doc is defined as a series of RDF turtle staements What this means for the lex is keep restarting the LexStatement until you hit EOF and finish
Types ¶
This section is empty.