lexfn

package
v0.0.0-...-c0f2935 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LEXER_ERROR_UNEXPECTED_EOF = "Unexpected EOF"

Functions

func LexBase

func LexBase(lex *lexer.Lexer) lexer.LexFn

func LexBlankNode

func LexBlankNode(lex *lexer.Lexer) lexer.LexFn

func LexBlankNodePropertyList

func LexBlankNodePropertyList(lex *lexer.Lexer) lexer.LexFn

func LexBooleanLiteral

func LexBooleanLiteral(lex *lexer.Lexer) lexer.LexFn

func LexCollection

func LexCollection(lex *lexer.Lexer) lexer.LexFn

func LexComment

func LexComment(lexer *lexer.Lexer) lexer.LexFn

func LexDirective

func LexDirective(lex *lexer.Lexer) lexer.LexFn

Directive

directive	::=	prefixID | base | sparqlPrefix | sparqlBase

Simple string match for this one

func LexIri

func LexIri(lex *lexer.Lexer) lexer.LexFn

func LexIriRef

func LexIriRef(lex *lexer.Lexer) lexer.LexFn

func LexLiteral

func LexLiteral(lex *lexer.Lexer) lexer.LexFn

func LexNumericLiteral

func LexNumericLiteral(lex *lexer.Lexer) lexer.LexFn

func LexObject

func LexObject(lex *lexer.Lexer) lexer.LexFn

func LexObjectList

func LexObjectList(lex *lexer.Lexer) lexer.LexFn

func LexPredicate

func LexPredicate(lex *lexer.Lexer) lexer.LexFn

func LexPredicateObjectList

func LexPredicateObjectList(lex *lexer.Lexer) lexer.LexFn

predicateObjectList ::= verb objectList (';' (verb objectList)?)*

func LexPrefixId

func LexPrefixId(lex *lexer.Lexer) lexer.LexFn

prefixID ::= '@prefix' PNAME_NS IRIREF '.'

func LexPrefixedName

func LexPrefixedName(lex *lexer.Lexer) lexer.LexFn

func LexRDFLiteral

func LexRDFLiteral(lex *lexer.Lexer) lexer.LexFn

func LexSparqlBase

func LexSparqlBase(lex *lexer.Lexer) lexer.LexFn

func LexSparqlPrefix

func LexSparqlPrefix(lex *lexer.Lexer) lexer.LexFn

func LexStatement

func LexStatement(lex *lexer.Lexer) lexer.LexFn

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 LexString

func LexString(lex *lexer.Lexer) lexer.LexFn

func LexSubject

func LexSubject(lex *lexer.Lexer) lexer.LexFn

Subject ::= iri | BlankNode | collection

func LexTriples

func LexTriples(lex *lexer.Lexer) lexer.LexFn

Triples ::= subject predicateObjectList | blankNodePropertyList predicateObjectList?

func LexTurtleDoc

func LexTurtleDoc(lex *lexer.Lexer) lexer.LexFn

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

func LexVerb

func LexVerb(lex *lexer.Lexer) lexer.LexFn

Types

This section is empty.

Jump to

Keyboard shortcuts

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