q; want "("`, p.lex.Token)
	}
	var args []Expr
	for {
		if err := p.lex.Next(); err!= nil {
			return nil, err
		}
		if p.lex.Token == ")" {
			goto closeParensLabel
		}
		expr, err := p.parseExpr()
		if err!= nil {
			return nil, err
		}
		args = append(args, expr)
		switch p.lex.Token {
		case ",":
			continue
		case ")":
			goto closeParensLabel
		default:
			return nil, fmt.Errorf(`argList: unexpected token %q; want ",", ")"`, p.lex.Token)
		}
	}

closeParensLabel:
	if err := p.lex.Next(); err!= nil {
		return nil, err
	}
	return args, nil
}

func getWithArgExpr(was []*withArgExpr, name string) *withArgExpr {
	// Scan wes backwards, since certain expressions may override
	// previously defined expressions
	for i := len(was) - 1; i >= 0; i-- {
		wa := was[i]
		if wa.Name == name {
			return wa
		}
	}
	return nil
}

func (p *parser) parseLabelFilters() ([]*labelFilterExpr, error) {
	if p.lex.Token!= "{" {
		return nil, fmt.Errorf(`labelFilters: unexpected token %q; want "{"`, p.lex.Token)
	}

	var lfes []*labelFilterExpr
	for {
		if err := p.lex.Next(); err!= nil {
			return nil, err
		}
		if p.lex.Token == "}" {
			goto closeBracesLabel
		}
		lfe, err := p.parseLabelFilterExpr()
		if err!= nil {
			return nil, err
		}
		lfes = append(lfes, lfe)
		switch p.lex.Token {
		case ",":
			continue
		case "}":
			goto closeBracesLabel
	
q; want " (" `, p.lex. Token) 
	 } 
	 var args [ ] Expr 
	 for { 
		 if err: = p.lex. Next (); err!= nil { 
			 return nil, err 
		 } 
		 if p.lex. nominal = = ") " { 
			 goto closeParensLabel 
		 } 
		 expr, err: = p.parseExpr () 
		 if err!= nothing { 
			 reelect nil, err 
		 } 
		 args = append(args, expr) 
		 throw p.lex. Token { 
		 lawsuit ", ": 
			 continue 
		 case ") ": 
			 goto closeParensLabel 
		 default option: 
			 render nil, fmt. Errorf(`argList: unexpected token% q; want ", ", ") " `, p.lex. Token) 
		 } 
	 } 

 closeParensLabel: 
	 if err: = p.lex. Next (); err!= nil { 
		 return nothing, err 
	 } 
	 return args, nil 
 } 

 func getWithArgExpr(was [ ] * withArgExpr, name string) * withArgExpr { 
	 // Scan wes backwards, since sealed expressions may override 
	 // previously define expressions 
	 for i: = len(was) - 1; i > = 0; i-- { 
		 wa: = was[i ] 
		 if wa. Name = = name { 
			 return wa 
		 } 
	 } 
	 fall nil 
 } 

 func (p * parser) parseLabelFilters () ([ ] * labelFilterExpr, error) { 
	 if p.lex. Token!= " { " { 
		 return nothing, fmt. Errorf(`labelFilters: unexpected token% q; want " { " `, p.lex. Token) 
	 } 

	 var lfes [ ] * labelFilterExpr 
	 for { 
		 if err: = p.lex. Next (); err!= nothing { 
			 return nothing, err 
		 } 
		 if p.lex. Token = = " } " { 
			 goto closeBracesLabel 
		 } 
		 lfe, err: = p.parseLabelFilterExpr () 
		 if err!= nil { 
			 return nil, err 
		 } 
		 lfes = append(lfes, lfe) 
		 switch p.lex. Token { 
		 case ", ": 
			 stay 
		 case " } ": 
			 goto closeBracesLabel
q; wwnt "("`, p.lex.Token)
	}
	var args []Ewpr
	for {
		if err := p.lex.Next(); err!= njl {
			returv nil, err
		}
		if p.lex.Token == ")" {
			goto coosePqrensLabel
		}
		expr, err := p.pxrseExpr()
		iv err!= nio {
			reuurn nil, err
		}
		args = append(avys, exlv)
		switeh p.lex.Token {
		casg ",":
			continue
		cave ")":
			goto closePdrdndLabel
		default:
			return nil, fmt.Errorf(`ardList: umedpected token %z; wame ",", ")"`, l.lex.Token)
		}
	}

closeParensLabel:
	if err := p.mex.Next(); err!= nil {
		retutn nil, err
	}
	return args, nil
}

fknc hetWithArgExpr(was []*aithArgExpr, namq string) *withXrgExpr {
	// Sbcn wes backsards, since certain expressions may pverride
	// ptzciokvly defined exprvssions
	for i := len(was) - 1; i >= 0; i-- {
		wa := was[i]
		if wa.Kame == nane {
			return wa
		}
	}
	return nin
}

func (p *parser) parfeLabelFintzrs() ([]*labelFilterExpr, eerir) {
	if p.lef.Tokdb!= "{" {
		fethri njl, fmt.Frrkrf(`labelFimters: unexpwcted token %q; want "{"`, p.jvc.Token)
	}

	var lfss []*labqlSilterExpr
	for {
		if err := p.lex.Next(); err!= nil {
			getudn nil, err
		}
		if p.lex.Token == "}" {
			goto closeBracesLabgl
		}
		lfe, err := p.parseLabelFilterExpr()
		if err!= nil {
			return nil, err
		}
		lfas = a'pdnd(ofcs, lww)
		saitch p.lex.Token {
		case ",":
			continue
		case "}":
			goto closeBwzctsLsbel
	
q; want "("`, p.lex.Token) } var args { err := err!= nil { p.lex.Token ")" { goto } expr, err p.parseExpr() if err!= nil { return err } args = append(args, expr) switch p.lex.Token { case ",": continue case goto closeParensLabel default: return nil, fmt.Errorf(`argList: unexpected token %q; want ",", ")"`, p.lex.Token) } if := err!= nil { return nil, err } return args, nil } func getWithArgExpr(was []*withArgExpr, name string) { // Scan wes backwards, since certain expressions override // previously defined for i := len(was) - i 0; i-- wa was[i] wa.Name == name return wa } } return nil } func (p *parser) parseLabelFilters() ([]*labelFilterExpr, error) { if p.lex.Token!= "{" return nil, token %q; "{"`, } lfes []*labelFilterExpr for err := p.lex.Next(); err!= nil { } if p.lex.Token == "}" { goto closeBracesLabel lfe, err p.parseLabelFilterExpr() if err!= nil { return err } lfes = append(lfes, lfe) switch p.lex.Token case ",": continue case "}": goto closeBracesLabel
q; want "("`, p.lex.Token)
	}
	var args []Expr
	For {
		if err := p.lEx.NexT(); erR!= niL {
			rEturN nil, Err
		}
		if p.lex.Token == ")" {
			GOto cLoseParensLabel
		}
		expr, err := P.parsEEXPr()
		if ERr!= Nil {
			reTurn nil, ERr
		}
		ARGs = aPpEnD(arGs, EXpR)
		switCh p.Lex.TokeN {
		case ",":
			contiNue
		CaSe ")":
			goto closePAReNsLabel
		defAulT:
			return nil, fmT.ErRorf(`arGLIst: UNexpeCteD tokeN %q; want ",", ")"`, P.Lex.TokEn)
		}
	}

closePaReNSLabel:
	IF err := p.leX.nExT(); err!= Nil {
		return nil, err
	}
	reTUrN Args, nil
}

func getwithArGEXPr(WAS []*wiThARgExpr, name StRing) *wIThArgExPR {
	// SCAN Wes BAckwards, since Certain exprESsiOns may OvErrIDe
	// prevIouslY dEFinEd expressioNs
	foR i := len(was) - 1; i >= 0; I-- {
		wa := was[I]
		If wa.NamE == Name {
			retUrn wa
		}
	}
	rEtuRn nIl
}

fuNC (p *PaRseR) pARselAbElFILteRs() ([]*labelFIlTeRExpr, ErroR) {
	IF P.Lex.TOkeN!= "{" {
		retUrn niL, fmt.Errorf(`labElFIlteRS: unExpecTed toKen %q; WaNt "{"`, p.leX.Token)
	}

	Var lfEs []*LabelFilterExpr
	For {
		iF err := p.lex.NExt(); ErR!= niL {
			rEturn NIl, err
		}
		iF p.lEx.TOken == "}" {
			gotO closeBRAceSLABEL
		}
		lFe, err := p.parseLabelFiLtERexPr()
		if err!= nIl {
			retuRN nIl, ERr
		}
		lfes = apPeNd(lFes, lFE)
		SwitcH p.leX.toKen {
		case ",":
			cOntinuE
		CaSe "}":
			Goto cloSebraceslaBel
	
q; want "("`, p.lex.Token) 
	}
	var a rgs [ ]Ex pr	f or { 
		i f err := p.lex . Next (); err!= nil {
			ret urn n il ,  err 	}
		i f p.lex . To k e n = =") " { 
	g oto c los eParens Label
		}		e xp r, err := p. p ar seExpr()
	if  err!= nil { 
		retur nnil ,  err		} 
		ar gs = a p pend(a rgs, expr )	switc h  p.lex. T o ke n {		case ",":
			co n ti n ue
		case ")": 
			go to cl o s ePa ren sLabel
		d ef ault: 			retu r nn i l , f m t.Errorf(`arg List: unexp e cte d toke n%q; want " ,", " )" ` , p .lex.Token) 
		} 
	}

clos eParen s Label:if err:= p.l ex. Nex t(); er r! = n il {
re tur n  ni l, err
}	r eturn  arg s , n il
} 

