parser

package
v0.0.0-...-e582a83 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ALIAS = 57388
View Source
const AMPERSAND = 57414
View Source
const AND = 57383
View Source
const AND_EQUALS = 57406
View Source
const BANG = 57396
View Source
const BEGIN = 57374
View Source
const BINARY_MINUS = 57400
View Source
const BINARY_PLUS = 57398
View Source
const BREAK = 57377
View Source
const CARET = 57416
View Source
const CASE = 57386
View Source
const CLASS = 57369
View Source
const COLON = 57410
View Source
const COMMA = 57358
View Source
const COMPLEMENT = 57397
View Source
const CONSTANT = 57352
View Source
const DEF = 57363
View Source
const DEFINED = 57392
View Source
const DO = 57362
View Source
const DOT = 57411
View Source
const ELSE = 57366
View Source
const ELSIF = 57367
View Source
const END = 57364
View Source
const ENSURE = 57376
View Source
const EOF = 57423
View Source
const EQUALTO = 57395
View Source
const EXCLUSIVE_RANGE = 57404
View Source
const FILE_CONST_REF = 57421
View Source
const FOR = 57371
View Source
const GLOBAL_VARIABLE = 57354
View Source
const GREATERTHAN = 57394
View Source
const HASH_ROCKET = 57347
View Source
const IF = 57365
View Source
const IVAR_OR_CLASS_VARIABLE = 57355
View Source
const LAMBDA = 57385
View Source
const LBRACE = 57419
View Source
const LBRACKET = 57417
View Source
const LESSTHAN = 57393
View Source
const LINE_CONST_REF = 57422
View Source
const LPAREN = 57356
View Source
const MODULE = 57370
View Source
const NAMESPACED_CAPITAL_REF = 57353
View Source
const NEWLINE = 57408
View Source
const NEXT = 57378
View Source
const NIL = 57391
View Source
const NODE = 57348
View Source
const NamespacedModule = 57360
View Source
const OPERATOR = 57346
View Source
const OR = 57384
View Source
const OR_EQUALS = 57405
View Source
const PIPE = 57412
View Source
const ProcArg = 57361
View Source
const QUESTIONMARK = 57415
View Source
const RANGE = 57403
View Source
const RBRACE = 57420
View Source
const RBRACKET = 57418
View Source
const REDO = 57379
View Source
const REF = 57349
View Source
const RESCUE = 57375
View Source
const RETRY = 57380
View Source
const RETURN = 57381
View Source
const RPAREN = 57357
View Source
const RubyEofCode = 1
View Source
const RubyErrCode = 2
View Source
const RubyFlag = -1000
View Source
const RubyInitialStackSize = 16
View Source
const RubyLast = 4877
View Source
const RubyPrivate = 57344
View Source
const SELF = 57390
View Source
const SEMICOLON = 57409
View Source
const SLASH = 57413
View Source
const SPECIAL_CHAR_REF = 57351
View Source
const STAR = 57402
View Source
const STRING = 57359
View Source
const SUPER = 57389
View Source
const SYMBOL = 57350
View Source
const UNARY_MINUS = 57401
View Source
const UNARY_PLUS = 57399
View Source
const UNLESS = 57368
View Source
const UNTIL = 57373
View Source
const WHEN = 57387
View Source
const WHILE = 57372
View Source
const WHITESPACE = 57407
View Source
const YIELD = 57382

Variables

