Documentation
¶
Overview ¶
Package vm implements the GPeg virtual machine.
Index ¶
- type Code
- func (vm *Code) Exec(r io.ReaderAt, memtbl memo.Table) (bool, int, *memo.Capture, []ParseError)
- func (vm *Code) ExecInterval(r io.ReaderAt, memtbl memo.Table, intrvl *Interval) (bool, int, *memo.Capture, []ParseError)
- func (c *Code) Size() int
- func (c *Code) ToBytes() ([]byte, error)
- func (c *Code) ToJson() ([]byte, error)
- type Interval
- type ParseError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Code ¶
type Code struct {
// contains filtered or unexported fields
}
Code is the representation of VM bytecode.
func (*Code) Exec ¶
Exec executes the parsing program this virtual machine was created with. It returns whether the parse was a match, the last position in the subject string that was matched, and any captures that were created.
func (*Code) ExecInterval ¶
type ParseError ¶
func (ParseError) Error ¶
func (e ParseError) Error() string
Click to show internal directories.
Click to hide internal directories.