gotools/cmd/goyacc/yacc.go

const ACTSIZE

const NSTATES

const TEMPSIZE

const SYMINC

const RULEINC

const PRODINC

const WSETINC

const STATEINC

const PRIVATE

const NTBASE

const ERRCODE

const ACCEPTCODE

const YYLEXUNK

const TOKSTART

const NOASC

const LASC

const RASC

const BASC

const DONE

const MUSTDO

const MUSTLOOKAHEAD

const ACTFLAG

const REDFLAG

const yyFlag

const IDENTIFIER

const MARK

const TERM

const LEFT

const RIGHT

const BINARY

const PREC

const LCURLY

const IDENTCOLON

const NUMBER

const START

const TYPEDEF

const TYPENAME

const UNION

const ERROR

const ENDFILE

const EMPTY

const WHOKNOWS

const OK

const NOMORE

// macros for getting associativity and precedence levels
func ASSOC(i int) int {}

func PLEVEL(i int) int {}

func TYPE(i int) int {}

// macros for setting associativity and precedence levels
func SETASC(i, j int) int {}

func SETPLEV(i, j int) int {}

func SETTYPE(i, j int) int {}

var finput

var stderr

var ftable

var fcode

var foutput

var fmtImported

var oflag

var vflag

var lflag

var prefix

func init() {}

var initialstacksize

var infile

var numbval

var tokname

var tokflag

type Lkset

type Pitem

type Item

type Symb

type Wset

var ntypes

var typeset

var ntokens

var tokset

var toklev

var nnonter

var nontrst

var start

var nstate

var pstate

var statemem

var tystate

var tstates

var ntstates

var mstates

var lastred

var defact

var nolook

var tbitset

var clset

var wsets

var cwp

var amem

var memp

var indgo

var temp1

var lineno

var fatfl

var nerrors

var extval

var nprod

var prdptr

var levprd

var rlines

var zzgoent

var zzgobest

var zzacent

var zzexcp

var zzclose

var zzrrconf

var zzsrconf

var zzstate

var yypgo

var optst

var ggreed

var pgo

var maxspr

var maxoff

var maxa

var pres

var pfirst

var pempty

var indebug

var pidebug

var gsdebug

var cldebug

var pkdebug

var g2debug

var adb

type Resrv

var resrv

type Error

var errors

type Row

var stateTable

var zznewstate

const EOF

func main() {}

func setup() {}

// allocate enough room to hold another production
func moreprod() {}

// define s to be a terminal if nt==0
// or a nonterminal if nt==1
func defin(nt int, s string) int {}

var peekline

func gettok() int {}

func getword(c rune) {}

// determine the type of a symbol
func fdtype(t int) int {}

func chfind(t int, s string) int {}

// copy the union declaration to the output, and the define file if present
func cpyunion() {}

// saves code between %{ and %}
// adds an import for __fmt__ the first time
func cpycode() {}

// emits code saved up from between %{ and %}
// called by cpycode
// adds an import for __yyfmt__ after the package clause
func emitcode(code []rune, lineno int) {}

// does this line look like a package clause?  not perfect: might be confused by early comments.
func isPackageClause(line []rune) bool {}

// skip initial spaces
func skipspace(line []rune) []rune {}

// break code into lines
func lines(code []rune) [][]rune {}

// writes code to ftable
func writecode(code []rune) {}

// skip over comments
// skipcom is called after reading a '/'
func skipcom() int {}

// copy action to the next ; or closing }
func cpyact(curprod []int, max int) {}

func openup() {}

// return a pointer to the name of symbol i
func symnam(i int) string {}

// set elements 0 through n-1 to c
func aryfil(v []int, n, c int) {}

// compute an array with the beginnings of productions yielding given nonterminals
// The array pres points to these lists
// the array pyield has the lists: the total size is only NPROD+1
func cpres() {}

// mark nonterminals which derive the empty string
// also, look for nonterminals which don't derive any token strings
func cempty() {}

// compute an array with the first of nonterminals
func cpfir() {}

// generate the states
func stagen() {}

// generate the closure of state i
func closure(i int) {}

// sorts last state,and sees if it equals earlier ones. returns state number
func state(c int) int {}

func putitem(p Pitem, set Lkset) {}

// creates output string for item pointed to by pp
func writem(pp Pitem) string {}

// pack state i from temp1 into amem
func apack(p []int, n int) int {}

// print the output for the states
func output() {}

// decide a shift/reduce conflict by precedence.
// r is a rule number, t a token number
// the conflict is in state s
// temp1[t] is changed to reflect the action
func precftn(r, t, s int) {}

// output state i
// temp1 has the actions, lastred the default
func addActions(act []int, i int) []int {}

// writes state i
func wrstate(i int) {}

// output the gotos for the nontermninals
func go2out() {}

// output the gotos for nonterminal c
func go2gen(c int) {}

// in order to free up the mem and amem arrays for the optimizer,
// and still be able to output yyr1, etc., after the sizes of
// the action array is known, we hide the nonterminals
// derived by productions in levprd.
func hideprod() {}

func callopt() {}

// finds the next i
func nxti() int {}

func gin(i int) {}

func stin(i int) {}

// this version is for limbo
// write out the optimized parser
func aoutput() {}

// put out other arrays, copy the parsers
func others() {}

func runMachine(tokens []string) (state, token int) {}

func minMax(v []int) (min, max int) {}

// return the smaller integral base type to store the values in v
func minType(v []int, allowUnsigned bool) (typ string) {}

func arrayOutColumns(s string, v []int, columns int, allowUnsigned bool) {}

func arout(s string, v []int, n int) {}

// output the summary on y.output
func summary() {}

// write optimizer summary
func osummary() {}

// copies and protects "'s in q
func chcopy(q string) string {}

func usage() {}

func bitset(set Lkset, bit int) int {}

func setbit(set Lkset, bit int) {}

func mkset() Lkset {}

// set a to the union of a and b
// return 1 if b is not a subset of a, 0 otherwise
func setunion(a, b []int) int {}

func prlook(p Lkset) {}

var peekrune

func isdigit(c rune) bool {}

func isword(c rune) bool {}

// return 1 if 2 arrays are equal
// return 0 if not equal
func aryeq(a []int, b []int) int {}

func getrune(f *bufio.Reader) rune {}

func ungetrune(f *bufio.Reader, c rune) {}

func open(s string) *bufio.Reader {}

func create(s string) *bufio.Writer {}

// write out error comment
func lerrorf(lineno int, s string, v ...interface{}

func errorf(s string, v ...interface{}

func exit(status int) {}

func gofmt() {}

var yaccpar

var yaccpartext