View Source
var (
	RubyDebug        = 0
	RubyErrorVerbose = false
)
View Source
var DebugStatements = []string{}
View Source
var RubyAct = [...]int{}/* 4877 elements not displayed */
View Source
var RubyChk = [...]int{}/* 675 elements not displayed */
View Source
var RubyDef = [...]int{}/* 675 elements not displayed */
View Source
var RubyErrorMessages = [...]struct {
	state int
	token int
	msg   string
}{}
View Source
var RubyExca = [...]int{}/* 238 elements not displayed */
View Source
var RubyPact = [...]int{}/* 675 elements not displayed */
View Source
var RubyPgo = [...]int{

	0, 626, 0, 302, 621, 39, 8, 620, 619, 618,
	617, 616, 3, 608, 1, 607, 11, 606, 143, 602,
	599, 597, 830, 266, 12, 474, 594, 593, 591, 586,
	584, 581, 573, 571, 565, 558, 557, 556, 995, 15,
	26, 555, 553, 22, 551, 550, 6, 17, 548, 546,
	544, 543, 542, 541, 540, 537, 536, 534, 1055, 533,
	19, 18, 13, 532, 24, 4, 531, 14, 9, 525,
	106, 25, 519, 463, 10, 16, 31, 20, 7, 5,
	69,
}
View Source
var RubyR1 = [...]int{}/* 330 elements not displayed */
View Source
var RubyR2 = [...]int{}/* 330 elements not displayed */
View Source
var RubyStatenames = [...]string{}
View Source
var RubyTok1 = [...]int{

	1,
}
View Source
var RubyTok2 = [...]int{

	2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
	12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
	22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
	32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
	42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
	52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
	62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
	72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
}
View Source
var RubyTok3 = [...]int{
	0,
}
View Source
var RubyToknames = [...]string{
	"$end",
	"error",
	"$unk",
	"OPERATOR",
	"HASH_ROCKET",
	"NODE",
	"REF",
	"SYMBOL",
	"SPECIAL_CHAR_REF",
	"CONSTANT",
	"NAMESPACED_CAPITAL_REF",
	"GLOBAL_VARIABLE",
	"IVAR_OR_CLASS_VARIABLE",
	"LPAREN",
	"RPAREN",
	"COMMA",
	"STRING",
	"NamespacedModule",
	"ProcArg",
	"DO",
	"DEF",
	"END",
	"IF",
	"ELSE",
	"ELSIF",
	"UNLESS",
	"CLASS",
	"MODULE",
	"FOR",
	"WHILE",
	"UNTIL",
	"BEGIN",
	"RESCUE",
	"ENSURE",
	"BREAK",
	"NEXT",
	"REDO",
	"RETRY",
	"RETURN",
	"YIELD",
	"AND",
	"OR",
	"LAMBDA",
	"CASE",
	"WHEN",
	"ALIAS",
	"SUPER",
	"SELF",
	"NIL",
	"DEFINED",
	"LESSTHAN",
	"GREATERTHAN",
	"EQUALTO",
	"BANG",
	"COMPLEMENT",
	"BINARY_PLUS",
	"UNARY_PLUS",
	"BINARY_MINUS",
	"UNARY_MINUS",
	"STAR",
	"RANGE",
	"EXCLUSIVE_RANGE",
	"OR_EQUALS",
	"AND_EQUALS",
	"WHITESPACE",
	"NEWLINE",
	"SEMICOLON",
	"COLON",
	"DOT",
	"PIPE",
	"SLASH",
	"AMPERSAND",
	"QUESTIONMARK",
	"CARET",
	"LBRACKET",
	"RBRACKET",
	"LBRACE",
	"RBRACE",
	"FILE_CONST_REF",
	"LINE_CONST_REF",
	"EOF",
}
View Source
var Statements []ast.Node

Functions

func NewNonEmitingLexer

func NewNonEmitingLexer(l StatefulRubyLexer) *nonEmitingLexer

func Reset

func Reset()

func RubyErrorMessage

func RubyErrorMessage(state, lookAhead int) string

func RubyParse

func RubyParse(Rubylex RubyLexer) int

func RubyStatname

func RubyStatname(s int) string

func RubyTokname

func RubyTokname(c int) string

func Rubylex1

func Rubylex1(lex RubyLexer, lval *RubySymType) (char, token int)

Types

type ConcreteStatefulRubyLexer

type ConcreteStatefulRubyLexer struct {
	LastError error
	// contains filtered or unexported fields
}

func (*ConcreteStatefulRubyLexer) CurrentLineNumber

func (l *ConcreteStatefulRubyLexer) CurrentLineNumber() int

func (*ConcreteStatefulRubyLexer) Error

func (lexer *ConcreteStatefulRubyLexer) Error(error string)

func (*ConcreteStatefulRubyLexer) Lex

func (lexer *ConcreteStatefulRubyLexer) Lex(lval *RubySymType) int

type RubyLexer

type RubyLexer interface {
	Lex(lval *RubySymType) int
	Error(s string)
}

type RubyParser

type RubyParser interface {
	Parse(RubyLexer) int
	Lookahead() int
}

func RubyNewParser

func RubyNewParser() RubyParser

type RubyParserImpl

type RubyParserImpl struct {
	// contains filtered or unexported fields
}

func (*RubyParserImpl) Lookahead

func (p *RubyParserImpl) Lookahead() int

func (*RubyParserImpl) Parse

func (Rubyrcvr *RubyParserImpl) Parse(Rubylex RubyLexer) int

type RubySymType

type RubySymType struct {
	// contains filtered or unexported fields
}

type StatefulRubyLexer

type StatefulRubyLexer interface {
	CurrentLineNumber() int

	RubyLexer
	// contains filtered or unexported methods
}

func NewLexer

func NewLexer(input string) StatefulRubyLexer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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