parser

package
v0.0.0-...-d977049 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package parser generates Rust code for the parser

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Gen

func Gen(parserFile string, g *ast.GoGLL, gs *gslot.GSlot, ff *frstflw.FF)

Types

type Alternate

type Alternate struct {
	NT       string
	AltLabel string
	Comment  string
	Empty    bool
	Slots    []*SlotData
	LastSlot *SlotData
}

type Data

type Data struct {
	StartSymbol string
	Alternates  []*Alternate
	TestSelect  []*TSData
	Follow      []*TSData
}

Data contains data for the code generation template

type SlotData

type SlotData struct {
	AltLabel  string
	PreLabel  string
	PostLabel string
	Comment   string
	IsNT      bool
	Head      string
}

type Symbol

type Symbol struct {
	TokenType string
	Comment   string
}

type TSData

type TSData struct {
	Label   string
	Comment string
	Symbols []*Symbol
}

Jump to

Keyboard shortcuts

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