grammar

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Document = op.Capture{
		Name: "Document",
		Value: op.ZeroOrMore{Value: op.And{
			op.Optional{Value: op.Or{Triple, nt.Comment}},
			nt.OWhitespace, op.EndOfLine{},
		}},
	}
	Triple = op.Capture{
		Name: "Triple",
		Value: op.And{
			nt.OWhitespace,
			Subject, nt.OWhitespace,
			nt.Predicate, nt.OWhitespace,
			Object, nt.OWhitespace,
			'.', op.Optional{Value: nt.Comment},
		},
	}
	Subject = op.Capture{
		Name:  "Subject",
		Value: op.Or{nt.IRIReference, nt.BlankNodeLabel, QuotedTriple},
	}
	Object = op.Capture{
		Name:  "Object",
		Value: op.Or{nt.IRIReference, nt.BlankNodeLabel, nt.Literal, QuotedTriple},
	}
	QuotedTriple = op.Capture{
		Name: "QuotedTriple",
		Value: op.And{
			"<<",
			nt.OWhitespace,
			op.Reference{Name: "Subject"}, nt.OWhitespace,
			nt.Predicate, nt.OWhitespace,
			op.Reference{Name: "Object"}, nt.OWhitespace,
			">>",
		},
	}
)

Functions

func NewParser

func NewParser(input []rune) (*parser.Parser, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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