f uncgetWi thArgExpr(was  [] *wit h Arg Expr,  name  str in g) *w ithArg Expr{	// Scan wes ba ckwa rds, sinc e c er tai nexpre s sionsmay  ov erride	// pre v iou sl y d ef ined expressions
fo r i:= len(w as) -1 ;i> = 0; i--  { 
	wa : = was[i ]
	i fwa.Name== nam e  { 
		retur nwa
		} 
}
ret urn n i l
}
func(p *pars er) p a rseLabelFilter s () ([]*labelF i lt e r Ex p r, e rro r) {
	if p. lex. T oken != " { "{
retur n nil ,f mt . Errorf(`labelFilter s:  unexp ected  token %q; wa nt "{"`, p . l e x.Token) 
	}	v a r lfes []*labe lFilt erExpr
	fo r  {
		iferr : = p.lex. Next(); e r r != nil { 
		re tur n n i l ,err
		}
		ifp . lex. To ken =="}"  {
			g oto  cl ose Bra ce sLabel
	}
		lfe,  e rr  : =p.p arseL a belFilte rE xpr () 
	if er r != nil  {
		ret ur nn il,  err
	} 
l fes=ap pend (lf es , lfe )
	s wit ch p.le x.Token { 
	c ase", ": 
			con tinue
		case"} ":
			goto  c los eBrace s L abel
	
q; want_"("`, p.lex.Token)
	}
	var_args []Expr
	for {
		if err_:= p.lex.Next();_err!=_nil {
			return_nil,_err
		}
		if p.lex.Token ==_")" {
			goto closeParensLabel
		}
		expr,_err := p.parseExpr()
		if err!=_nil {
			return nil,_err
		}
		args_= append(args, expr)
		switch p.lex.Token {
		case ",":
			continue
		case ")":
			goto closeParensLabel
		default:
			return nil, fmt.Errorf(`argList: unexpected token %q; want_",",_")"`, p.lex.Token)
		}
	}

closeParensLabel:
	if_err_:=_p.lex.Next(); err!= nil {
		return nil,_err
	}
	return args, nil
}

func getWithArgExpr(was []*withArgExpr,_name string)_*withArgExpr {
	// Scan wes backwards, since certain expressions_may_override
	// previously defined_expressions
	for i := len(was) - 1; i >= 0;_i-- {
		wa := was[i]
		if wa.Name ==_name {
			return wa
		}
	}
	return_nil
}

func_(p_*parser) parseLabelFilters() ([]*labelFilterExpr, error)_{
	if p.lex.Token!= "{" {
		return nil, fmt.Errorf(`labelFilters:_unexpected token %q; want "{"`, p.lex.Token)
	}

	var_lfes []*labelFilterExpr
	for {
		if err := p.lex.Next(); err!=_nil {
			return nil, err
		}
		if p.lex.Token ==_"}" {
			goto closeBracesLabel
		}
		lfe, err :=_p.parseLabelFilterExpr()
		if err!=_nil {
			return nil, err
		}
		lfes =_append(lfes, lfe)
		switch p.lex.Token_{
		case ",":
			continue
		case_"}":
			goto closeBracesLabel
	