diff --git a/Makefile b/Makefile index 4b0e80a..db2c383 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ PHPFILE=example.php -all: ./parser/php7.go ./parser/scanner.go +all: ./php5/php5.go ./php7/php7.go ./scanner/scanner.go rm -f y.output gofmt -l -s -w *.go go build @@ -11,8 +11,11 @@ run: all test: all go test ./... --cover -./parser/scanner.go: ./parser/scanner.l +./scanner/scanner.go: ./scanner/scanner.l golex -o $@ $< -./parser/php7.go: ./parser/php7.y +./php5/php5.go: ./php5/php5.y + goyacc -o $@ $< + +./php7/php7.go: ./php7/php7.y goyacc -o $@ $< diff --git a/README.md b/README.md index b86c891..9bb31ef 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ A Parser for PHP written in Go inspired by [Nikic PHP Parser](https://github.com/nikic/PHP-Parser) ## Features: -- Fully support PHP7 syntax (PHP5 in progress) +- Fully support PHP5 and PHP7 syntax - Abstract syntax tree representation - Traversing AST @@ -25,18 +25,21 @@ package main import ( "bytes" - "github.com/z7zmey/php-parser/parser" + "github.com/z7zmey/php-parser/php5" "github.com/z7zmey/php-parser/visitor" ) func main() { src := bytes.NewBufferString(` %s\n", path) src, _ := os.Open(string(path)) - nodes, comments, positions := parser.ParsePhp7(src, path) + nodes, comments, positions := php5.Parse(src, path) - visitor := Dumper{ + visitor := visitor.Dumper{ Indent: " | ", Comments: comments, Positions: positions, diff --git a/node/argument.go b/node/argument.go index 3f2c076..5f2fca5 100644 --- a/node/argument.go +++ b/node/argument.go @@ -4,14 +4,16 @@ import "github.com/z7zmey/php-parser/walker" // Argument node type Argument struct { - Variadic bool // if ... before variable - Expr Node // Exression + Variadic bool // if ... before variable + IsReference bool // if & before variable + Expr Node // Exression } // NewArgument node constuctor -func NewArgument(Expression Node, Variadic bool) *Argument { +func NewArgument(Expression Node, Variadic bool, IsReference bool) *Argument { return &Argument{ Variadic, + IsReference, Expression, } } @@ -19,7 +21,8 @@ func NewArgument(Expression Node, Variadic bool) *Argument { // Attributes returns node attributes as map func (n *Argument) Attributes() map[string]interface{} { return map[string]interface{}{ - "Variadic": n.Variadic, + "Variadic": n.Variadic, + "IsReference": n.IsReference, } } diff --git a/node/expr/variable.go b/node/expr/variable.go index 3fdcc4a..a440c7a 100644 --- a/node/expr/variable.go +++ b/node/expr/variable.go @@ -22,6 +22,11 @@ func (n *Variable) Attributes() map[string]interface{} { return nil } +// SetVarName reset var name +func (n *Variable) SetVarName(VarName node.Node) { + n.VarName = VarName +} + // Walk traverses nodes // Walk is invoked recursively until v.EnterNode returns true func (n *Variable) Walk(v walker.Visitor) { diff --git a/node/name/name_test.go b/node/name/name_test.go index 918103b..b76fb1b 100644 --- a/node/name/name_test.go +++ b/node/name/name_test.go @@ -12,7 +12,7 @@ import ( "github.com/kylelemons/godebug/pretty" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node/stmt" - "github.com/z7zmey/php-parser/parser" + "github.com/z7zmey/php-parser/php7" ) func assertEqual(t *testing.T, expected interface{}, actual interface{}) { @@ -44,7 +44,7 @@ func TestName(t *testing.T) { }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") assertEqual(t, expected, actual) } @@ -65,7 +65,7 @@ func TestFullyQualified(t *testing.T) { }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") assertEqual(t, expected, actual) } @@ -86,7 +86,7 @@ func TestRelative(t *testing.T) { }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") assertEqual(t, expected, actual) } diff --git a/node/node_test.go b/node/node_test.go index 5733db5..c992956 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -12,7 +12,7 @@ import ( "github.com/kylelemons/godebug/pretty" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node/stmt" - "github.com/z7zmey/php-parser/parser" + "github.com/z7zmey/php-parser/php7" ) func assertEqual(t *testing.T, expected interface{}, actual interface{}) { @@ -41,7 +41,7 @@ func TestIdentifier(t *testing.T) { }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") assertEqual(t, expected, actual) } @@ -132,7 +132,7 @@ func TestArgumentNode(t *testing.T) { }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") assertEqual(t, expected, actual) } @@ -198,7 +198,7 @@ func TestParameterNode(t *testing.T) { }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") assertEqual(t, expected, actual) } diff --git a/node/scalar/encapsed_test.go b/node/scalar/encapsed_test.go index 5b38718..19ceac7 100644 --- a/node/scalar/encapsed_test.go +++ b/node/scalar/encapsed_test.go @@ -10,7 +10,7 @@ import ( "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node/scalar" "github.com/z7zmey/php-parser/node/stmt" - "github.com/z7zmey/php-parser/parser" + "github.com/z7zmey/php-parser/php7" ) func TestSimpleVar(t *testing.T) { @@ -29,7 +29,7 @@ func TestSimpleVar(t *testing.T) { }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") if diff := pretty.Compare(expected, actual); diff != "" { t.Errorf("diff: (-expected +actual)\n%s", diff) @@ -56,7 +56,7 @@ func TestSimpleVarPropertyFetch(t *testing.T) { }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") if diff := pretty.Compare(expected, actual); diff != "" { t.Errorf("diff: (-expected +actual)\n%s", diff) @@ -79,7 +79,7 @@ func TestDollarOpenCurlyBraces(t *testing.T) { }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") if diff := pretty.Compare(expected, actual); diff != "" { t.Errorf("diff: (-expected +actual)\n%s", diff) @@ -105,7 +105,7 @@ func TestDollarOpenCurlyBracesDimNumber(t *testing.T) { }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") if diff := pretty.Compare(expected, actual); diff != "" { t.Errorf("diff: (-expected +actual)\n%s", diff) @@ -131,7 +131,7 @@ func TestCurlyOpenMethodCall(t *testing.T) { }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") if diff := pretty.Compare(expected, actual); diff != "" { t.Errorf("diff: (-expected +actual)\n%s", diff) diff --git a/node/scalar/magic_constant_test.go b/node/scalar/magic_constant_test.go index f466e32..e6b9b82 100644 --- a/node/scalar/magic_constant_test.go +++ b/node/scalar/magic_constant_test.go @@ -8,7 +8,7 @@ import ( "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node/scalar" "github.com/z7zmey/php-parser/node/stmt" - "github.com/z7zmey/php-parser/parser" + "github.com/z7zmey/php-parser/php7" ) func TestMagicConstant(t *testing.T) { @@ -22,7 +22,7 @@ func TestMagicConstant(t *testing.T) { }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") if diff := pretty.Compare(expected, actual); diff != "" { t.Errorf("diff: (-expected +actual)\n%s", diff) diff --git a/node/scalar/numbers_test.go b/node/scalar/numbers_test.go index e74e41e..27b0cb7 100644 --- a/node/scalar/numbers_test.go +++ b/node/scalar/numbers_test.go @@ -9,7 +9,7 @@ import ( "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node/scalar" "github.com/z7zmey/php-parser/node/stmt" - "github.com/z7zmey/php-parser/parser" + "github.com/z7zmey/php-parser/php7" ) func assertEqual(t *testing.T, expected interface{}, actual interface{}) { @@ -36,7 +36,7 @@ func TestLNumber(t *testing.T) { }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") assertEqual(t, expected, actual) } @@ -52,7 +52,7 @@ func TestDNumber(t *testing.T) { }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") assertEqual(t, expected, actual) } @@ -68,7 +68,7 @@ func TestFloat(t *testing.T) { }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") assertEqual(t, expected, actual) } @@ -84,7 +84,7 @@ func TestBinaryLNumber(t *testing.T) { }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") assertEqual(t, expected, actual) } @@ -100,7 +100,7 @@ func TestBinaryDNumber(t *testing.T) { }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") assertEqual(t, expected, actual) } @@ -116,7 +116,7 @@ func TestHLNumber(t *testing.T) { }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") assertEqual(t, expected, actual) } @@ -132,7 +132,7 @@ func TestHDNumber(t *testing.T) { }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") assertEqual(t, expected, actual) } diff --git a/node/scalar/string_test.go b/node/scalar/string_test.go index 0470a8a..42a3449 100644 --- a/node/scalar/string_test.go +++ b/node/scalar/string_test.go @@ -8,7 +8,7 @@ import ( "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node/scalar" "github.com/z7zmey/php-parser/node/stmt" - "github.com/z7zmey/php-parser/parser" + "github.com/z7zmey/php-parser/php7" ) func TestDoubleQuotedScalarString(t *testing.T) { @@ -22,7 +22,7 @@ func TestDoubleQuotedScalarString(t *testing.T) { }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") if diff := pretty.Compare(expected, actual); diff != "" { t.Errorf("diff: (-expected +actual)\n%s", diff) @@ -39,7 +39,7 @@ func TestDoubleQuotedScalarStringWithEscapedVar(t *testing.T) { }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") if diff := pretty.Compare(expected, actual); diff != "" { t.Errorf("diff: (-expected +actual)\n%s", diff) @@ -59,7 +59,7 @@ func TestMultilineDoubleQuotedScalarString(t *testing.T) { }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") if diff := pretty.Compare(expected, actual); diff != "" { t.Errorf("diff: (-expected +actual)\n%s", diff) @@ -77,7 +77,7 @@ func TestSingleQuotedScalarString(t *testing.T) { }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") if diff := pretty.Compare(expected, actual); diff != "" { t.Errorf("diff: (-expected +actual)\n%s", diff) @@ -97,7 +97,7 @@ func TestMultilineSingleQuotedScalarString(t *testing.T) { }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") if diff := pretty.Compare(expected, actual); diff != "" { t.Errorf("diff: (-expected +actual)\n%s", diff) @@ -118,7 +118,7 @@ CAD; }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") if diff := pretty.Compare(expected, actual); diff != "" { t.Errorf("diff: (-expected +actual)\n%s", diff) @@ -139,7 +139,7 @@ CAD; }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") if diff := pretty.Compare(expected, actual); diff != "" { t.Errorf("diff: (-expected +actual)\n%s", diff) @@ -160,7 +160,7 @@ CAD; }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") if diff := pretty.Compare(expected, actual); diff != "" { t.Errorf("diff: (-expected +actual)\n%s", diff) diff --git a/node/stmt/alt_if.go b/node/stmt/alt_if.go index 3d6dd7c..86ab871 100644 --- a/node/stmt/alt_if.go +++ b/node/stmt/alt_if.go @@ -14,12 +14,12 @@ type AltIf struct { } // NewAltIf node constuctor -func NewAltIf(Cond node.Node, Stmt node.Node) *AltIf { +func NewAltIf(Cond node.Node, Stmt node.Node, ElseIf []node.Node, Else node.Node) *AltIf { return &AltIf{ Cond, Stmt, - nil, - nil, + ElseIf, + Else, } } diff --git a/node/stmt/alt_if_test.go b/node/stmt/alt_if_test.go index d494548..e967b95 100644 --- a/node/stmt/alt_if_test.go +++ b/node/stmt/alt_if_test.go @@ -10,7 +10,7 @@ import ( "github.com/kylelemons/godebug/pretty" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node/stmt" - "github.com/z7zmey/php-parser/parser" + "github.com/z7zmey/php-parser/php7" ) func assertEqual(t *testing.T, expected interface{}, actual interface{}) { @@ -41,7 +41,7 @@ func TestAltIf(t *testing.T) { }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") assertEqual(t, expected, actual) } @@ -68,7 +68,7 @@ func TestAltElseIf(t *testing.T) { }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") assertEqual(t, expected, actual) } @@ -92,7 +92,7 @@ func TestAltElse(t *testing.T) { }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") assertEqual(t, expected, actual) } @@ -128,7 +128,7 @@ func TestAltElseElseIf(t *testing.T) { }, } - actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php") + actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php") assertEqual(t, expected, actual) } diff --git a/node/stmt/if.go b/node/stmt/if.go index ac7fb5c..c0f3ca3 100644 --- a/node/stmt/if.go +++ b/node/stmt/if.go @@ -10,16 +10,16 @@ type If struct { Cond node.Node Stmt node.Node ElseIf []node.Node - _else node.Node + Else node.Node } // NewIf node constuctor -func NewIf(Cond node.Node, Stmt node.Node) *If { +func NewIf(Cond node.Node, Stmt node.Node, ElseIf []node.Node, Else node.Node) *If { return &If{ Cond, Stmt, - nil, - nil, + ElseIf, + Else, } } @@ -38,8 +38,8 @@ func (n *If) AddElseIf(ElseIf node.Node) node.Node { return n } -func (n *If) SetElse(_else node.Node) node.Node { - n._else = _else +func (n *If) SetElse(Else node.Node) node.Node { + n.Else = Else return n } @@ -70,9 +70,9 @@ func (n *If) Walk(v walker.Visitor) { } } - if n._else != nil { + if n.Else != nil { vv := v.GetChildrenVisitor("else") - n._else.Walk(vv) + n.Else.Walk(vv) } v.LeaveNode(n) diff --git a/node/visitor_test.go b/node/visitor_test.go index b7f38a7..a8c3ac4 100644 --- a/node/visitor_test.go +++ b/node/visitor_test.go @@ -31,7 +31,7 @@ var nodesToTest = []struct { { &node.Argument{Variadic: true, Expr: &expr.Variable{VarName: &node.Identifier{Value: "foo"}}}, []string{"Expr"}, - map[string]interface{}{"Variadic": true}, + map[string]interface{}{"IsReference": false, "Variadic": true}, }, { &node.Parameter{ diff --git a/parser/lexer.go b/parser/lexer.go deleted file mode 100644 index 5024a24..0000000 --- a/parser/lexer.go +++ /dev/null @@ -1,119 +0,0 @@ -package parser - -import ( - "bufio" - "bytes" - "go/token" - "io" - "unicode" - - "github.com/cznic/golex/lex" - "github.com/z7zmey/php-parser/comment" - t "github.com/z7zmey/php-parser/token" -) - -// Allocate Character classes anywhere in [0x80, 0xFF]. -const ( - classUnicodeLeter = iota + 0x80 - classUnicodeDigit - classUnicodeGraphic - classOther -) - -type lexer struct { - *lex.Lexer - stateStack []int - phpDocComment string - comments []comment.Comment -} - -func rune2Class(r rune) int { - if r >= 0 && r < 0x80 { // Keep ASCII as it is. - return int(r) - } - if unicode.IsLetter(r) { - return classUnicodeLeter - } - if unicode.IsDigit(r) { - return classUnicodeDigit - } - if unicode.IsGraphic(r) { - return classUnicodeGraphic - } - // return classOther - return -1 -} - -func newLexer(src io.Reader, fName string) *lexer { - file := token.NewFileSet().AddFile(fName, -1, 1<<31-1) - lx, err := lex.New(file, bufio.NewReader(src), lex.RuneClass(rune2Class)) - if err != nil { - panic(err) - } - return &lexer{lx, []int{0}, "", nil} -} - -func (l *lexer) ungetChars(n int) []lex.Char { - l.Unget(l.Lookahead()) - - chars := l.Token() - - for i := 1; i <= n; i++ { - char := chars[len(chars)-i] - l.Unget(char) - } - - buf := l.Token() - buf = buf[:len(buf)-n] - - return buf -} - -func (l *lexer) pushState(state int) { - l.stateStack = append(l.stateStack, state) -} - -func (l *lexer) popState() { - len := len(l.stateStack) - if len <= 1 { - return - } - - l.stateStack = l.stateStack[:len-1] -} - -func (l *lexer) begin(state int) { - len := len(l.stateStack) - l.stateStack = l.stateStack[:len-1] - l.stateStack = append(l.stateStack, state) -} - -func (l *lexer) getCurrentState() int { - return l.stateStack[len(l.stateStack)-1] -} - -func (l *lexer) newToken(chars []lex.Char) t.Token { - firstChar := chars[0] - lastChar := chars[len(chars)-1] - - startLine := l.File.Line(firstChar.Pos()) - endLine := l.File.Line(lastChar.Pos()) - startPos := int(firstChar.Pos()) - endPos := int(lastChar.Pos()) - - return t.NewToken(l.charsToBytes(chars), startLine, endLine, startPos, endPos).SetComments(l.comments) -} - -func (l *lexer) addComment(c comment.Comment) { - l.comments = append(l.comments, c) -} - -func (l *lexer) charsToBytes(chars []lex.Char) []byte { - bytesBuf := bytes.Buffer{} - - for _, c := range chars { - bytesBuf.WriteRune(c.Rune) - } - - return bytesBuf.Bytes() -} diff --git a/parser/scanner.l b/parser/scanner.l deleted file mode 100644 index 632eb2a..0000000 --- a/parser/scanner.l +++ /dev/null @@ -1,609 +0,0 @@ -%{ -// Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// blame: jnml, labs.nic.cz - -package parser - -import ( - "fmt" - "bytes" - "github.com/cznic/golex/lex" - "github.com/z7zmey/php-parser/comment" -) - -const ( - INITIAL = iota - PHP - STRING - STRING_VAR - STRING_VAR_INDEX - STRING_VAR_NAME - PROPERTY - HEREDOC_END - NOWDOC - HEREDOC - BACKQUOTE -) - -var heredocLabel []lex.Char - -func (l *lexer) Lex(lval *yySymType) int { - l.comments = nil - c := l.Enter() - -%} - -%s PHP STRING STRING_VAR STRING_VAR_INDEX STRING_VAR_NAME PROPERTY HEREDOC_END NOWDOC HEREDOC BACKQUOTE - -%yyb last == '\n' || last = '\0' -%yyt l.getCurrentState() -%yyc c -%yyn c = l.Next() -%yym l.Mark() -%optioncase-insensitive - -LNUM [0-9]+ -DNUM ([0-9]*"."[0-9]+)|([0-9]+"."[0-9]*) -HNUM 0x[0-9a-fA-F]+ -BNUM 0b[01]+ -EXPONENT_DNUM (({LNUM}|{DNUM})[eE][+-]?{LNUM}) -VAR_NAME [a-zA-Z_\x7f-\xff^0-9/][a-zA-Z0-9_\x7f-\xff]* -OPERATORS [;:,.\[\]()|\/\^&\+-*=%!~$<>?@] -NEW_LINE (\r|\n|\r\n) - -%% - c = l.Rule0() - -[ \t\n\r]+ lval.token = l.newToken(l.Token()); -. - tb := []lex.Char{} - - for { - if c == -1 { - tb = l.Token(); - break; - } - - if '?' == rune(c) { - tb = l.Token(); - if (len(tb) < 2 || tb[len(tb)-1].Rune != '<') { - c = l.Next() - continue; - } - - tb = l.ungetChars(1) - break; - } - - c = l.Next() - } - - lval.token = l.newToken(tb) - return T_INLINE_HTML - -\<\?php([ \t]|{NEW_LINE}) l.begin(PHP);lval.token = l.newToken(l.Token());// return T_OPEN_TAG; -\<\? l.begin(PHP);lval.token = l.newToken(l.Token());// return T_OPEN_TAG; -\<\?= l.begin(PHP);lval.token = l.newToken(l.Token()); return T_ECHO; - -[ \t\n\r]+ lval.token = l.newToken(l.Token());// return T_WHITESPACE -\?\>{NEW_LINE}? l.begin(INITIAL);lval.token = l.newToken(l.Token()); return rune2Class(';'); - -{DNUM}|{EXPONENT_DNUM} lval.token = l.newToken(l.Token()); return T_DNUMBER -{BNUM} - tb := l.Token() - i:=2 - BNUMFOR:for { - if i > len(tb)-1 { - break BNUMFOR; - } - switch tb[i].Rune { - case '0': i++; - default: break BNUMFOR; - } - } - if len(tb) - i < 64 { - lval.token = l.newToken(l.Token()); return T_LNUMBER - } else { - lval.token = l.newToken(l.Token()); return T_DNUMBER - } -{LNUM} - if len(l.Token()) < 20 { - lval.token = l.newToken(l.Token()); return T_LNUMBER - } else { - lval.token = l.newToken(l.Token()); return T_DNUMBER - } -{HNUM} - tb := l.Token() - i:=2 - HNUMFOR:for { - if i > len(tb)-1 { - break HNUMFOR; - } - switch tb[i].Rune { - case '0': i++; - default: break HNUMFOR; - } - } - length := len(tb) - i - if length < 16 || (length == 16 && tb[i].Rune <= '7') { - lval.token = l.newToken(l.Token()); return T_LNUMBER - } else { - lval.token = l.newToken(l.Token()); return T_DNUMBER - } - -abstract lval.token = l.newToken(l.Token()); return T_ABSTRACT -array lval.token = l.newToken(l.Token()); return T_ARRAY -as lval.token = l.newToken(l.Token()); return T_AS -break lval.token = l.newToken(l.Token()); return T_BREAK -callable lval.token = l.newToken(l.Token()); return T_CALLABLE -case lval.token = l.newToken(l.Token()); return T_CASE -catch lval.token = l.newToken(l.Token()); return T_CATCH -class lval.token = l.newToken(l.Token()); return T_CLASS -clone lval.token = l.newToken(l.Token()); return T_CLONE -const lval.token = l.newToken(l.Token()); return T_CONST; -continue lval.token = l.newToken(l.Token()); return T_CONTINUE; -declare lval.token = l.newToken(l.Token()); return T_DECLARE; -default lval.token = l.newToken(l.Token()); return T_DEFAULT; -do lval.token = l.newToken(l.Token()); return T_DO; -echo lval.token = l.newToken(l.Token()); return T_ECHO; -else lval.token = l.newToken(l.Token()); return T_ELSE; -elseif lval.token = l.newToken(l.Token()); return T_ELSEIF; -empty lval.token = l.newToken(l.Token()); return T_EMPTY; -enddeclare lval.token = l.newToken(l.Token()); return T_ENDDECLARE -endfor lval.token = l.newToken(l.Token()); return T_ENDFOR -endforeach lval.token = l.newToken(l.Token()); return T_ENDFOREACH -endif lval.token = l.newToken(l.Token()); return T_ENDIF -endswitch lval.token = l.newToken(l.Token()); return T_ENDSWITCH -endwhile lval.token = l.newToken(l.Token()); return T_ENDWHILE -eval lval.token = l.newToken(l.Token()); return T_EVAL -exit|die lval.token = l.newToken(l.Token()); return T_EXIT -extends lval.token = l.newToken(l.Token()); return T_EXTENDS -final lval.token = l.newToken(l.Token()); return T_FINAL -finally lval.token = l.newToken(l.Token()); return T_FINALLY -for lval.token = l.newToken(l.Token()); return T_FOR -foreach lval.token = l.newToken(l.Token()); return T_FOREACH -function|cfunction lval.token = l.newToken(l.Token()); return T_FUNCTION -global lval.token = l.newToken(l.Token()); return T_GLOBAL -goto lval.token = l.newToken(l.Token()); return T_GOTO -if lval.token = l.newToken(l.Token()); return T_IF -isset lval.token = l.newToken(l.Token()); return T_ISSET -implements lval.token = l.newToken(l.Token()); return T_IMPLEMENTS -instanceof lval.token = l.newToken(l.Token()); return T_INSTANCEOF -insteadof lval.token = l.newToken(l.Token()); return T_INSTEADOF -interface lval.token = l.newToken(l.Token()); return T_INTERFACE -list lval.token = l.newToken(l.Token()); return T_LIST -namespace lval.token = l.newToken(l.Token()); return T_NAMESPACE -private lval.token = l.newToken(l.Token()); return T_PRIVATE -public lval.token = l.newToken(l.Token()); return T_PUBLIC -print lval.token = l.newToken(l.Token()); return T_PRINT -protected lval.token = l.newToken(l.Token()); return T_PROTECTED -return lval.token = l.newToken(l.Token()); return T_RETURN -static lval.token = l.newToken(l.Token()); return T_STATIC -switch lval.token = l.newToken(l.Token()); return T_SWITCH -throw lval.token = l.newToken(l.Token()); return T_THROW -trait lval.token = l.newToken(l.Token()); return T_TRAIT -try lval.token = l.newToken(l.Token()); return T_TRY -unset lval.token = l.newToken(l.Token()); return T_UNSET -use lval.token = l.newToken(l.Token()); return T_USE -var lval.token = l.newToken(l.Token()); return T_VAR -while lval.token = l.newToken(l.Token()); return T_WHILE -yield[ \t\n\r]+from[^a-zA-Z0-9_\x80-\xff] lval.token = l.newToken(l.Token()); return T_YIELD_FROM -yield lval.token = l.newToken(l.Token()); return T_YIELD -include lval.token = l.newToken(l.Token()); return T_INCLUDE -include_once lval.token = l.newToken(l.Token()); return T_INCLUDE_ONCE -require lval.token = l.newToken(l.Token()); return T_REQUIRE -require_once lval.token = l.newToken(l.Token()); return T_REQUIRE_ONCE -__CLASS__ lval.token = l.newToken(l.Token()); return T_CLASS_C -__DIR__ lval.token = l.newToken(l.Token()); return T_DIR -__FILE__ lval.token = l.newToken(l.Token()); return T_FILE -__FUNCTION__ lval.token = l.newToken(l.Token()); return T_FUNC_C -__LINE__ lval.token = l.newToken(l.Token()); return T_LINE -__NAMESPACE__ lval.token = l.newToken(l.Token()); return T_NS_C -__METHOD__ lval.token = l.newToken(l.Token()); return T_METHOD_C -__TRAIT__ lval.token = l.newToken(l.Token()); return T_TRAIT_C -__halt_compiler lval.token = l.newToken(l.Token()); return T_HALT_COMPILER -\([ \t]*array[ \t]*\) lval.token = l.newToken(l.Token()); return T_ARRAY_CAST -\([ \t]*(bool|boolean)[ \t]*\) lval.token = l.newToken(l.Token()); return T_BOOL_CAST -\([ \t]*(real|double|float)[ \t]*\) lval.token = l.newToken(l.Token()); return T_DOUBLE_CAST -\([ \t]*(int|integer)[ \t]*\) lval.token = l.newToken(l.Token()); return T_INT_CAST -\([ \t]*object[ \t]*\) lval.token = l.newToken(l.Token()); return T_OBJECT_CAST -\([ \t]*string[ \t]*\) lval.token = l.newToken(l.Token()); return T_STRING_CAST -\([ \t]*unset[ \t]*\) lval.token = l.newToken(l.Token()); return T_UNSET_CAST -new lval.token = l.newToken(l.Token()); return T_NEW -and lval.token = l.newToken(l.Token()); return T_LOGICAL_AND -or lval.token = l.newToken(l.Token()); return T_LOGICAL_OR -xor lval.token = l.newToken(l.Token()); return T_LOGICAL_XOR -\\ lval.token = l.newToken(l.Token()); return T_NS_SEPARATOR -\.\.\. lval.token = l.newToken(l.Token()); return T_ELLIPSIS; -:: lval.token = l.newToken(l.Token()); return T_PAAMAYIM_NEKUDOTAYIM; // T_DOUBLE_COLON -&& lval.token = l.newToken(l.Token()); return T_BOOLEAN_AND -\|\| lval.token = l.newToken(l.Token()); return T_BOOLEAN_OR -&= lval.token = l.newToken(l.Token()); return T_AND_EQUAL -\|= lval.token = l.newToken(l.Token()); return T_OR_EQUAL -\.= lval.token = l.newToken(l.Token()); return T_CONCAT_EQUAL; -\*= lval.token = l.newToken(l.Token()); return T_MUL_EQUAL -\*\*= lval.token = l.newToken(l.Token()); return T_POW_EQUAL -[/]= lval.token = l.newToken(l.Token()); return T_DIV_EQUAL; -\+= lval.token = l.newToken(l.Token()); return T_PLUS_EQUAL --= lval.token = l.newToken(l.Token()); return T_MINUS_EQUAL -\^= lval.token = l.newToken(l.Token()); return T_XOR_EQUAL -%= lval.token = l.newToken(l.Token()); return T_MOD_EQUAL --- lval.token = l.newToken(l.Token()); return T_DEC; -\+\+ lval.token = l.newToken(l.Token()); return T_INC -=> lval.token = l.newToken(l.Token()); return T_DOUBLE_ARROW; -\<=\> lval.token = l.newToken(l.Token()); return T_SPACESHIP -\!=|\<\> lval.token = l.newToken(l.Token()); return T_IS_NOT_EQUAL -\!== lval.token = l.newToken(l.Token()); return T_IS_NOT_IDENTICAL -== lval.token = l.newToken(l.Token()); return T_IS_EQUAL -=== lval.token = l.newToken(l.Token()); return T_IS_IDENTICAL -\<\<= lval.token = l.newToken(l.Token()); return T_SL_EQUAL -\>\>= lval.token = l.newToken(l.Token()); return T_SR_EQUAL -\>= lval.token = l.newToken(l.Token()); return T_IS_GREATER_OR_EQUAL -\<= lval.token = l.newToken(l.Token()); return T_IS_SMALLER_OR_EQUAL -\*\* lval.token = l.newToken(l.Token()); return T_POW -\<\< lval.token = l.newToken(l.Token()); return T_SL -\>\> lval.token = l.newToken(l.Token()); return T_SR -\?\? lval.token = l.newToken(l.Token()); return T_COALESCE -(#|[/][/]).*{NEW_LINE} lval.token = l.newToken(l.Token());// return T_COMMENT; // TODO: handle ?> -([/][*])|([/][*][*]) - tb := l.Token() - is_doc_comment := false - if len(tb) > 2 { - is_doc_comment = true - l.phpDocComment = "" - } - - for { - if c == -1 { - break; // TODO: Unterminated comment starting line %d - } - - p := c - c = l.Next() - - if rune(p) == '*' && rune(c) == '/' { - c = l.Next() - break; - } - } - - lval.token = l.newToken(l.Token()) - if is_doc_comment { - l.phpDocComment = string(l.TokenBytes(nil)) - l.addComment(comment.NewDocComment(string(l.TokenBytes(nil)))) - // return T_DOC_COMMENT - } else { - l.addComment(comment.NewPlainComment(string(l.TokenBytes(nil)))) - // return T_COMMENT - } - -{OPERATORS} lval.token = l.newToken(l.Token()); return rune2Class(rune(l.TokenBytes(nil)[0])) - -\{ l.pushState(PHP); lval.token = l.newToken(l.Token()); return rune2Class(rune(l.TokenBytes(nil)[0])) -\} l.popState(); lval.token = l.newToken(l.Token()); return rune2Class(rune(l.TokenBytes(nil)[0])); l.phpDocComment = "" -\${VAR_NAME} lval.token = l.newToken(l.Token()); return T_VARIABLE -{VAR_NAME} lval.token = l.newToken(l.Token()); return T_STRING - --> l.begin(PROPERTY);lval.token = l.newToken(l.Token()); return T_OBJECT_OPERATOR; -[ \t\n\r]+ lval.token = l.newToken(l.Token()); return T_WHITESPACE; --> lval.token = l.newToken(l.Token()); return T_OBJECT_OPERATOR; -{VAR_NAME} l.begin(PHP);lval.token = l.newToken(l.Token()); return T_STRING; -. l.ungetChars(1);l.begin(PHP) - -[\']([^\\\']*([\\].)*)*[\'] lval.token = l.newToken(l.Token()); return T_CONSTANT_ENCAPSED_STRING; - -` l.begin(BACKQUOTE); lval.token = l.newToken(l.Token()); return rune2Class(rune(l.TokenBytes(nil)[0])) -` l.begin(PHP); lval.token = l.newToken(l.Token()); return rune2Class(rune(l.TokenBytes(nil)[0])) - -[b]?\<\<\<[ \t]*({VAR_NAME}|([']{VAR_NAME}['])|(["]{VAR_NAME}["])){NEW_LINE} - tb := l.Token() - binPrefix := 0 - if tb[0].Rune == 'b' { - binPrefix = 1 - } - - lblFirst := 3 + binPrefix - lblLast := len(tb)-2 - if tb[lblLast].Rune == '\r' { - lblLast-- - } - - for { - if tb[lblFirst].Rune == ' ' || tb[lblFirst].Rune == '\t' { - lblFirst++ - continue - } - - break - } - - switch tb[lblFirst].Rune { - case '\'' : - lblFirst++ - lblLast-- - l.begin(NOWDOC) - case '"' : - lblFirst++ - lblLast-- - l.begin(HEREDOC) - default: - l.begin(HEREDOC) - } - - heredocLabel = make([]lex.Char, lblLast - lblFirst + 1) - copy(heredocLabel, tb[lblFirst:lblLast+1]) - - ungetCnt := len(heredocLabel) - searchLabelAhead := []lex.Char{} - for i := 0; i < len(heredocLabel); i++ { - if c == -1 { - break; - } - searchLabelAhead = append(searchLabelAhead, l.Lookahead()) - c = l.Next() - } - - if bytes.Equal(l.charsToBytes(heredocLabel), l.charsToBytes(searchLabelAhead)) && ';' == rune(c) { - ungetCnt++ - c = l.Next() - if '\n' == rune(c) || '\r' == rune(c) { - l.begin(HEREDOC_END) - } - } - - l.ungetChars(ungetCnt) - - lval.token = l.newToken(tb); - return T_START_HEREDOC - -.|[ \t\n\r] - searchLabel := []byte{} - tb := []lex.Char{} - - for { - if c == -1 { - break; - } - - if '\n' == rune(c) || '\r' == rune(c) { - if bytes.Equal(append(l.charsToBytes(heredocLabel), ';'), searchLabel) { - l.begin(HEREDOC_END) - tb = l.ungetChars(len(heredocLabel)+1) - break; - } - - if bytes.Equal(l.charsToBytes(heredocLabel), searchLabel) { - l.begin(HEREDOC_END) - tb = l.ungetChars(len(heredocLabel)) - break; - } - - searchLabel = []byte{} - } else { - searchLabel = append(searchLabel, byte(rune(c))) - } - - c = l.Next() - } - - lval.token = l.newToken(tb) - return T_ENCAPSED_AND_WHITESPACE - -{VAR_NAME}\; l.begin(PHP);lval.token = l.newToken(l.ungetChars(1)); return T_END_HEREDOC -{VAR_NAME} l.begin(PHP);lval.token = l.newToken(l.Token()); return T_END_HEREDOC - -[b]?[\"] - binPrefix := l.Token()[0].Rune == 'b' - - beginString := func() int { - cnt := 1; if (binPrefix) {cnt = 2} - - l.ungetChars(len(l.Token())-cnt) - chars := l.Token()[:cnt] - l.pushState(STRING) - - lval.token = l.newToken(chars); return rune2Class('"') - } - - F:for { - if c == -1 { - break; - } - - switch c { - case '"' : - c = l.Next(); - lval.token = l.newToken(l.Token()); return T_CONSTANT_ENCAPSED_STRING - break F; - - case '$': - c = l.Next(); - if rune(c) == '{' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z' || c >= '\u007f' && c <= 'ÿ' { - return beginString() - break F; - } - l.ungetChars(0) - - case '{': - c = l.Next(); - if rune(c) == '$' { - return beginString() - break F; - } - l.ungetChars(0) - - case '\\': - c = l.Next(); - } - - c = l.Next() - } - -\" l.popState(); lval.token = l.newToken(l.Token()); return rune2Class(l.Token()[0].Rune) -\{\$ lval.token = l.newToken(l.ungetChars(1)); l.pushState(PHP); return T_CURLY_OPEN -\$\{ l.pushState(STRING_VAR_NAME); lval.token = l.newToken(l.Token()); return T_DOLLAR_OPEN_CURLY_BRACES -\$ l.ungetChars(1);l.pushState(STRING_VAR) -.|[ \t\n\r] - F1:for { - if c == -1 { - break; - } - - switch c { - case '"' : - lval.token = l.newToken(l.Token()); - return T_ENCAPSED_AND_WHITESPACE - break F1; - - case '$': - c = l.Next(); - if rune(c) == '{' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z' || c >= '\u007f' && c <= 'ÿ' { - l.ungetChars(1) - tb := l.Token() - lval.token = l.newToken(tb[:len(tb)-1]); - return T_ENCAPSED_AND_WHITESPACE - break F1; - } - l.ungetChars(0) - - case '{': - c = l.Next(); - if rune(c) == '$' { - l.ungetChars(1) - tb := l.Token() - lval.token = l.newToken(tb[:len(tb)-1]); - return T_ENCAPSED_AND_WHITESPACE - break F1; - } - l.ungetChars(0) - - case '\\': - c = l.Next(); - } - - c = l.Next() - } - -.|[ \t\n\r] - F2:for { - if c == -1 { - break; - } - - switch c { - case '`' : - lval.token = l.newToken(l.Token()); - return T_ENCAPSED_AND_WHITESPACE - break F2; - - case '$': - c = l.Next(); - if rune(c) == '{' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z' || c >= '\u007f' && c <= 'ÿ' { - l.ungetChars(1) - tb := l.Token() - lval.token = l.newToken(tb[:len(tb)-1]); - return T_ENCAPSED_AND_WHITESPACE - break F2; - } - l.ungetChars(0) - - case '{': - c = l.Next(); - if rune(c) == '$' { - l.ungetChars(1) - tb := l.Token() - lval.token = l.newToken(tb[:len(tb)-1]); - return T_ENCAPSED_AND_WHITESPACE - break F2; - } - l.ungetChars(0) - - case '\\': - c = l.Next(); - } - - c = l.Next() - } - -.|[ \t\n\r] - searchLabel := []byte{} - tb := []lex.Char{} - - HEREDOCFOR:for { - if c == -1 { - break; - } - - switch c { - case '\n': fallthrough - case '\r': - if bytes.Equal(append(l.charsToBytes(heredocLabel), ';'), searchLabel) { - l.begin(HEREDOC_END) - tb = l.ungetChars(len(heredocLabel)+1) - break HEREDOCFOR; - } - - if bytes.Equal(l.charsToBytes(heredocLabel), searchLabel) { - l.begin(HEREDOC_END) - tb = l.ungetChars(len(heredocLabel)) - break HEREDOCFOR; - } - - searchLabel = []byte{} - - case '$': - c = l.Next(); - if rune(c) == '{' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z' || c >= '\u007f' && c <= 'ÿ' { - tb = l.ungetChars(1) - break HEREDOCFOR; - } - l.ungetChars(0) - searchLabel = []byte{} - - case '{': - c = l.Next(); - if rune(c) == '$' { - tb = l.ungetChars(1) - break HEREDOCFOR; - } - l.ungetChars(0) - searchLabel = []byte{} - - case '\\': - c = l.Next(); - searchLabel = []byte{} - - default: - searchLabel = append(searchLabel, byte(rune(c))) - } - - c = l.Next() - } - - lval.token = l.newToken(tb); - return T_ENCAPSED_AND_WHITESPACE - -\${VAR_NAME} lval.token = l.newToken(l.Token()); return T_VARIABLE -->{VAR_NAME} lval.token = l.newToken(l.ungetChars(len(l.Token())-2)); return T_OBJECT_OPERATOR -{VAR_NAME} l.popState();lval.token = l.newToken(l.Token()); return T_STRING -\[ l.pushState(STRING_VAR_INDEX);lval.token = l.newToken(l.Token()); return rune2Class(rune(l.TokenBytes(nil)[0])) -.|[ \t\n\r] l.ungetChars(1);l.popState() - -{LNUM}|{HNUM}|{BNUM} lval.token = l.newToken(l.Token()); return T_NUM_STRING -\${VAR_NAME} lval.token = l.newToken(l.Token()); return T_VARIABLE -{VAR_NAME} lval.token = l.newToken(l.Token()); return T_STRING -\] l.popState(); l.popState();lval.token = l.newToken(l.Token()); return rune2Class(rune(l.TokenBytes(nil)[0])) -[ \n\r\t\\'#] l.popState(); l.popState();lval.token = l.newToken(l.Token()); return T_ENCAPSED_AND_WHITESPACE -{OPERATORS} lval.token = l.newToken(l.Token()); return rune2Class(rune(l.TokenBytes(nil)[0])) -. lval.token = l.newToken(l.Token()); return rune2Class(rune(l.TokenBytes(nil)[0])) - -{VAR_NAME}[\[\}] l.popState();l.pushState(PHP);lval.token = l.newToken(l.ungetChars(1)); return T_STRING_VARNAME -. l.ungetChars(1);l.popState();l.pushState(PHP) - -%% - if c, ok := l.Abort(); ok { return int(c) } - goto yyAction -} \ No newline at end of file diff --git a/php5/lexer.go b/php5/lexer.go new file mode 100644 index 0000000..fa55a16 --- /dev/null +++ b/php5/lexer.go @@ -0,0 +1,41 @@ +package php5 + +import ( + "bufio" + goToken "go/token" + "io" + + "github.com/cznic/golex/lex" + + "github.com/z7zmey/php-parser/scanner" + "github.com/z7zmey/php-parser/token" +) + +type lexer struct { + scanner.Lexer +} + +func (l *lexer) Lex(lval *yySymType) int { + return l.Lexer.Lex(lval) +} + +func (lval *yySymType) Token(t token.Token) { + lval.token = t +} + +func newLexer(src io.Reader, fName string) *lexer { + file := goToken.NewFileSet().AddFile(fName, -1, 1<<31-1) + lx, err := lex.New(file, bufio.NewReader(src), lex.RuneClass(scanner.Rune2Class)) + if err != nil { + panic(err) + } + + return &lexer{ + scanner.Lexer{ + Lexer: lx, + StateStack: []int{0}, + PhpDocComment: "", + Comments: nil, + }, + } +} diff --git a/php5/parser.go b/php5/parser.go new file mode 100644 index 0000000..5627045 --- /dev/null +++ b/php5/parser.go @@ -0,0 +1,61 @@ +package php5 + +import ( + "io" + + "github.com/z7zmey/php-parser/node/expr" + + "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/node" + "github.com/z7zmey/php-parser/node/stmt" + "github.com/z7zmey/php-parser/position" + "github.com/z7zmey/php-parser/token" +) + +var rootnode node.Node +var comments comment.Comments +var positions position.Positions +var positionBuilder position.Builder + +var parentNode node.Node + +func Parse(src io.Reader, fName string) (node.Node, comment.Comments, position.Positions) { + yyDebug = 0 + yyErrorVerbose = true + rootnode = stmt.NewStmtList([]node.Node{}) //reset + comments = comment.Comments{} + positions = position.Positions{} + positionBuilder = position.Builder{&positions} + yyParse(newLexer(src, fName)) + return rootnode, comments, positions +} + +func ListGetFirstNodeComments(list []node.Node) []comment.Comment { + if len(list) == 0 { + return nil + } + + node := list[0] + + return comments[node] +} + +type foreachVariable struct { + node node.Node + byRef bool +} + +type nodesWithEndToken struct { + nodes []node.Node + endToken token.Token +} + +type boolWithToken struct { + value bool + token *token.Token +} + +type simpleIndirectReference struct { + all []*expr.Variable + last *expr.Variable +} diff --git a/php5/php5.go b/php5/php5.go new file mode 100644 index 0000000..d500eb4 --- /dev/null +++ b/php5/php5.go @@ -0,0 +1,6651 @@ +//line php5/php5.y:2 +package php5 + +import __yyfmt__ "fmt" + +//line php5/php5.y:2 +import ( + // "fmt" + "strconv" + "strings" + + "github.com/z7zmey/php-parser/node" + "github.com/z7zmey/php-parser/node/expr" + "github.com/z7zmey/php-parser/node/expr/assign_op" + "github.com/z7zmey/php-parser/node/expr/binary_op" + "github.com/z7zmey/php-parser/node/expr/cast" + "github.com/z7zmey/php-parser/node/name" + "github.com/z7zmey/php-parser/node/scalar" + "github.com/z7zmey/php-parser/node/stmt" + "github.com/z7zmey/php-parser/token" +) + +//line php5/php5.y:22 +type yySymType struct { + yys int + node node.Node + token token.Token + boolWithToken boolWithToken + list []node.Node + foreachVariable foreachVariable + nodesWithEndToken *nodesWithEndToken + simpleIndirectReference simpleIndirectReference + // str string +} + +const T_INCLUDE = 57346 +const T_INCLUDE_ONCE = 57347 +const T_EXIT = 57348 +const T_IF = 57349 +const T_LNUMBER = 57350 +const T_DNUMBER = 57351 +const T_STRING = 57352 +const T_STRING_VARNAME = 57353 +const T_VARIABLE = 57354 +const T_NUM_STRING = 57355 +const T_INLINE_HTML = 57356 +const T_CHARACTER = 57357 +const T_BAD_CHARACTER = 57358 +const T_ENCAPSED_AND_WHITESPACE = 57359 +const T_CONSTANT_ENCAPSED_STRING = 57360 +const T_ECHO = 57361 +const T_DO = 57362 +const T_WHILE = 57363 +const T_ENDWHILE = 57364 +const T_FOR = 57365 +const T_ENDFOR = 57366 +const T_FOREACH = 57367 +const T_ENDFOREACH = 57368 +const T_DECLARE = 57369 +const T_ENDDECLARE = 57370 +const T_AS = 57371 +const T_SWITCH = 57372 +const T_ENDSWITCH = 57373 +const T_CASE = 57374 +const T_DEFAULT = 57375 +const T_BREAK = 57376 +const T_CONTINUE = 57377 +const T_GOTO = 57378 +const T_FUNCTION = 57379 +const T_CONST = 57380 +const T_RETURN = 57381 +const T_TRY = 57382 +const T_CATCH = 57383 +const T_FINALLY = 57384 +const T_THROW = 57385 +const T_USE = 57386 +const T_INSTEADOF = 57387 +const T_GLOBAL = 57388 +const T_VAR = 57389 +const T_UNSET = 57390 +const T_ISSET = 57391 +const T_EMPTY = 57392 +const T_HALT_COMPILER = 57393 +const T_CLASS = 57394 +const T_TRAIT = 57395 +const T_INTERFACE = 57396 +const T_EXTENDS = 57397 +const T_IMPLEMENTS = 57398 +const T_OBJECT_OPERATOR = 57399 +const T_DOUBLE_ARROW = 57400 +const T_LIST = 57401 +const T_ARRAY = 57402 +const T_CALLABLE = 57403 +const T_CLASS_C = 57404 +const T_TRAIT_C = 57405 +const T_METHOD_C = 57406 +const T_FUNC_C = 57407 +const T_LINE = 57408 +const T_FILE = 57409 +const T_COMMENT = 57410 +const T_DOC_COMMENT = 57411 +const T_OPEN_TAG = 57412 +const T_OPEN_TAG_WITH_ECHO = 57413 +const T_CLOSE_TAG = 57414 +const T_WHITESPACE = 57415 +const T_START_HEREDOC = 57416 +const T_END_HEREDOC = 57417 +const T_DOLLAR_OPEN_CURLY_BRACES = 57418 +const T_CURLY_OPEN = 57419 +const T_PAAMAYIM_NEKUDOTAYIM = 57420 +const T_NAMESPACE = 57421 +const T_NS_C = 57422 +const T_DIR = 57423 +const T_NS_SEPARATOR = 57424 +const T_ELLIPSIS = 57425 +const T_EVAL = 57426 +const T_REQUIRE = 57427 +const T_REQUIRE_ONCE = 57428 +const T_LOGICAL_OR = 57429 +const T_LOGICAL_XOR = 57430 +const T_LOGICAL_AND = 57431 +const T_INSTANCEOF = 57432 +const T_NEW = 57433 +const T_CLONE = 57434 +const T_ELSEIF = 57435 +const T_ELSE = 57436 +const T_ENDIF = 57437 +const T_PRINT = 57438 +const T_YIELD = 57439 +const T_STATIC = 57440 +const T_ABSTRACT = 57441 +const T_FINAL = 57442 +const T_PRIVATE = 57443 +const T_PROTECTED = 57444 +const T_PUBLIC = 57445 +const T_INC = 57446 +const T_DEC = 57447 +const T_YIELD_FROM = 57448 +const T_INT_CAST = 57449 +const T_DOUBLE_CAST = 57450 +const T_STRING_CAST = 57451 +const T_ARRAY_CAST = 57452 +const T_OBJECT_CAST = 57453 +const T_BOOL_CAST = 57454 +const T_UNSET_CAST = 57455 +const T_COALESCE = 57456 +const T_SPACESHIP = 57457 +const T_NOELSE = 57458 +const T_PLUS_EQUAL = 57459 +const T_MINUS_EQUAL = 57460 +const T_MUL_EQUAL = 57461 +const T_DIV_EQUAL = 57462 +const T_CONCAT_EQUAL = 57463 +const T_MOD_EQUAL = 57464 +const T_AND_EQUAL = 57465 +const T_OR_EQUAL = 57466 +const T_XOR_EQUAL = 57467 +const T_SL_EQUAL = 57468 +const T_SR_EQUAL = 57469 +const T_POW_EQUAL = 57470 +const T_BOOLEAN_OR = 57471 +const T_BOOLEAN_AND = 57472 +const T_IS_EQUAL = 57473 +const T_IS_NOT_EQUAL = 57474 +const T_IS_IDENTICAL = 57475 +const T_IS_NOT_IDENTICAL = 57476 +const T_IS_SMALLER_OR_EQUAL = 57477 +const T_IS_GREATER_OR_EQUAL = 57478 +const T_SL = 57479 +const T_SR = 57480 +const T_POW = 57481 + +var yyToknames = [...]string{ + "$end", + "error", + "$unk", + "T_INCLUDE", + "T_INCLUDE_ONCE", + "T_EXIT", + "T_IF", + "T_LNUMBER", + "T_DNUMBER", + "T_STRING", + "T_STRING_VARNAME", + "T_VARIABLE", + "T_NUM_STRING", + "T_INLINE_HTML", + "T_CHARACTER", + "T_BAD_CHARACTER", + "T_ENCAPSED_AND_WHITESPACE", + "T_CONSTANT_ENCAPSED_STRING", + "T_ECHO", + "T_DO", + "T_WHILE", + "T_ENDWHILE", + "T_FOR", + "T_ENDFOR", + "T_FOREACH", + "T_ENDFOREACH", + "T_DECLARE", + "T_ENDDECLARE", + "T_AS", + "T_SWITCH", + "T_ENDSWITCH", + "T_CASE", + "T_DEFAULT", + "T_BREAK", + "T_CONTINUE", + "T_GOTO", + "T_FUNCTION", + "T_CONST", + "T_RETURN", + "T_TRY", + "T_CATCH", + "T_FINALLY", + "T_THROW", + "T_USE", + "T_INSTEADOF", + "T_GLOBAL", + "T_VAR", + "T_UNSET", + "T_ISSET", + "T_EMPTY", + "T_HALT_COMPILER", + "T_CLASS", + "T_TRAIT", + "T_INTERFACE", + "T_EXTENDS", + "T_IMPLEMENTS", + "T_OBJECT_OPERATOR", + "T_DOUBLE_ARROW", + "T_LIST", + "T_ARRAY", + "T_CALLABLE", + "T_CLASS_C", + "T_TRAIT_C", + "T_METHOD_C", + "T_FUNC_C", + "T_LINE", + "T_FILE", + "T_COMMENT", + "T_DOC_COMMENT", + "T_OPEN_TAG", + "T_OPEN_TAG_WITH_ECHO", + "T_CLOSE_TAG", + "T_WHITESPACE", + "T_START_HEREDOC", + "T_END_HEREDOC", + "T_DOLLAR_OPEN_CURLY_BRACES", + "T_CURLY_OPEN", + "T_PAAMAYIM_NEKUDOTAYIM", + "T_NAMESPACE", + "T_NS_C", + "T_DIR", + "T_NS_SEPARATOR", + "T_ELLIPSIS", + "T_EVAL", + "T_REQUIRE", + "T_REQUIRE_ONCE", + "T_LOGICAL_OR", + "T_LOGICAL_XOR", + "T_LOGICAL_AND", + "T_INSTANCEOF", + "T_NEW", + "T_CLONE", + "T_ELSEIF", + "T_ELSE", + "T_ENDIF", + "T_PRINT", + "T_YIELD", + "T_STATIC", + "T_ABSTRACT", + "T_FINAL", + "T_PRIVATE", + "T_PROTECTED", + "T_PUBLIC", + "T_INC", + "T_DEC", + "T_YIELD_FROM", + "T_INT_CAST", + "T_DOUBLE_CAST", + "T_STRING_CAST", + "T_ARRAY_CAST", + "T_OBJECT_CAST", + "T_BOOL_CAST", + "T_UNSET_CAST", + "T_COALESCE", + "T_SPACESHIP", + "T_NOELSE", + "'\"'", + "'`'", + "'{'", + "'}'", + "';'", + "':'", + "'('", + "')'", + "'['", + "']'", + "'?'", + "'&'", + "'-'", + "'+'", + "'!'", + "'~'", + "'@'", + "'$'", + "','", + "'='", + "T_PLUS_EQUAL", + "T_MINUS_EQUAL", + "T_MUL_EQUAL", + "T_DIV_EQUAL", + "T_CONCAT_EQUAL", + "T_MOD_EQUAL", + "T_AND_EQUAL", + "T_OR_EQUAL", + "T_XOR_EQUAL", + "T_SL_EQUAL", + "T_SR_EQUAL", + "T_POW_EQUAL", + "T_BOOLEAN_OR", + "T_BOOLEAN_AND", + "'|'", + "'^'", + "T_IS_EQUAL", + "T_IS_NOT_EQUAL", + "T_IS_IDENTICAL", + "T_IS_NOT_IDENTICAL", + "'<'", + "T_IS_SMALLER_OR_EQUAL", + "'>'", + "T_IS_GREATER_OR_EQUAL", + "T_SL", + "T_SR", + "'.'", + "'*'", + "'/'", + "'%'", + "T_POW", +} +var yyStatenames = [...]string{} + +const yyEofCode = 1 +const yyErrCode = 2 +const yyInitialStackSize = 16 + +//line php5/php5.y:3740 + +//line yacctab:1 +var yyExca = [...]int{ + -1, 1, + 1, -1, + -2, 0, + -1, 50, + 104, 433, + 105, 433, + -2, 431, + -1, 101, + 78, 330, + -2, 409, + -1, 113, + 78, 449, + 123, 445, + -2, 455, + -1, 153, + 104, 433, + 105, 433, + -2, 431, + -1, 203, + 121, 304, + 124, 304, + -2, 428, + -1, 204, + 104, 433, + 105, 433, + 121, 305, + 124, 305, + -2, 431, + -1, 270, + 78, 449, + -2, 455, + -1, 297, + 78, 332, + -2, 411, + -1, 301, + 123, 446, + -2, 456, + -1, 310, + 78, 331, + -2, 410, + -1, 376, + 153, 0, + 154, 0, + 155, 0, + 156, 0, + -2, 272, + -1, 377, + 153, 0, + 154, 0, + 155, 0, + 156, 0, + -2, 273, + -1, 378, + 153, 0, + 154, 0, + 155, 0, + 156, 0, + -2, 274, + -1, 379, + 153, 0, + 154, 0, + 155, 0, + 156, 0, + -2, 275, + -1, 380, + 157, 0, + 158, 0, + 159, 0, + 160, 0, + -2, 276, + -1, 381, + 157, 0, + 158, 0, + 159, 0, + 160, 0, + -2, 277, + -1, 382, + 157, 0, + 158, 0, + 159, 0, + 160, 0, + -2, 278, + -1, 383, + 157, 0, + 158, 0, + 159, 0, + 160, 0, + -2, 279, + -1, 390, + 104, 433, + 105, 433, + -2, 431, + -1, 398, + 124, 140, + -2, 145, + -1, 460, + 104, 433, + 105, 433, + 124, 512, + 135, 512, + -2, 431, + -1, 461, + 124, 513, + 135, 513, + -2, 428, + -1, 462, + 104, 433, + 105, 433, + -2, 431, + -1, 484, + 124, 154, + 135, 154, + -2, 428, + -1, 485, + 104, 433, + 105, 433, + 124, 155, + 135, 155, + -2, 431, + -1, 491, + 123, 470, + -2, 514, + -1, 497, + 123, 470, + -2, 515, + -1, 519, + 78, 330, + -2, 367, + -1, 549, + 124, 140, + -2, 145, + -1, 562, + 124, 140, + -2, 145, + -1, 579, + 121, 306, + 124, 306, + -2, 428, + -1, 580, + 104, 433, + 105, 433, + 121, 307, + 124, 307, + -2, 431, + -1, 679, + 78, 332, + -2, 369, + -1, 777, + 153, 0, + 154, 0, + 155, 0, + 156, 0, + -2, 395, + -1, 778, + 153, 0, + 154, 0, + 155, 0, + 156, 0, + -2, 396, + -1, 779, + 153, 0, + 154, 0, + 155, 0, + 156, 0, + -2, 397, + -1, 780, + 153, 0, + 154, 0, + 155, 0, + 156, 0, + -2, 398, + -1, 781, + 157, 0, + 158, 0, + 159, 0, + 160, 0, + -2, 399, + -1, 782, + 157, 0, + 158, 0, + 159, 0, + 160, 0, + -2, 400, + -1, 783, + 157, 0, + 158, 0, + 159, 0, + 160, 0, + -2, 401, + -1, 784, + 157, 0, + 158, 0, + 159, 0, + 160, 0, + -2, 402, + -1, 787, + 78, 331, + -2, 368, + -1, 837, + 37, 199, + -2, 196, + -1, 969, + 29, 187, + -2, 4, + -1, 978, + 124, 140, + -2, 145, + -1, 995, + 121, 191, + -2, 193, +} + +const yyPrivate = 57344 + +const yyLast = 8441 + +var yyAct = [...]int{ + + 101, 569, 1004, 963, 113, 199, 841, 712, 824, 122, + 130, 418, 338, 916, 563, 592, 604, 60, 450, 565, + 813, 805, 295, 732, 472, 681, 459, 590, 419, 141, + 577, 97, 38, 263, 388, 137, 139, 442, 542, 144, + 314, 114, 430, 157, 318, 445, 129, 178, 329, 117, + 328, 6, 483, 5, 475, 227, 227, 161, 2, 651, + 651, 976, 288, 653, 652, 191, 42, 651, 25, 939, + 905, 938, 957, 935, 651, 491, 951, 120, 653, 652, + 266, 191, 932, 929, 270, 937, 515, 952, 1000, 250, + 257, 673, 675, 674, 676, 661, 662, 663, 654, 656, + 657, 655, 655, 297, 930, 136, 654, 656, 657, 655, + 43, 269, 663, 654, 656, 657, 655, 492, 931, 301, + 819, 271, 895, 735, 327, 310, 707, 4, 315, 319, + 560, 240, 322, 651, 116, 152, 896, 653, 652, 125, + 304, 120, 178, 919, 140, 514, 356, 337, 851, 508, + 504, 448, 203, 120, 584, 177, 179, 180, 178, 584, + 227, 191, 324, 509, 505, 630, 38, 355, 733, 661, + 662, 663, 654, 656, 657, 655, 631, 791, 161, 664, + 665, 357, 309, 726, 449, 120, 616, 583, 421, 231, + 231, 497, 266, 120, 227, 358, 270, 617, 584, 119, + 176, 175, 558, 541, 554, 120, 974, 240, 228, 158, + 125, 229, 120, 559, 272, 555, 651, 103, 677, 659, + 653, 652, 227, 269, 473, 384, 350, 232, 200, 904, + 423, 902, 859, 271, 174, 177, 179, 180, 178, 927, + 668, 667, 658, 660, 671, 672, 669, 670, 673, 675, + 674, 676, 661, 662, 663, 654, 656, 657, 655, 853, + 449, 227, 331, 119, 334, 789, 353, 446, 743, 454, + 348, 311, 230, 230, 132, 119, 456, 300, 637, 228, + 354, 629, 229, 299, 349, 312, 451, 628, 133, 622, + 621, 582, 227, 593, 231, 609, 432, 264, 232, 747, + 449, 608, 394, 446, 447, 391, 595, 119, 446, 594, + 593, 471, 444, 130, 746, 119, 602, 507, 240, 438, + 488, 511, 975, 465, 293, 519, 272, 302, 231, 469, + 292, 159, 286, 502, 119, 477, 478, 280, 253, 38, + 447, 191, 493, 252, 489, 447, 434, 435, 490, 495, + 470, 911, 1016, 496, 539, 928, 231, 519, 6, 503, + 5, 738, 999, 948, 913, 482, 883, 500, 880, 868, + 823, 812, 435, 434, 434, 397, 435, 230, 591, 725, + 176, 175, 544, 691, 461, 463, 294, 437, 632, 623, + 619, 428, 125, 546, 120, 231, 426, 306, 1011, 570, + 978, 570, 575, 570, 578, 890, 227, 484, 138, 264, + 296, 230, 181, 182, 174, 177, 179, 180, 178, 822, + 125, 816, 120, 586, 38, 680, 231, 296, 585, 446, + 446, 807, 806, 874, 4, 562, 549, 398, 537, 230, + 535, 538, 342, 550, 294, 343, 488, 287, 277, 274, + 273, 249, 610, 221, 613, 195, 194, 446, 193, 143, + 446, 228, 446, 121, 229, 607, 447, 447, 134, 715, + 489, 495, 701, 702, 490, 496, 997, 1008, 230, 1007, + 232, 308, 987, 307, 982, 981, 979, 227, 398, 228, + 701, 702, 229, 614, 447, 921, 910, 447, 878, 447, + 809, 351, 612, 1017, 803, 444, 315, 615, 232, 230, + 319, 802, 635, 636, 579, 519, 119, 796, 639, 640, + 710, 697, 679, 545, 519, 543, 540, 499, 396, 346, + 38, 519, 519, 519, 519, 519, 155, 903, 714, 603, + 231, 633, 529, 258, 119, 973, 643, 915, 436, 6, + 570, 5, 889, 698, 646, 888, 227, 227, 227, 433, + 808, 519, 886, 570, 708, 716, 730, 38, 38, 576, + 305, 90, 727, 729, 529, 570, 578, 724, 700, 196, + 223, 224, 703, 266, 705, 227, 227, 270, 828, 872, + 711, 845, 846, 847, 844, 843, 842, 737, 446, 800, + 801, 650, 693, 694, 256, 731, 740, 259, 260, 502, + 294, 728, 678, 736, 269, 125, 734, 739, 453, 422, + 124, 231, 985, 230, 271, 4, 227, 125, 227, 125, + 516, 742, 648, 969, 741, 447, 645, 125, 685, 457, + 513, 452, 510, 444, 752, 425, 424, 721, 466, 125, + 506, 748, 519, 519, 519, 519, 519, 519, 519, 519, + 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, + 519, 519, 519, 519, 519, 519, 519, 519, 519, 787, + 754, 519, 755, 718, 756, 294, 125, 124, 303, 294, + 231, 231, 231, 294, 125, 294, 281, 285, 571, 320, + 298, 572, 571, 294, 230, 572, 788, 790, 519, 316, + 125, 797, 120, 127, 128, 227, 125, 272, 120, 231, + 231, 131, 684, 321, 123, 467, 814, 570, 461, 829, + 862, 258, 529, 574, 570, 848, 436, 817, 61, 593, + 455, 529, 484, 258, 567, 568, 826, 258, 529, 529, + 529, 529, 529, 849, 830, 740, 262, 451, 131, 854, + 231, 856, 231, 571, 402, 607, 572, 258, 400, 207, + 206, 793, 436, 230, 230, 230, 294, 983, 529, 228, + 284, 852, 229, 825, 821, 267, 519, 1005, 268, 857, + 858, 53, 519, 519, 811, 259, 260, 723, 232, 44, + 264, 238, 230, 230, 232, 984, 467, 259, 260, 557, + 162, 259, 260, 794, 336, 227, 875, 227, 873, 798, + 519, 879, 881, 570, 887, 818, 876, 1015, 882, 989, + 468, 259, 260, 955, 119, 44, 953, 923, 618, 894, + 119, 570, 901, 230, 898, 230, 225, 233, 38, 231, + 208, 209, 210, 211, 213, 214, 215, 216, 217, 218, + 219, 220, 212, 891, 548, 227, 897, 446, 519, 529, + 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, + 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, + 529, 529, 529, 529, 529, 529, 517, 920, 529, 597, + 906, 599, 598, 934, 447, 1001, 885, 38, 996, 258, + 519, 877, 444, 958, 283, 810, 701, 702, 933, 907, + 899, 1, 871, 125, 258, 529, 758, 757, 517, 282, + 519, 720, 230, 519, 649, 647, 519, 644, 570, 960, + 570, 968, 38, 600, 38, 704, 701, 702, 512, 231, + 479, 231, 38, 393, 38, 38, 323, 202, 519, 201, + 827, 198, 258, 570, 968, 135, 980, 255, 936, 1006, + 341, 38, 284, 259, 260, 38, 38, 519, 745, 570, + 912, 751, 914, 861, 570, 993, 443, 606, 259, 260, + 587, 995, 922, 991, 924, 925, 588, 589, 682, 231, + 38, 570, 1009, 529, 254, 917, 1010, 837, 917, 529, + 529, 992, 570, 1013, 962, 961, 954, 941, 38, 956, + 900, 945, 959, 481, 946, 401, 259, 260, 893, 836, + 833, 573, 230, 564, 230, 1003, 651, 529, 943, 659, + 653, 652, 38, 1002, 977, 722, 392, 839, 38, 387, + 970, 163, 339, 840, 695, 536, 838, 926, 289, 458, + 160, 156, 317, 990, 671, 672, 669, 670, 673, 675, + 674, 676, 661, 662, 663, 654, 656, 657, 655, 988, + 313, 126, 230, 526, 605, 529, 517, 994, 967, 966, + 965, 964, 835, 834, 832, 517, 399, 39, 566, 14, + 13, 820, 517, 517, 517, 517, 517, 845, 846, 847, + 844, 843, 842, 717, 1012, 942, 191, 333, 799, 692, + 10, 248, 74, 1018, 75, 115, 265, 529, 63, 892, + 88, 596, 517, 89, 518, 100, 168, 170, 169, 191, + 73, 11, 325, 99, 98, 78, 556, 529, 118, 524, + 529, 3, 40, 529, 683, 176, 175, 0, 0, 0, + 0, 686, 687, 688, 689, 690, 0, 0, 0, 0, + 807, 806, 0, 0, 0, 529, 192, 172, 176, 175, + 0, 0, 0, 187, 188, 189, 190, 181, 182, 174, + 177, 179, 180, 178, 529, 0, 0, 0, 166, 167, + 171, 173, 185, 186, 183, 184, 187, 188, 189, 190, + 181, 182, 174, 177, 179, 180, 178, 0, 0, 0, + 0, 0, 0, 517, 517, 517, 517, 517, 517, 517, + 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, + 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, + 0, 0, 517, 208, 209, 210, 211, 213, 214, 215, + 216, 217, 218, 219, 220, 212, 0, 0, 0, 0, + 0, 0, 0, 0, 666, 664, 665, 0, 0, 517, + 0, 0, 759, 760, 761, 762, 763, 764, 765, 766, + 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, + 777, 778, 779, 780, 781, 782, 783, 784, 786, 867, + 0, 683, 651, 0, 677, 659, 653, 652, 208, 209, + 210, 211, 213, 214, 215, 216, 217, 218, 219, 220, + 212, 0, 0, 0, 0, 0, 668, 667, 658, 660, + 671, 672, 669, 670, 673, 675, 674, 676, 661, 662, + 663, 654, 656, 657, 655, 347, 0, 517, 0, 0, + 0, 0, 0, 517, 517, 0, 0, 0, 0, 0, + 208, 209, 210, 211, 213, 214, 215, 216, 217, 218, + 219, 220, 212, 30, 0, 0, 0, 0, 0, 0, + 0, 517, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 146, 150, 154, 0, + 0, 0, 164, 0, 0, 0, 866, 0, 0, 0, + 197, 0, 869, 870, 0, 205, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 222, 0, 0, 517, + 234, 235, 236, 237, 0, 0, 239, 50, 241, 242, + 243, 244, 245, 246, 247, 0, 251, 0, 0, 0, + 0, 261, 0, 0, 0, 0, 275, 276, 0, 278, + 279, 0, 153, 0, 0, 0, 0, 0, 0, 0, + 290, 517, 0, 0, 0, 0, 0, 0, 0, 204, + 0, 0, 0, 0, 0, 0, 0, 0, 908, 0, + 0, 517, 226, 226, 517, 0, 0, 517, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 239, 0, 0, 0, 0, 340, 0, 517, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 940, 0, 0, 0, 0, 0, 0, 0, 517, 665, + 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, + 379, 380, 381, 382, 383, 0, 385, 0, 154, 0, + 0, 0, 0, 0, 0, 651, 0, 677, 659, 653, + 652, 0, 404, 406, 407, 408, 409, 410, 411, 412, + 413, 414, 415, 416, 417, 0, 0, 352, 0, 668, + 667, 658, 660, 671, 672, 669, 670, 673, 675, 674, + 676, 661, 662, 663, 654, 656, 657, 655, 0, 0, + 0, 0, 0, 239, 0, 0, 431, 431, 0, 0, + 0, 389, 390, 439, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 909, 154, 154, 0, + 0, 464, 0, 651, 431, 0, 659, 653, 652, 420, + 431, 290, 0, 0, 0, 0, 431, 431, 0, 0, + 154, 0, 0, 431, 494, 666, 664, 665, 0, 498, + 660, 671, 672, 669, 670, 673, 675, 674, 676, 661, + 662, 663, 654, 656, 657, 655, 0, 0, 441, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 460, 462, 651, 0, 677, 659, 653, 652, 0, + 0, 0, 0, 0, 0, 547, 666, 664, 665, 476, + 0, 0, 551, 0, 485, 0, 0, 668, 667, 658, + 660, 671, 672, 669, 670, 673, 675, 674, 676, 661, + 662, 663, 654, 656, 657, 655, 0, 0, 0, 0, + 553, 0, 0, 0, 651, 865, 677, 659, 653, 652, + 0, 0, 839, 0, 0, 0, 0, 154, 840, 0, + 0, 838, 0, 0, 0, 0, 0, 0, 668, 667, + 658, 660, 671, 672, 669, 670, 673, 675, 674, 676, + 661, 662, 663, 654, 656, 657, 655, 0, 0, 168, + 170, 169, 191, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 611, 0, 0, 0, 0, 0, 0, + 0, 0, 845, 846, 847, 844, 843, 842, 0, 0, + 0, 580, 860, 581, 0, 0, 0, 624, 626, 192, + 172, 176, 175, 0, 831, 0, 0, 0, 0, 0, + 0, 634, 0, 0, 0, 168, 170, 169, 191, 0, + 0, 166, 167, 171, 173, 185, 186, 183, 184, 187, + 188, 189, 190, 181, 182, 174, 177, 179, 180, 178, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 855, 192, 172, 176, 175, 0, + 0, 0, 0, 0, 340, 699, 0, 0, 651, 0, + 0, 0, 653, 652, 476, 0, 709, 166, 167, 171, + 173, 185, 186, 183, 184, 187, 188, 189, 190, 181, + 182, 174, 177, 179, 180, 178, 671, 672, 669, 670, + 673, 675, 674, 676, 661, 662, 663, 654, 656, 657, + 655, 0, 0, 0, 0, 431, 666, 664, 665, 0, + 0, 0, 0, 0, 0, 0, 744, 0, 0, 0, + 0, 0, 431, 749, 0, 0, 0, 792, 0, 0, + 0, 154, 0, 389, 713, 713, 0, 0, 0, 0, + 0, 0, 0, 795, 651, 154, 677, 659, 653, 652, + 0, 0, 0, 0, 0, 0, 666, 664, 665, 0, + 0, 0, 420, 420, 0, 0, 0, 0, 668, 667, + 658, 660, 671, 672, 669, 670, 673, 675, 674, 676, + 661, 662, 663, 654, 656, 657, 655, 0, 0, 0, + 0, 0, 0, 0, 651, 460, 677, 659, 653, 652, + 0, 0, 0, 476, 0, 476, 0, 0, 0, 485, + 0, 0, 0, 0, 0, 804, 0, 0, 668, 667, + 658, 660, 671, 672, 669, 670, 673, 675, 674, 676, + 661, 662, 663, 654, 656, 657, 655, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 850, + 0, 0, 431, 0, 0, 0, 0, 0, 0, 0, + 431, 431, 0, 0, 0, 0, 0, 863, 0, 0, + 0, 0, 0, 0, 82, 83, 71, 17, 104, 105, + 12, 87, 120, 0, 29, 0, 0, 0, 94, 28, + 19, 18, 815, 20, 0, 32, 0, 33, 0, 0, + 21, 0, 0, 0, 22, 23, 37, 44, 15, 24, + 35, 0, 0, 36, 9, 0, 26, 340, 31, 80, + 81, 7, 45, 47, 49, 0, 0, 0, 0, 51, + 95, 0, 93, 109, 110, 111, 106, 107, 0, 0, + 0, 0, 0, 0, 92, 0, 0, 0, 0, 8, + 112, 108, 102, 0, 84, 85, 86, 0, 0, 0, + 0, 79, 52, 0, 0, 0, 77, 41, 27, 46, + 48, 0, 0, 0, 54, 55, 0, 64, 65, 66, + 67, 68, 69, 70, 0, 0, 0, 91, 76, 16, + 642, 34, 713, 62, 420, 96, 0, 0, 0, 57, + 56, 58, 59, 72, 119, 82, 83, 71, 17, 104, + 105, 12, 87, 120, 0, 29, 0, 0, 0, 94, + 28, 19, 18, 0, 20, 0, 32, 0, 33, 0, + 0, 21, 0, 0, 0, 22, 23, 37, 44, 15, + 24, 35, 476, 0, 36, 9, 0, 26, 0, 31, + 80, 81, 7, 45, 47, 49, 0, 0, 0, 0, + 51, 95, 0, 93, 109, 110, 111, 106, 107, 0, + 0, 0, 0, 0, 0, 92, 0, 0, 0, 0, + 8, 112, 108, 102, 0, 84, 85, 86, 0, 0, + 0, 0, 79, 52, 0, 0, 0, 77, 41, 27, + 46, 48, 0, 0, 0, 54, 55, 0, 64, 65, + 66, 67, 68, 69, 70, 0, 0, 0, 91, 76, + 16, 501, 34, 0, 62, 0, 96, 0, 0, 0, + 57, 56, 58, 59, 72, 119, 82, 83, 71, 17, + 104, 105, 12, 87, 120, 0, 29, 0, 0, 0, + 94, 28, 19, 18, 0, 20, 0, 32, 0, 33, + 0, 0, 21, 0, 0, 0, 22, 23, 37, 44, + 15, 24, 35, 0, 0, 36, 9, 0, 26, 0, + 31, 80, 81, 7, 45, 47, 49, 0, 0, 0, + 0, 51, 95, 0, 93, 109, 110, 111, 106, 107, + 0, 0, 0, 0, 0, 0, 92, 0, 0, 0, + 0, 8, 112, 108, 102, 0, 84, 85, 86, 0, + 0, 0, 0, 79, 52, 0, 0, 0, 77, 41, + 27, 46, 48, 0, 0, 0, 54, 55, 0, 64, + 65, 66, 67, 68, 69, 70, 0, 0, 0, 91, + 76, 16, 0, 34, 0, 62, 0, 96, 0, 0, + 0, 57, 56, 58, 59, 72, 119, 82, 83, 71, + 17, 104, 105, 12, 87, 120, 0, 29, 0, 0, + 0, 94, 28, 19, 18, 0, 20, 0, 32, 0, + 33, 0, 0, 21, 0, 0, 0, 22, 23, 37, + 44, 0, 24, 35, 0, 0, 36, 0, 0, 26, + 0, 31, 80, 81, 330, 45, 47, 49, 0, 0, + 0, 0, 51, 95, 0, 93, 109, 110, 111, 106, + 107, 0, 0, 0, 0, 0, 0, 92, 0, 0, + 0, 0, 142, 112, 108, 102, 0, 84, 85, 86, + 0, 0, 0, 0, 79, 52, 0, 0, 0, 77, + 41, 27, 46, 48, 0, 0, 0, 54, 55, 0, + 64, 65, 66, 67, 68, 69, 70, 0, 0, 0, + 91, 76, 16, 1019, 34, 0, 62, 0, 96, 0, + 0, 0, 57, 56, 58, 59, 72, 119, 82, 83, + 71, 17, 104, 105, 12, 87, 120, 0, 29, 0, + 0, 0, 94, 28, 19, 18, 0, 20, 0, 32, + 0, 33, 0, 0, 21, 0, 0, 0, 22, 23, + 37, 44, 0, 24, 35, 0, 0, 36, 0, 0, + 26, 0, 31, 80, 81, 330, 45, 47, 49, 0, + 0, 0, 0, 51, 95, 0, 93, 109, 110, 111, + 106, 107, 0, 0, 0, 0, 0, 0, 92, 0, + 0, 0, 0, 142, 112, 108, 102, 0, 84, 85, + 86, 0, 0, 0, 0, 79, 52, 0, 0, 0, + 77, 41, 27, 46, 48, 0, 0, 0, 54, 55, + 0, 64, 65, 66, 67, 68, 69, 70, 0, 0, + 0, 91, 76, 16, 1014, 34, 0, 62, 0, 96, + 0, 0, 0, 57, 56, 58, 59, 72, 119, 82, + 83, 71, 17, 104, 105, 12, 87, 120, 0, 29, + 0, 0, 0, 94, 28, 19, 18, 0, 20, 0, + 32, 0, 33, 0, 0, 21, 0, 0, 0, 22, + 23, 37, 44, 0, 24, 35, 0, 0, 36, 0, + 0, 26, 0, 31, 80, 81, 330, 45, 47, 49, + 0, 0, 0, 0, 51, 95, 0, 93, 109, 110, + 111, 106, 107, 0, 0, 0, 0, 0, 0, 92, + 0, 0, 0, 0, 142, 112, 108, 102, 0, 84, + 85, 86, 0, 0, 0, 0, 79, 52, 0, 0, + 0, 77, 41, 27, 46, 48, 0, 0, 0, 54, + 55, 0, 64, 65, 66, 67, 68, 69, 70, 0, + 0, 0, 91, 76, 16, 998, 34, 0, 62, 0, + 96, 0, 0, 0, 57, 56, 58, 59, 72, 119, + 82, 83, 71, 17, 104, 105, 12, 87, 120, 0, + 29, 0, 0, 0, 94, 28, 19, 18, 0, 20, + 986, 32, 0, 33, 0, 0, 21, 0, 0, 0, + 22, 23, 37, 44, 0, 24, 35, 0, 0, 36, + 0, 0, 26, 0, 31, 80, 81, 330, 45, 47, + 49, 0, 0, 0, 0, 51, 95, 0, 93, 109, + 110, 111, 106, 107, 0, 0, 0, 0, 0, 0, + 92, 0, 0, 0, 0, 142, 112, 108, 102, 0, + 84, 85, 86, 0, 0, 0, 0, 79, 52, 0, + 0, 0, 77, 41, 27, 46, 48, 0, 0, 0, + 54, 55, 0, 64, 65, 66, 67, 68, 69, 70, + 0, 0, 0, 91, 76, 16, 0, 34, 0, 62, + 0, 96, 0, 0, 0, 57, 56, 58, 59, 72, + 119, 82, 83, 71, 17, 104, 105, 12, 87, 120, + 0, 29, 0, 0, 0, 94, 28, 19, 18, 0, + 20, 0, 32, 972, 33, 0, 0, 21, 0, 0, + 0, 22, 23, 37, 44, 0, 24, 35, 0, 0, + 36, 0, 0, 26, 0, 31, 80, 81, 330, 45, + 47, 49, 0, 0, 0, 0, 51, 95, 0, 93, + 109, 110, 111, 106, 107, 0, 0, 0, 0, 0, + 0, 92, 0, 0, 0, 0, 142, 112, 108, 102, + 0, 84, 85, 86, 0, 0, 0, 0, 79, 52, + 0, 0, 0, 77, 41, 27, 46, 48, 0, 0, + 0, 54, 55, 0, 64, 65, 66, 67, 68, 69, + 70, 0, 0, 0, 91, 76, 16, 0, 34, 0, + 62, 0, 96, 0, 0, 0, 57, 56, 58, 59, + 72, 119, 82, 83, 71, 17, 104, 105, 12, 87, + 120, 0, 29, 0, 0, 0, 94, 28, 19, 18, + 0, 20, 0, 32, 0, 33, 0, 0, 21, 0, + 0, 0, 22, 23, 37, 44, 0, 24, 35, 0, + 0, 36, 0, 0, 26, 0, 31, 80, 81, 330, + 45, 47, 49, 0, 0, 0, 0, 51, 95, 0, + 93, 109, 110, 111, 106, 107, 0, 0, 0, 0, + 0, 0, 92, 0, 0, 0, 0, 142, 112, 108, + 102, 0, 84, 85, 86, 0, 0, 0, 0, 79, + 52, 0, 0, 0, 77, 41, 27, 46, 48, 0, + 0, 0, 54, 55, 0, 64, 65, 66, 67, 68, + 69, 70, 0, 0, 0, 91, 76, 16, 971, 34, + 0, 62, 0, 96, 0, 0, 0, 57, 56, 58, + 59, 72, 119, 82, 83, 71, 17, 104, 105, 12, + 87, 120, 0, 29, 0, 0, 0, 94, 28, 19, + 18, 0, 20, 0, 32, 0, 33, 0, 0, 21, + 0, 0, 0, 22, 23, 37, 44, 0, 24, 35, + 0, 0, 36, 0, 0, 26, 0, 31, 80, 81, + 330, 45, 47, 49, 0, 0, 0, 0, 51, 95, + 0, 93, 109, 110, 111, 106, 107, 0, 0, 0, + 0, 0, 0, 92, 0, 0, 0, 0, 142, 112, + 108, 102, 0, 84, 85, 86, 0, 0, 0, 0, + 79, 52, 0, 0, 0, 77, 41, 27, 46, 48, + 0, 0, 0, 54, 55, 0, 64, 65, 66, 67, + 68, 69, 70, 0, 0, 0, 91, 76, 16, 950, + 34, 0, 62, 0, 96, 0, 0, 0, 57, 56, + 58, 59, 72, 119, 82, 83, 71, 17, 104, 105, + 12, 87, 120, 0, 29, 0, 0, 0, 94, 28, + 19, 18, 0, 20, 0, 32, 0, 33, 0, 0, + 21, 0, 0, 0, 22, 23, 37, 44, 0, 24, + 35, 0, 0, 36, 0, 0, 26, 0, 31, 80, + 81, 330, 45, 47, 49, 0, 0, 0, 0, 51, + 95, 0, 93, 109, 110, 111, 106, 107, 0, 0, + 0, 0, 0, 0, 92, 0, 0, 0, 0, 142, + 112, 108, 102, 0, 84, 85, 86, 0, 0, 0, + 0, 79, 52, 0, 0, 0, 77, 41, 27, 46, + 48, 0, 0, 0, 54, 55, 0, 64, 65, 66, + 67, 68, 69, 70, 0, 0, 0, 91, 76, 16, + 949, 34, 0, 62, 0, 96, 0, 0, 0, 57, + 56, 58, 59, 72, 119, 82, 83, 71, 17, 104, + 105, 12, 87, 120, 0, 29, 0, 0, 0, 94, + 28, 19, 18, 0, 20, 0, 32, 0, 33, 0, + 0, 21, 0, 0, 0, 22, 23, 37, 44, 0, + 24, 35, 0, 0, 36, 0, 0, 26, 0, 31, + 80, 81, 330, 45, 47, 49, 0, 0, 0, 0, + 51, 95, 0, 93, 109, 110, 111, 106, 107, 0, + 0, 0, 0, 0, 0, 92, 0, 0, 0, 0, + 142, 112, 108, 102, 0, 84, 85, 86, 0, 0, + 0, 0, 79, 52, 0, 0, 0, 77, 41, 27, + 46, 48, 0, 0, 0, 54, 55, 0, 64, 65, + 66, 67, 68, 69, 70, 0, 0, 0, 91, 76, + 16, 947, 34, 0, 62, 0, 96, 0, 0, 0, + 57, 56, 58, 59, 72, 119, 82, 83, 71, 17, + 104, 105, 12, 87, 120, 0, 29, 0, 0, 0, + 94, 28, 19, 18, 0, 20, 0, 32, 0, 33, + 884, 0, 21, 0, 0, 0, 22, 23, 37, 44, + 0, 24, 35, 0, 0, 36, 0, 0, 26, 0, + 31, 80, 81, 330, 45, 47, 49, 0, 0, 0, + 0, 51, 95, 0, 93, 109, 110, 111, 106, 107, + 0, 0, 0, 0, 0, 0, 92, 0, 0, 0, + 0, 142, 112, 108, 102, 0, 84, 85, 86, 0, + 0, 0, 0, 79, 52, 0, 0, 0, 77, 41, + 27, 46, 48, 0, 0, 0, 54, 55, 0, 64, + 65, 66, 67, 68, 69, 70, 0, 0, 0, 91, + 76, 16, 0, 34, 0, 62, 0, 96, 0, 0, + 0, 57, 56, 58, 59, 72, 119, 82, 83, 71, + 17, 104, 105, 12, 87, 120, 0, 29, 0, 0, + 0, 94, 28, 19, 18, 696, 20, 0, 32, 0, + 33, 0, 0, 21, 0, 0, 0, 22, 23, 37, + 44, 0, 24, 35, 0, 0, 36, 0, 0, 26, + 0, 31, 80, 81, 330, 45, 47, 49, 0, 0, + 0, 0, 51, 95, 0, 93, 109, 110, 111, 106, + 107, 0, 0, 0, 0, 0, 0, 92, 0, 0, + 0, 0, 142, 112, 108, 102, 0, 84, 85, 86, + 0, 0, 0, 0, 79, 52, 0, 0, 0, 77, + 41, 27, 46, 48, 0, 0, 0, 54, 55, 0, + 64, 65, 66, 67, 68, 69, 70, 0, 0, 0, + 91, 76, 16, 0, 34, 0, 62, 0, 96, 0, + 0, 0, 57, 56, 58, 59, 72, 119, 82, 83, + 71, 17, 104, 105, 12, 87, 120, 0, 29, 0, + 0, 0, 94, 28, 19, 18, 0, 20, 0, 32, + 0, 33, 0, 0, 21, 0, 0, 0, 22, 23, + 37, 44, 0, 24, 35, 0, 0, 36, 0, 0, + 26, 0, 31, 80, 81, 330, 45, 47, 49, 0, + 0, 0, 0, 51, 95, 0, 93, 109, 110, 111, + 106, 107, 0, 0, 0, 0, 0, 0, 92, 0, + 0, 0, 0, 142, 112, 108, 102, 0, 84, 85, + 86, 0, 0, 0, 0, 79, 52, 0, 0, 0, + 77, 41, 27, 46, 48, 0, 0, 0, 54, 55, + 0, 64, 65, 66, 67, 68, 69, 70, 0, 0, + 0, 91, 76, 16, 561, 34, 0, 62, 0, 96, + 0, 0, 0, 57, 56, 58, 59, 72, 119, 82, + 83, 71, 17, 104, 105, 12, 87, 120, 0, 29, + 0, 0, 0, 94, 28, 19, 18, 0, 20, 0, + 32, 0, 33, 0, 0, 21, 0, 0, 0, 22, + 23, 37, 44, 0, 24, 35, 0, 0, 36, 0, + 0, 26, 0, 31, 80, 81, 330, 45, 47, 49, + 0, 0, 0, 0, 51, 95, 0, 93, 109, 110, + 111, 106, 107, 0, 0, 0, 0, 0, 0, 92, + 0, 0, 0, 0, 142, 112, 108, 102, 0, 84, + 85, 86, 0, 0, 0, 0, 79, 52, 0, 0, + 0, 77, 41, 27, 46, 48, 0, 0, 0, 54, + 55, 0, 64, 65, 66, 67, 68, 69, 70, 0, + 0, 0, 91, 76, 16, 326, 34, 0, 62, 0, + 96, 0, 0, 0, 57, 56, 58, 59, 72, 119, + 82, 83, 71, 17, 104, 105, 12, 87, 120, 0, + 29, 0, 0, 0, 94, 28, 19, 18, 0, 20, + 0, 32, 0, 33, 0, 0, 21, 0, 0, 0, + 22, 23, 37, 44, 0, 24, 35, 0, 0, 36, + 0, 0, 26, 0, 31, 80, 81, 330, 45, 47, + 49, 0, 0, 0, 0, 51, 95, 0, 93, 109, + 110, 111, 106, 107, 0, 0, 0, 0, 0, 0, + 92, 0, 0, 0, 0, 142, 112, 108, 102, 0, + 84, 85, 86, 0, 0, 0, 0, 79, 52, 0, + 0, 0, 77, 41, 27, 46, 48, 0, 0, 0, + 54, 55, 0, 64, 65, 66, 67, 68, 69, 70, + 0, 0, 0, 91, 76, 16, 0, 34, 0, 62, + 0, 96, 0, 0, 0, 57, 56, 58, 59, 72, + 119, 82, 83, 71, 17, 104, 105, 12, 87, 120, + 0, 29, 0, 0, 0, 94, 28, 19, 18, 0, + 20, 0, 32, 0, 33, 0, 0, 21, 0, 0, + 0, 22, 23, 37, 44, 0, 24, 35, 0, 0, + 36, 0, 0, 26, 0, 31, 80, 81, 0, 0, + 0, 0, 0, 0, 0, 0, 51, 95, 0, 93, + 109, 110, 111, 106, 107, 0, 0, 0, 0, 0, + 0, 92, 0, 0, 0, 0, 142, 112, 108, 102, + 0, 84, 85, 86, 0, 0, 0, 0, 79, 52, + 0, 0, 0, 77, 41, 27, 0, 0, 0, 0, + 0, 54, 55, 0, 64, 65, 66, 67, 68, 69, + 70, 0, 0, 0, 91, 76, 16, 0, 34, 944, + 62, 0, 96, 0, 0, 0, 57, 56, 58, 59, + 72, 119, 82, 83, 71, 17, 104, 105, 12, 87, + 120, 0, 29, 0, 0, 0, 94, 28, 19, 18, + 0, 20, 0, 32, 0, 33, 0, 0, 21, 0, + 0, 0, 22, 23, 37, 44, 0, 24, 35, 0, + 0, 36, 0, 0, 26, 0, 31, 80, 81, 0, + 0, 0, 0, 0, 0, 0, 0, 51, 95, 0, + 93, 109, 110, 111, 106, 107, 0, 0, 0, 0, + 0, 0, 92, 0, 0, 0, 0, 142, 112, 108, + 102, 0, 84, 85, 86, 0, 0, 0, 0, 79, + 52, 0, 0, 0, 77, 41, 27, 0, 0, 0, + 0, 0, 54, 55, 0, 64, 65, 66, 67, 68, + 69, 70, 0, 0, 0, 91, 76, 16, 0, 34, + 918, 62, 0, 96, 0, 0, 0, 57, 56, 58, + 59, 72, 119, 82, 83, 71, 17, 104, 105, 12, + 87, 120, 0, 29, 0, 0, 0, 94, 28, 19, + 18, 0, 20, 0, 32, 0, 33, 0, 0, 21, + 0, 0, 0, 22, 23, 37, 44, 0, 24, 35, + 0, 0, 36, 0, 0, 26, 0, 31, 80, 81, + 0, 0, 0, 0, 0, 0, 0, 0, 51, 95, + 0, 93, 109, 110, 111, 106, 107, 0, 0, 0, + 0, 0, 0, 92, 0, 0, 0, 0, 142, 112, + 108, 102, 0, 84, 85, 86, 0, 0, 0, 0, + 79, 52, 0, 0, 0, 77, 41, 27, 0, 0, + 0, 0, 0, 54, 55, 0, 64, 65, 66, 67, + 68, 69, 70, 0, 0, 0, 91, 76, 16, 0, + 34, 719, 62, 0, 96, 0, 0, 0, 57, 56, + 58, 59, 72, 119, 82, 83, 71, 17, 104, 105, + 12, 87, 120, 0, 29, 0, 0, 0, 94, 28, + 19, 18, 0, 20, 0, 32, 0, 33, 0, 0, + 21, 0, 0, 0, 22, 23, 37, 44, 0, 24, + 35, 0, 0, 36, 0, 0, 26, 0, 31, 80, + 81, 0, 0, 0, 0, 0, 0, 0, 0, 51, + 95, 0, 93, 109, 110, 111, 106, 107, 0, 0, + 0, 0, 0, 0, 92, 0, 0, 0, 0, 142, + 112, 108, 102, 0, 84, 85, 86, 0, 0, 0, + 0, 79, 52, 0, 0, 0, 77, 41, 27, 0, + 0, 0, 0, 0, 54, 55, 0, 64, 65, 66, + 67, 68, 69, 70, 0, 0, 0, 91, 76, 16, + 0, 34, 335, 62, 0, 96, 0, 0, 0, 57, + 56, 58, 59, 72, 119, 82, 83, 71, 17, 104, + 105, 12, 87, 120, 0, 29, 0, 0, 0, 94, + 28, 19, 18, 0, 20, 0, 32, 0, 33, 0, + 0, 21, 0, 0, 0, 22, 23, 37, 44, 0, + 24, 35, 0, 0, 36, 0, 0, 26, 0, 31, + 80, 81, 0, 0, 0, 0, 0, 0, 0, 0, + 51, 95, 0, 93, 109, 110, 111, 106, 107, 0, + 0, 0, 0, 0, 0, 92, 0, 0, 0, 0, + 142, 112, 108, 102, 0, 84, 85, 86, 0, 0, + 0, 0, 79, 52, 0, 0, 0, 77, 41, 27, + 0, 0, 0, 0, 0, 54, 55, 0, 64, 65, + 66, 67, 68, 69, 70, 0, 0, 0, 91, 76, + 16, 0, 34, 332, 62, 0, 96, 0, 0, 0, + 57, 56, 58, 59, 72, 119, 82, 83, 71, 17, + 104, 105, 12, 87, 120, 0, 29, 0, 0, 0, + 94, 28, 19, 18, 0, 20, 0, 32, 0, 33, + 0, 0, 21, 0, 0, 0, 22, 23, 37, 44, + 0, 24, 35, 0, 0, 36, 0, 0, 26, 0, + 31, 80, 81, 0, 0, 0, 0, 0, 0, 0, + 0, 51, 95, 0, 93, 109, 110, 111, 106, 107, + 0, 0, 753, 0, 0, 0, 92, 0, 0, 0, + 0, 142, 112, 108, 102, 0, 84, 85, 86, 0, + 0, 0, 0, 79, 52, 0, 0, 0, 77, 41, + 27, 168, 170, 169, 191, 0, 54, 55, 0, 64, + 65, 66, 67, 68, 69, 70, 0, 0, 0, 91, + 76, 16, 0, 34, 0, 62, 0, 96, 0, 0, + 0, 57, 56, 58, 59, 72, 119, 0, 0, 0, + 0, 192, 172, 176, 175, 0, 0, 0, 0, 168, + 170, 169, 191, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 166, 167, 171, 173, 185, 186, 183, + 184, 187, 188, 189, 190, 181, 182, 174, 177, 179, + 180, 178, 750, 0, 0, 0, 0, 0, 0, 192, + 172, 176, 175, 0, 0, 0, 0, 168, 170, 169, + 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 166, 167, 171, 173, 185, 186, 183, 184, 187, + 188, 189, 190, 181, 182, 174, 177, 179, 180, 178, + 706, 0, 0, 0, 0, 0, 0, 192, 172, 176, + 175, 0, 0, 0, 0, 168, 170, 169, 191, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 166, + 167, 171, 173, 185, 186, 183, 184, 187, 188, 189, + 190, 181, 182, 174, 177, 179, 180, 178, 641, 0, + 0, 0, 0, 0, 0, 192, 172, 176, 175, 0, + 0, 0, 0, 168, 170, 169, 191, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 166, 167, 171, + 173, 185, 186, 183, 184, 187, 188, 189, 190, 181, + 182, 174, 177, 179, 180, 178, 638, 0, 0, 0, + 0, 0, 0, 192, 172, 176, 175, 168, 170, 169, + 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 166, 167, 171, 173, 185, + 186, 183, 184, 187, 188, 189, 190, 181, 182, 174, + 177, 179, 180, 178, 620, 0, 0, 192, 172, 176, + 175, 0, 0, 0, 0, 168, 170, 169, 191, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 166, + 167, 171, 173, 185, 186, 183, 184, 187, 188, 189, + 190, 181, 182, 174, 177, 179, 180, 178, 601, 0, + 0, 0, 0, 0, 0, 192, 172, 176, 175, 0, + 0, 168, 170, 169, 191, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 474, 166, 167, 171, + 173, 185, 186, 183, 184, 187, 188, 189, 190, 181, + 182, 174, 177, 179, 180, 178, 552, 0, 0, 0, + 0, 192, 172, 176, 175, 168, 170, 169, 191, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 166, 167, 171, 173, 185, 186, 183, + 184, 187, 188, 189, 190, 181, 182, 174, 177, 179, + 180, 178, 0, 0, 0, 192, 172, 176, 175, 168, + 170, 169, 191, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 403, 0, 0, 166, 167, 171, + 173, 185, 186, 183, 184, 187, 188, 189, 190, 181, + 182, 174, 177, 179, 180, 178, 427, 0, 0, 192, + 172, 176, 175, 168, 170, 169, 191, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 166, 167, 171, 173, 185, 186, 183, 184, 187, + 188, 189, 190, 181, 182, 174, 177, 179, 180, 178, + 0, 0, 0, 192, 172, 176, 175, 0, 0, 0, + 168, 170, 169, 191, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 166, 167, 171, 173, 185, + 186, 183, 184, 187, 188, 189, 190, 181, 182, 174, + 177, 179, 180, 178, 395, 0, 0, 0, 0, 0, + 192, 172, 176, 175, 0, 0, 0, 168, 170, 169, + 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 166, 167, 171, 173, 185, 186, 183, 184, + 187, 188, 189, 190, 181, 182, 174, 177, 179, 180, + 178, 345, 0, 0, 0, 0, 0, 192, 172, 176, + 175, 0, 0, 0, 168, 170, 169, 191, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 166, + 167, 171, 173, 185, 186, 183, 184, 187, 188, 189, + 190, 181, 182, 174, 177, 179, 180, 178, 344, 0, + 0, 0, 0, 0, 192, 172, 176, 175, 0, 0, + 0, 168, 170, 169, 191, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 166, 167, 171, 173, + 185, 186, 183, 184, 187, 188, 189, 190, 181, 182, + 174, 177, 179, 180, 178, 165, 0, 0, 0, 0, + 0, 192, 172, 176, 175, 666, 664, 665, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 166, 167, 171, 173, 185, 186, 183, + 184, 187, 188, 189, 190, 181, 182, 174, 177, 179, + 180, 178, 0, 651, 0, 677, 659, 653, 652, 168, + 170, 169, 191, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 668, 667, 658, + 660, 671, 672, 669, 670, 673, 675, 674, 676, 661, + 662, 663, 654, 656, 657, 655, 0, 0, 0, 192, + 172, 176, 175, 170, 169, 191, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 166, 167, 171, 173, 185, 186, 183, 184, 187, + 188, 189, 190, 181, 182, 174, 177, 179, 180, 178, + 0, 0, 192, 172, 176, 175, 169, 191, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 166, 167, 171, 173, 185, 186, + 183, 184, 187, 188, 189, 190, 181, 182, 174, 177, + 179, 180, 178, 0, 192, 172, 176, 175, 191, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 166, 167, 171, 173, + 185, 186, 183, 184, 187, 188, 189, 190, 181, 182, + 174, 177, 179, 180, 178, 192, 172, 176, 175, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 166, 167, 171, + 173, 185, 186, 183, 184, 187, 188, 189, 190, 181, + 182, 174, 177, 179, 180, 178, 651, 0, 677, 659, + 653, 652, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 668, 667, 658, 660, 671, 672, 669, 670, 673, 675, + 674, 676, 661, 662, 663, 654, 656, 657, 655, 651, + 0, 0, 659, 653, 652, 191, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 668, 667, 658, 660, 671, 672, 669, + 670, 673, 675, 674, 676, 661, 662, 663, 654, 656, + 657, 655, 0, 172, 176, 175, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 651, 0, + 0, 659, 653, 652, 166, 167, 171, 173, 185, 186, + 183, 184, 187, 188, 189, 190, 181, 182, 174, 177, + 179, 180, 178, 667, 658, 660, 671, 672, 669, 670, + 673, 675, 674, 676, 661, 662, 663, 654, 656, 657, + 655, 191, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, + 176, 175, 0, 0, 0, 0, 82, 83, 71, 0, + 104, 105, 125, 87, 120, 0, 0, 0, 0, 0, + 94, 167, 171, 173, 185, 186, 183, 184, 187, 188, + 189, 190, 181, 182, 174, 177, 179, 180, 178, 44, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 80, 81, 0, 0, 0, 0, 0, 0, 0, + 0, 51, 95, 0, 93, 109, 110, 111, 106, 107, + 0, 0, 0, 0, 0, 0, 92, 0, 0, 0, + 0, 142, 112, 108, 102, 487, 84, 85, 86, 0, + 0, 0, 0, 79, 52, 0, 0, 0, 77, 41, + 148, 0, 0, 0, 0, 0, 54, 55, 0, 64, + 65, 66, 67, 68, 69, 70, 0, 0, 651, 91, + 76, 659, 653, 652, 0, 62, 480, 96, 0, 0, + 486, 57, 56, 58, 59, 72, 119, 0, 0, 0, + 0, 0, 0, 0, 658, 660, 671, 672, 669, 670, + 673, 675, 674, 676, 661, 662, 663, 654, 656, 657, + 655, 82, 83, 71, 0, 104, 105, 125, 87, 120, + 0, 0, 0, 0, 0, 94, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 44, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 80, 81, 0, 0, + 0, 0, 0, 0, 0, 0, 51, 95, 0, 93, + 109, 110, 111, 106, 107, 0, 0, 0, 0, 0, + 0, 92, 0, 191, 0, 0, 142, 112, 108, 102, + 487, 84, 85, 86, 0, 0, 0, 0, 79, 52, + 0, 0, 0, 77, 147, 148, 0, 0, 0, 0, + 0, 54, 55, 0, 64, 65, 66, 67, 68, 69, + 70, 172, 176, 175, 91, 76, 0, 0, 0, 0, + 62, 0, 96, 0, 0, 486, 57, 56, 58, 59, + 72, 119, 0, 0, 171, 173, 185, 186, 183, 184, + 187, 188, 189, 190, 181, 182, 174, 177, 179, 180, + 178, 82, 83, 71, 0, 104, 105, 125, 87, 120, + 0, 0, 0, 0, 0, 94, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 44, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 80, 81, 0, 0, + 0, 0, 0, 0, 0, 0, 51, 95, 0, 93, + 109, 110, 111, 106, 107, 0, 0, 0, 0, 0, + 0, 92, 0, 0, 0, 0, 142, 112, 108, 102, + 0, 84, 85, 86, 191, 0, 0, 0, 79, 52, + 0, 0, 0, 77, 147, 148, 0, 0, 0, 0, + 0, 54, 55, 0, 64, 65, 66, 67, 68, 69, + 70, 0, 0, 0, 91, 76, 0, 0, 0, 0, + 62, 0, 96, 176, 175, 864, 57, 56, 58, 59, + 72, 119, 82, 83, 71, 0, 104, 105, 125, 87, + 120, 0, 0, 0, 0, 0, 94, 185, 186, 183, + 184, 187, 188, 189, 190, 181, 182, 174, 177, 179, + 180, 178, 0, 0, 0, 44, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 80, 81, 0, + 0, 0, 0, 0, 0, 0, 0, 51, 95, 0, + 93, 109, 110, 111, 106, 107, 0, 0, 0, 0, + 0, 0, 92, 0, 0, 0, 0, 142, 112, 108, + 102, 0, 84, 85, 86, 0, 0, 0, 0, 79, + 52, 0, 0, 0, 77, 147, 148, 0, 0, 0, + 0, 0, 54, 55, 0, 64, 65, 66, 67, 68, + 69, 70, 0, 0, 0, 91, 76, 0, 0, 0, + 0, 62, 0, 96, 0, 0, 627, 57, 56, 58, + 59, 72, 119, 82, 83, 71, 0, 104, 105, 125, + 87, 120, 0, 0, 0, 0, 0, 94, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 44, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 80, 81, + 0, 0, 0, 0, 0, 0, 0, 0, 51, 95, + 0, 93, 109, 110, 111, 106, 107, 0, 0, 0, + 0, 0, 0, 92, 0, 191, 0, 0, 142, 112, + 108, 102, 0, 84, 85, 86, 0, 0, 0, 0, + 79, 52, 0, 0, 0, 77, 147, 148, 0, 0, + 0, 0, 0, 54, 55, 0, 64, 65, 66, 67, + 68, 69, 70, 172, 176, 175, 91, 76, 0, 0, + 0, 0, 62, 0, 96, 0, 0, 625, 57, 56, + 58, 59, 72, 119, 0, 0, 0, 173, 185, 186, + 183, 184, 187, 188, 189, 190, 181, 182, 174, 177, + 179, 180, 178, 82, 83, 71, 0, 104, 105, 125, + 87, 120, 0, 0, 0, 0, 0, 94, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 44, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 80, 81, + 0, 0, 0, 0, 0, 0, 0, 0, 51, 95, + 0, 93, 109, 110, 111, 106, 107, 0, 0, 0, + 0, 0, 0, 92, 0, 0, 0, 0, 142, 112, + 108, 102, 0, 84, 85, 86, 0, 0, 0, 0, + 79, 52, 0, 0, 0, 77, 147, 148, 0, 0, + 0, 0, 0, 54, 55, 0, 64, 65, 66, 67, + 68, 69, 70, 0, 0, 0, 91, 76, 0, 0, + 0, 0, 62, 0, 96, 0, 0, 291, 57, 56, + 58, 59, 72, 119, 82, 83, 71, 0, 104, 105, + 125, 87, 120, 0, 0, 0, 0, 0, 94, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 44, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, + 81, 0, 0, 0, 0, 0, 0, 0, 0, 51, + 95, 0, 93, 109, 110, 111, 106, 107, 0, 0, + 0, 0, 0, 0, 92, 0, 0, 0, 0, 142, + 112, 108, 102, 0, 84, 85, 86, 0, 191, 0, + 0, 79, 52, 0, 0, 0, 77, 41, 148, 0, + 0, 0, 0, 0, 54, 55, 0, 64, 65, 66, + 67, 68, 69, 70, 0, 0, 0, 91, 76, 0, + 0, 0, 0, 62, 429, 96, 172, 176, 175, 57, + 56, 58, 59, 72, 119, 82, 83, 71, 0, 104, + 105, 125, 87, 120, 0, 0, 0, 0, 0, 94, + 0, 185, 186, 183, 184, 187, 188, 189, 190, 181, + 182, 174, 177, 179, 180, 178, 0, 0, 44, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 80, 81, 0, 0, 0, 0, 0, 0, 0, 0, + 51, 95, 0, 93, 109, 110, 111, 106, 107, 0, + 0, 0, 0, 0, 0, 92, 0, 0, 0, 0, + 142, 112, 108, 102, 0, 84, 85, 86, 0, 0, + 0, 0, 79, 52, 0, 0, 0, 77, 147, 148, + 0, 0, 0, 0, 0, 54, 55, 0, 64, 65, + 66, 67, 68, 69, 70, 0, 0, 0, 91, 76, + 0, 0, 0, 0, 62, 0, 96, 0, 0, 405, + 57, 56, 58, 59, 72, 119, 82, 83, 71, 0, + 104, 105, 125, 87, 120, 0, 0, 0, 0, 0, + 94, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 80, 81, 0, 0, 0, 0, 0, 0, 0, + 0, 51, 95, 0, 93, 109, 110, 111, 106, 107, + 0, 0, 0, 0, 0, 0, 92, 0, 0, 0, + 0, 142, 112, 108, 102, 0, 84, 85, 86, 0, + 0, 0, 0, 79, 52, 0, 0, 0, 77, 147, + 148, 0, 0, 0, 0, 0, 54, 55, 0, 64, + 65, 66, 67, 68, 69, 70, 0, 0, 0, 91, + 76, 0, 0, 0, 386, 62, 0, 96, 0, 0, + 0, 57, 56, 58, 59, 72, 119, 82, 83, 71, + 0, 104, 105, 125, 87, 120, 0, 0, 0, 0, + 0, 94, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 80, 81, 0, 0, 0, 0, 0, 0, + 0, 0, 51, 95, 0, 93, 109, 110, 111, 106, + 107, 0, 0, 0, 0, 0, 0, 92, 0, 0, + 0, 0, 142, 112, 108, 102, 0, 84, 85, 86, + 0, 0, 0, 0, 79, 52, 0, 0, 0, 77, + 147, 148, 0, 0, 0, 0, 0, 54, 55, 0, + 64, 65, 66, 67, 68, 69, 70, 0, 0, 0, + 91, 76, 0, 0, 151, 0, 62, 0, 96, 0, + 0, 0, 57, 56, 58, 59, 72, 119, 82, 83, + 71, 0, 104, 105, 125, 87, 120, 0, 0, 0, + 0, 0, 94, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 44, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 80, 81, 0, 0, 0, 0, 0, + 0, 0, 0, 51, 95, 0, 93, 109, 110, 111, + 106, 107, 0, 0, 0, 0, 0, 0, 92, 0, + 0, 0, 0, 142, 112, 108, 102, 0, 84, 85, + 86, 0, 0, 0, 0, 79, 52, 0, 0, 0, + 77, 147, 148, 0, 0, 0, 0, 0, 54, 55, + 0, 64, 65, 66, 67, 68, 69, 70, 0, 0, + 0, 91, 76, 0, 0, 149, 0, 62, 0, 96, + 0, 0, 0, 57, 56, 58, 59, 72, 119, 82, + 83, 71, 0, 104, 105, 125, 87, 120, 0, 0, + 0, 0, 0, 94, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 44, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 80, 81, 0, 0, 0, 0, + 0, 0, 0, 0, 51, 95, 0, 93, 109, 110, + 111, 106, 107, 0, 0, 0, 0, 0, 0, 92, + 0, 0, 0, 0, 142, 112, 108, 102, 0, 84, + 85, 86, 0, 0, 0, 0, 79, 52, 0, 0, + 0, 77, 147, 148, 0, 0, 0, 0, 0, 54, + 55, 0, 64, 65, 66, 67, 68, 69, 70, 0, + 0, 0, 91, 76, 0, 0, 145, 0, 62, 0, + 96, 0, 0, 0, 57, 56, 58, 59, 72, 119, + 82, 83, 71, 0, 104, 105, 125, 87, 120, 0, + 0, 0, 0, 0, 94, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 44, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 80, 81, 0, 0, 0, + 0, 0, 0, 0, 0, 51, 95, 0, 93, 109, + 110, 111, 106, 107, 0, 0, 0, 0, 0, 0, + 92, 0, 0, 0, 0, 142, 112, 108, 102, 0, + 84, 85, 86, 0, 0, 0, 0, 79, 52, 0, + 0, 0, 77, 147, 148, 0, 0, 0, 0, 0, + 54, 55, 0, 64, 65, 66, 67, 68, 69, 70, + 0, 0, 0, 91, 76, 0, 0, 0, 0, 62, + 0, 96, 0, 0, 0, 57, 56, 58, 59, 72, + 119, 82, 83, 71, 0, 104, 105, 125, 440, 120, + 0, 0, 0, 0, 0, 94, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 44, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 80, 81, 0, 0, + 0, 0, 0, 0, 0, 0, 51, 95, 0, 93, + 109, 110, 111, 106, 107, 0, 0, 0, 0, 0, + 0, 92, 0, 0, 0, 0, 142, 112, 108, 102, + 0, 84, 85, 86, 0, 0, 0, 0, 79, 52, + 0, 0, 0, 77, 147, 148, 0, 0, 0, 0, + 0, 54, 55, 0, 64, 65, 66, 67, 68, 69, + 70, 0, 0, 0, 91, 76, 0, 0, 0, 0, + 62, 0, 96, 0, 0, 0, 57, 56, 58, 59, + 72, 119, 82, 83, 71, 0, 104, 105, 125, 87, + 120, 0, 0, 0, 0, 0, 94, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 44, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 80, 81, 0, + 0, 0, 0, 0, 0, 0, 0, 51, 95, 0, + 93, 109, 110, 111, 106, 107, 0, 0, 0, 0, + 0, 0, 92, 0, 0, 0, 0, 142, 112, 108, + 102, 0, 84, 85, 86, 0, 0, 0, 0, 79, + 52, 104, 105, 125, 77, 41, 148, 0, 0, 0, + 0, 527, 54, 55, 0, 64, 65, 66, 67, 68, + 69, 70, 0, 0, 0, 91, 76, 0, 0, 0, + 0, 62, 0, 96, 0, 0, 0, 57, 56, 58, + 59, 72, 119, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 522, 0, 525, 109, 110, 111, 106, + 107, 0, 0, 0, 0, 0, 0, 528, 0, 0, + 0, 0, 520, 112, 108, 521, 104, 105, 125, 0, + 0, 0, 0, 0, 0, 0, 527, 0, 0, 0, + 0, 232, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 785, 534, 0, 523, 0, + 0, 0, 533, 532, 530, 531, 0, 0, 522, 0, + 525, 109, 110, 111, 106, 107, 0, 0, 0, 0, + 0, 0, 528, 0, 0, 0, 0, 520, 112, 108, + 521, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 232, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 534, 0, 523, 0, 0, 0, 533, 532, 530, + 531, +} +var yyPact = [...]int{ + + -1000, -1000, 2402, -1000, -1000, -1000, -1000, 340, 605, 676, + 153, -1000, 346, -1000, -1000, 955, -1000, 285, 285, 5022, + 336, 285, 7755, 7624, 7493, 415, 197, 798, 7886, -1000, + 5684, 335, 333, 332, -1000, 460, 7886, 951, 100, 949, + 947, 7886, -1000, -1000, -1000, -1000, 718, -1000, 717, -1000, + 1182, 330, 7886, 476, 700, 700, 7886, 7886, 7886, 7886, + -1000, -1000, 8148, -1000, 7886, 7886, 7886, 7886, 7886, 7886, + 7886, 328, 7886, -1000, 218, 213, 950, 7886, 699, 706, + 327, 326, 7886, 7886, 325, 7886, 7886, -1000, 212, -1000, + -1000, 912, 897, -1000, 207, 324, 6969, -1000, 205, 199, + -1000, 304, 913, 622, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, 158, 193, -1000, 610, 287, -1000, 451, + -1000, 273, 362, -1000, 913, -1000, 150, 627, 617, -1000, + 694, 913, -1000, 946, -1000, 26, 4105, 4891, 8148, 4760, + 793, 100, 538, 7886, 323, -1000, 5637, -1000, 762, -1000, + 5590, -1000, 408, 1234, 5772, -1000, 149, -1000, -1000, 382, + 145, 100, 10, 60, 5772, -1000, 7886, 7886, 7886, 7886, + 7886, 7886, 7886, 7886, 7886, 7886, 7886, 7886, 7886, 7886, + 7886, 7886, 7886, 7886, 7886, 7886, 7886, 7886, 7886, 7886, + 7886, 706, 7362, 700, 7886, 943, -1000, 5543, 407, 365, + -1000, 713, 709, -1000, 1182, 5496, -1000, -1000, 7231, 7886, + 7886, 7886, 7886, 7886, 7886, 7886, 7886, 7886, 7886, 7886, + 7886, 129, -1000, -1000, -1000, -1000, -1000, 304, 537, 913, + 568, 567, -1000, -1000, -120, -120, -25, -120, 272, 5452, + 267, -120, -120, -120, -120, -120, -120, -120, -1000, 7100, + -1000, -120, 7886, 7886, 441, 735, 719, -1000, 262, 8017, + 700, 5898, 141, 287, 563, -1000, 528, 536, 913, 683, + 158, 193, 561, 7886, 7886, 5772, 5772, 7886, 5772, 5772, + 7886, 531, 735, 731, -1000, 755, 7886, 6969, 185, 89, + 5408, 700, 7886, 7886, 940, -1000, 6252, 304, 65, 7886, + 7886, 158, 451, 181, -1000, 7886, 406, -1000, -1000, 2271, + 304, -1000, 639, 29, -1000, 621, 913, 28, -1000, 613, + 913, 938, 611, 9, 8308, -1000, -1000, -1000, -1000, -1000, + 317, -1000, -1000, -1000, -1000, -1000, 285, 314, 405, 68, + 5772, -1000, 404, 402, -1000, -1000, -1000, -1000, -1000, 197, + -1000, 7886, -1000, -1000, 852, 313, 8308, -1000, 7886, 6121, + 6393, 5815, 5898, 5857, 6805, 6554, 7098, -9, -9, -9, + -25, -120, -25, -25, 71, 71, 1026, 1026, 1026, 1026, + 251, 251, 251, 251, -1000, 5364, 7886, 80, -1000, -1000, + 1117, 780, 78, -6, 3974, -1000, -1000, 312, 684, 677, + 619, 450, 619, 7886, 5898, 200, 5898, 5898, 5898, 5898, + 5898, 5898, 5898, 5898, 5898, 5898, 5898, 5898, 63, -1000, + -1000, 305, 913, 304, 141, 141, 253, -1000, -1000, -1000, + 183, 5772, 180, -1000, -1000, -1000, -1000, 889, 933, 5318, + 191, 419, 287, 176, -1000, -1000, 158, 193, -1000, 7886, + -1000, -1000, 173, 913, 528, 141, 158, 173, 62, -1000, + 1182, -1000, 714, 266, 5270, 164, -1000, -1000, -1000, 163, + 265, -1000, -1000, 6819, 6688, -1000, -1000, 161, 155, -1000, + -1000, 41, 264, -1000, -1000, 1182, 700, 7886, -1000, 287, + 287, -1000, -1000, 152, 5226, 287, 287, -1000, 5178, -1000, + 2140, -1000, -1000, -1000, -1000, 627, 927, 607, -1000, 617, + 925, 603, -1000, 924, 8308, -1000, 5728, -1000, -1000, 528, + 530, 913, 302, 8308, -1000, -1000, -1000, -1000, 705, 560, + 8308, 8308, 8308, 8308, 8308, 259, 509, 4236, 3843, 400, + 7886, 7886, 458, -1000, 914, -1000, -1000, 5130, -10, 684, + -1000, 5772, 7886, 6025, 399, 700, 410, 410, 4629, 921, + 8308, 756, 684, 255, 48, -1000, 100, -1000, -1000, -1000, + 528, 529, 913, 447, 619, -1000, -1000, 33, -1000, -1000, + 1182, -1000, 706, -13, 129, 129, 304, -1000, -1000, 236, + 682, 7886, -1000, 141, -1000, -1000, 142, -1000, -1000, -1000, + -1000, -1000, 7886, -1000, -1000, 189, 174, -1000, 7886, 7886, + 158, 5082, -1000, 528, -1000, -1000, -1000, 7886, -1000, -1000, + -1000, -1000, -1000, -1000, 5034, 700, 5772, 700, -1000, -1000, + -1000, 6407, -1000, -1000, 5772, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, 917, -1000, -1000, 916, -1000, + -1000, 8308, 8308, 8308, 8308, 8308, 8308, 8308, 8308, 8308, + 8308, 8308, 8308, 8308, 8308, 8308, 8308, 8308, 8308, 8308, + 8308, 8308, 8308, 8308, 8308, 8308, 8308, 8233, 913, 528, + 8308, 139, 42, 1939, 650, 761, -65, -65, -58, -58, + 1889, 396, -1000, 285, 5022, 506, 390, -1000, 383, 5772, + -1000, 7886, 310, 440, 379, 884, -1000, 8308, 247, 6025, + -1000, -1000, 668, -1000, 700, 298, 668, -1000, -1000, -1000, + -16, -1000, 742, 296, 246, 739, 684, 505, 913, 528, + -1000, 33, 1744, 619, 287, 7886, -1000, 24, 7886, 682, + -1000, 133, 287, -1000, 1788, 682, 7886, 7886, 106, 1732, + -1000, 673, -1000, 6557, -1000, -1000, -1000, -1000, -1000, 1649, + -58, -58, -65, -65, -65, -65, 1538, 1803, 911, -51, + -51, -58, 1460, 5941, 91, 6243, 6043, -66, -66, -66, + -66, 8, 8, 8, 8, 8308, 1187, 528, 245, -1000, + -1000, 8308, 8308, -1000, -1000, -1000, -1000, 5022, -1000, 494, + 285, 311, -1000, 7886, 1049, -1000, -1000, -1000, -1000, -1000, + 377, -1000, 739, 244, 410, -1000, 129, 242, 3712, 8308, + -1000, 443, 619, 436, 433, 282, -1000, 851, -1000, 528, + 1009, -1000, -1000, 827, 1, -1000, 762, 493, -1000, 910, + 619, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + 5898, -1000, 105, -1000, -1000, 417, -1000, 103, -56, -1000, + -1000, -1000, 141, 5772, 700, -1000, 5984, 8308, -1000, 1598, + 5728, -1000, 375, 229, -1000, 240, -1000, 4236, -1000, 428, + 4498, -1000, 19, 4498, 374, -1000, -1000, 825, -1000, -1000, + 227, -53, -1000, -17, -54, -1000, 908, 100, -1000, -63, + -50, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 5984, 8308, + -1000, -1000, 4236, 4367, 4236, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, 3581, 239, 3450, 3319, -48, -1000, 824, 8308, + -1000, 821, 8308, -64, 903, 8308, -1000, 619, -1000, 623, + 5728, 4236, -1000, -1000, -1000, 3188, 3057, -1000, 426, -1000, + -1000, -1000, 194, -1000, -1000, -75, -1000, 8308, 277, -1000, + -1000, 366, 623, -1000, 364, 363, 732, 776, 544, -1000, + 2926, -1000, 361, -1000, -1000, 817, 8308, -1000, 684, -1000, + -1000, -1000, -1000, 619, 493, 898, 355, -1000, 2795, -1000, + -1000, 238, -47, -1000, 895, -1000, -1000, -1000, 746, 358, + 619, -1000, -1000, 746, -1000, 275, -1000, -1000, -1000, -1000, + -1000, 619, 2664, 815, -1000, 228, 384, -1000, 2533, -1000, +} +var yyPgo = [...]int{ + + 0, 29, 1152, 1151, 46, 40, 44, 571, 1149, 1148, + 4, 217, 134, 42, 1383, 110, 66, 54, 791, 1447, + 1145, 31, 1144, 1143, 1142, 124, 1141, 43, 86, 1140, + 1135, 1134, 1133, 90, 1131, 1130, 26, 1128, 28, 45, + 49, 1126, 738, 33, 1125, 1, 1124, 1122, 17, 1121, + 68, 50, 48, 1120, 1119, 1118, 1117, 1115, 34, 13, + 1113, 1101, 2, 1100, 1099, 1098, 19, 1097, 1096, 1094, + 1093, 1092, 52, 3, 1091, 1090, 1089, 1088, 1087, 6, + 1084, 630, 1083, 58, 0, 1081, 1080, 1062, 105, 1061, + 1060, 604, 1059, 1058, 62, 11, 1057, 8, 1055, 1054, + 1052, 12, 38, 1051, 1049, 1046, 1045, 1043, 1035, 14, + 1033, 23, 1031, 1030, 1029, 1028, 1025, 30, 1023, 1020, + 1015, 1014, 1011, 1007, 1004, 25, 998, 997, 996, 27, + 990, 15, 16, 987, 37, 986, 983, 981, 978, 41, + 7, 20, 18, 22, 970, 969, 968, 5, 960, 921, + 21, 24, +} +var yyR1 = [...]int{ + + 0, 149, 83, 83, 84, 84, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 85, 85, 4, + 4, 4, 4, 86, 86, 5, 5, 5, 5, 87, + 87, 6, 6, 6, 6, 53, 53, 88, 88, 24, + 24, 24, 24, 25, 25, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 106, 106, 61, 61, 107, 107, 108, + 108, 62, 104, 104, 58, 51, 52, 147, 147, 148, + 148, 63, 64, 64, 67, 67, 67, 67, 68, 68, + 2, 116, 116, 112, 112, 117, 117, 141, 141, 140, + 140, 140, 57, 57, 59, 59, 60, 60, 105, 105, + 144, 144, 144, 144, 102, 102, 102, 150, 150, 56, + 56, 98, 98, 99, 99, 54, 54, 55, 55, 109, + 109, 110, 110, 66, 66, 65, 65, 65, 65, 143, + 143, 143, 118, 118, 72, 72, 72, 72, 89, 89, + 27, 27, 27, 90, 90, 90, 90, 111, 111, 69, + 69, 69, 69, 71, 119, 119, 146, 146, 120, 120, + 121, 121, 73, 73, 74, 122, 122, 77, 77, 76, + 75, 75, 78, 78, 145, 145, 113, 113, 114, 114, + 123, 123, 79, 79, 79, 79, 79, 79, 115, 115, + 115, 115, 70, 70, 103, 103, 101, 101, 100, 100, + 129, 129, 127, 127, 128, 128, 128, 130, 130, 42, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 50, 50, 50, 50, 47, 47, + 47, 47, 46, 46, 1, 97, 97, 96, 96, 96, + 96, 23, 23, 23, 23, 23, 23, 23, 23, 11, + 11, 11, 11, 45, 45, 45, 43, 43, 41, 41, + 137, 137, 136, 49, 49, 49, 124, 124, 124, 142, + 142, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 8, 28, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 35, 35, + 35, 35, 29, 29, 29, 29, 29, 29, 29, 125, + 125, 151, 151, 126, 126, 126, 126, 14, 14, 48, + 48, 16, 17, 18, 19, 19, 138, 138, 131, 133, + 133, 80, 132, 132, 132, 40, 40, 44, 44, 12, + 22, 22, 20, 20, 20, 21, 21, 21, 10, 10, + 10, 9, 9, 13, 13, 134, 134, 135, 135, 135, + 39, 39, 139, 139, 95, 95, 38, 38, 38, 94, + 94, 93, 93, 93, 93, 93, 93, 93, 93, 91, + 91, 91, 91, 33, 33, 33, 33, 33, 33, 34, + 34, 34, 37, 37, 37, 37, 37, 37, 37, 37, + 92, 92, 36, 36, 30, 30, 31, 32, +} +var yyR2 = [...]int{ + + 0, 1, 2, 0, 1, 3, 1, 1, 1, 4, + 3, 5, 4, 3, 4, 4, 2, 3, 1, 1, + 3, 2, 4, 3, 1, 1, 3, 2, 4, 3, + 1, 1, 3, 2, 4, 5, 4, 2, 0, 1, + 1, 1, 4, 1, 2, 3, 5, 8, 3, 5, + 9, 3, 2, 3, 2, 3, 2, 3, 3, 2, + 3, 3, 3, 1, 2, 5, 8, 8, 5, 1, + 6, 3, 3, 0, 9, 0, 4, 1, 0, 1, + 2, 8, 1, 3, 1, 1, 1, 0, 1, 0, + 1, 9, 7, 6, 1, 2, 1, 2, 0, 2, + 1, 0, 2, 0, 2, 1, 3, 0, 2, 1, + 2, 4, 1, 4, 1, 4, 1, 4, 3, 5, + 3, 4, 4, 5, 0, 5, 4, 1, 1, 1, + 4, 0, 4, 0, 5, 0, 2, 0, 3, 1, + 0, 1, 3, 4, 6, 0, 1, 1, 1, 2, + 3, 3, 1, 3, 1, 1, 2, 2, 3, 1, + 1, 2, 4, 3, 5, 1, 3, 2, 0, 3, + 2, 1, 8, 3, 1, 3, 1, 3, 0, 1, + 1, 2, 2, 2, 3, 1, 3, 1, 1, 3, + 4, 3, 0, 1, 1, 3, 1, 1, 0, 1, + 1, 2, 1, 1, 1, 1, 1, 1, 3, 5, + 1, 3, 5, 4, 3, 1, 0, 1, 3, 1, + 2, 1, 4, 3, 2, 1, 1, 0, 1, 3, + 6, 3, 4, 6, 2, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, + 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, + 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 1, 1, 4, 5, 4, 1, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 1, 1, 3, + 2, 1, 9, 10, 2, 2, 4, 4, 4, 4, + 4, 4, 4, 3, 1, 0, 4, 3, 4, 1, + 2, 2, 4, 3, 4, 4, 4, 4, 2, 1, + 1, 3, 2, 1, 3, 2, 1, 1, 4, 1, + 2, 0, 2, 0, 2, 1, 0, 1, 1, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 2, 3, 1, 1, 1, 1, 3, 2, + 4, 3, 1, 1, 1, 4, 3, 3, 3, 3, + 3, 3, 2, 2, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 4, 5, 2, 2, 3, 1, 1, + 3, 2, 1, 1, 1, 1, 3, 3, 1, 0, + 2, 0, 1, 5, 3, 3, 1, 1, 1, 3, + 3, 1, 1, 1, 5, 1, 2, 0, 3, 4, + 4, 1, 1, 1, 0, 1, 2, 3, 3, 1, + 4, 4, 1, 1, 1, 1, 2, 1, 4, 4, + 1, 1, 4, 0, 1, 1, 1, 4, 4, 1, + 1, 3, 1, 2, 3, 1, 1, 4, 0, 0, + 2, 5, 3, 3, 1, 6, 4, 4, 2, 2, + 2, 1, 2, 1, 4, 3, 3, 6, 3, 1, + 1, 1, 4, 4, 4, 2, 2, 4, 2, 2, + 1, 3, 1, 1, 3, 3, 3, 3, +} +var yyChk = [...]int{ + + -1000, -149, -83, -3, -25, -51, -52, 51, 79, 44, + -53, -26, 10, -63, -64, 38, 119, 7, 21, 20, + 23, 30, 34, 35, 39, -50, 46, 98, 19, 14, + -14, 48, 25, 27, 121, 40, 43, 36, -1, -67, + -2, 97, -16, -15, 37, 52, 99, 53, 100, 54, + -19, 59, 92, -18, 104, 105, 130, 129, 131, 132, + -48, -42, 123, -37, 107, 108, 109, 110, 111, 112, + 113, 6, 133, -29, -47, -46, 118, 96, -20, 91, + 49, 50, 4, 5, 84, 85, 86, 11, -35, -32, + -7, 117, 74, 62, 18, 60, 125, -21, -22, -23, + -30, -84, 82, -11, 8, 9, 66, 67, 81, 63, + 64, 65, 80, -10, -139, -44, -12, -40, -9, 134, + 12, 123, -84, 119, 82, 10, -85, 37, 38, -4, + -84, 82, 121, 135, 122, 10, -88, -48, 123, -48, + -25, -1, 79, 123, -48, 121, -14, 97, 98, 121, + -14, 121, -15, -19, -14, 121, -89, -27, 12, 134, + -90, -1, 12, -103, -14, 121, 149, 150, 87, 89, + 88, 151, 128, 152, 163, 130, 129, 164, 167, 165, + 166, 161, 162, 155, 156, 153, 154, 157, 158, 159, + 160, 90, 127, 123, 123, 123, 119, -14, 10, -147, + 128, 10, 10, -15, -19, -14, 52, 52, 136, 137, + 138, 139, 148, 140, 141, 142, 143, 144, 145, 146, + 147, 123, -14, 104, 105, -18, -19, -84, 79, 82, + -11, -12, 98, -18, -14, -14, -14, -14, -42, -14, + -50, -14, -14, -14, -14, -14, -14, -14, -49, 123, + -48, -14, 125, 125, -124, 17, -91, -33, 12, 76, + 77, -14, 57, -43, -11, -41, -84, 79, 82, -21, + -10, -139, -12, 123, 123, -14, -14, 123, -14, -14, + 125, -91, 17, 17, 75, -91, 125, 123, -94, -93, + -14, 128, 125, 125, 82, -143, 123, -84, 78, 125, + 119, -10, 134, 78, -143, 119, 124, 121, 119, -83, + -84, 121, 135, -86, -5, -84, 82, -87, -6, -84, + 82, 29, -84, 10, 136, -24, 120, -25, -51, -52, + 51, -25, 122, -56, -25, 122, 21, -147, -101, -100, + -14, -144, 119, 122, 121, 121, 121, 121, 121, 135, + -16, 119, -19, 121, 135, -147, 136, 121, 135, -14, + -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, + -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, + -14, -14, -14, -14, -43, -14, 122, -104, -58, -19, + -19, -15, -105, 10, -88, 121, 121, 10, 123, -68, + 55, -116, 55, 58, -14, 128, -14, -14, -14, -14, + -14, -14, -14, -14, -14, -14, -14, -14, -95, -38, + -19, 59, 82, -84, 78, 78, 124, 124, 124, 124, + -13, -14, -13, 118, -33, -33, 17, 125, 57, -14, + 11, -19, -134, -135, -40, -39, -10, -139, 10, 119, + -142, -143, 78, 82, -84, 57, -10, 78, -92, -36, + -19, -15, -19, -15, -14, -13, 117, 75, 75, -13, + -94, 126, -151, 135, 58, -17, -19, -13, -13, 10, + 124, -118, -50, -72, -15, -19, 128, 83, -143, -39, + -40, 10, 52, -13, -14, -39, -40, 10, -14, 121, + -83, 120, -143, -4, 121, 135, 29, -84, 121, 135, + 29, -84, 10, 29, 136, -28, -81, -7, -31, -84, + 79, 82, 60, 125, -8, 62, -82, 18, 74, -11, + 131, 132, 130, 129, 123, 123, -98, -88, -88, -48, + 121, 135, -102, 121, -102, 121, -27, -14, 12, 123, + -28, -14, 122, -14, 124, 135, 29, 29, 124, 135, + 136, 120, 123, -109, -110, -66, -65, 60, 61, -45, + -84, 79, 82, -112, 56, -45, 119, -117, -45, -15, + -19, -19, 91, 124, 135, 123, -84, -130, -128, -127, + -129, 125, -131, 57, 126, 126, -34, 10, 13, 12, + 10, 120, 125, 120, -132, -80, -133, -143, 125, 119, + -10, -14, -40, -84, -134, -40, 124, 135, 124, 124, + 124, 126, 126, 124, -14, 128, -14, 128, 126, 126, + 124, 135, 124, -17, -14, -143, -143, 126, 120, -143, + -143, 120, 120, -5, 10, 29, -6, 10, 29, 10, + -28, 125, 130, 129, 164, 167, 165, 166, 151, 128, + 152, 161, 162, 163, 88, 89, 87, 150, 149, 155, + 156, 153, 154, 157, 159, 158, 160, 127, 82, -84, + 123, -125, -126, -81, 17, 78, -81, -81, -81, -81, + -81, 124, -54, 93, 94, -99, 22, 121, -101, -14, + 120, 32, 33, -102, 31, -102, 120, 136, -109, -14, + 121, -58, -140, -19, 128, 59, -140, -60, -25, 122, + 10, -28, -106, 41, -109, 124, 135, -147, 82, -84, + 119, -117, -111, 135, -43, 136, -38, -95, 125, -129, + -131, -13, -134, 126, -14, -138, 125, 125, -13, -14, + 120, -137, -36, 58, -17, -17, -72, 10, 10, -81, + -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, + -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, + -81, -81, -81, -81, -81, 122, -81, -84, -125, 126, + -151, 135, 58, 10, 52, 124, 121, -48, -25, -55, + 93, 94, 121, 121, -14, -150, 122, 121, 120, 121, + 31, -28, 124, -141, 58, -19, 123, -141, -88, 136, + -61, 42, 123, 124, -97, 44, -66, -148, 83, -84, + -111, 120, -69, -113, -70, -71, -114, -123, 47, 38, + 44, -79, 103, 102, 101, 98, 99, 100, -45, -142, + -14, 124, -13, 126, -132, 126, -131, -13, -13, 126, + 120, -136, 57, -14, 128, 126, -81, 122, 124, -81, + -81, -25, 95, -48, 122, -101, -150, -88, 121, -97, + 124, -140, -95, 124, 28, -28, 119, -45, 119, 119, + 123, 12, 120, -115, 12, 121, 135, -1, -79, 10, + -119, -45, 126, 120, 126, 126, -134, -17, -81, 58, + 121, 122, -88, 124, -88, 119, -59, -25, 122, 124, + -59, 121, -88, 12, -88, -88, -96, 12, 128, 136, + 121, 135, 136, 10, -147, 136, -146, 135, 121, 119, + -81, -88, -57, -25, 122, -88, -88, 120, 124, 120, + 120, 124, 135, 12, -28, 12, -28, 136, 10, -28, + -45, -120, -121, -73, -74, -75, -76, -77, -45, 10, + -88, 120, 26, 119, 12, 128, 136, -28, 123, 120, + -73, 121, 121, 45, 29, 78, 24, 121, -88, 12, + -28, -109, -122, -45, -78, -79, 10, 121, 120, 124, + 135, 10, -107, -108, -62, 41, -145, 121, 119, -45, + -62, 123, -88, -45, 120, 12, 124, 119, -88, 120, +} +var yyDef = [...]int{ + + 3, -2, 1, 2, 6, 7, 8, 0, 0, 0, + 0, 43, 4, 85, 86, 0, 38, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 329, 0, 63, + 0, 0, 0, 0, 69, 0, 0, 0, 87, 0, + 0, 301, 427, 428, 314, 94, 0, 96, 0, 100, + -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 281, 282, 0, 286, 0, 0, 0, 0, 0, 0, + 0, 343, 0, 296, 297, 298, 346, 0, 435, 0, + 0, 0, 0, 0, 0, 0, 0, 412, 413, 414, + 415, 0, 0, 418, 353, 0, 479, 452, 453, 454, + 408, -2, 0, 0, 351, 352, 354, 355, 356, 357, + 358, 359, 360, -2, 0, 457, 0, 0, 460, 472, + 461, 0, 0, 3, 0, 4, 0, 0, 0, 18, + 19, 0, 16, 0, 44, 0, 0, 0, 0, 0, + 0, 87, 0, 216, 0, 52, 0, 301, 329, 54, + 0, 56, 428, -2, 0, 59, 0, 159, 160, 0, + 0, 87, 165, 0, 215, 64, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, + 88, 98, 101, -2, -2, 0, 95, 97, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 478, 234, 247, 249, 248, 433, 330, 0, 0, + 0, 0, 329, 250, 268, 269, 270, 271, 282, 0, + 0, 287, 288, 289, 290, 291, 292, 293, 294, 0, + 345, 295, 463, 463, 0, 347, 348, 491, 493, 0, + 0, 300, 0, 349, 336, 337, 330, 0, 0, 339, + -2, 0, 0, 0, 0, 505, 506, 0, 508, 509, + 463, 0, 0, 0, 362, 0, 463, 479, 0, 421, + 484, 0, 463, 463, 0, 321, 0, -2, 0, 463, + 0, -2, 473, 0, 328, 0, 0, 10, 3, 0, + -2, 13, 0, 0, 24, 25, 0, 0, 30, 31, + 0, 0, 21, 0, 0, 37, 45, 39, 40, 41, + 0, 131, 38, 48, 129, 38, 0, 0, 0, 217, + 219, 51, 124, 124, 53, 55, 57, 58, 60, 0, + 161, 0, 431, 61, 0, 0, 0, 62, 0, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, + 262, 263, 264, 265, 266, 267, -2, -2, -2, -2, + -2, -2, -2, -2, 280, 0, 0, 0, 82, 84, + -2, 428, 0, 0, 0, 71, 72, 0, -2, 103, + 0, 0, 0, 0, 231, 0, 235, 236, 237, 238, + 239, 240, 241, 242, 243, 244, 245, 246, 0, 475, + 476, 0, 0, 332, 0, 0, 227, 429, 430, 344, + 0, 464, 0, 299, 492, 489, 490, 0, 0, 0, + 412, 0, 444, 465, 466, 469, 445, 0, 470, 0, + 229, 350, 0, 0, 332, 0, 456, 0, 0, 510, + -2, -2, -2, 428, 0, 0, 416, 361, 417, 0, + 0, 313, 480, 422, 0, 488, 432, 0, 0, 5, + 149, 0, 0, 152, -2, -2, 0, 0, 323, 0, + 447, -2, 517, 0, 0, 0, 448, -2, 0, 9, + 0, 12, 322, 17, 14, 0, 0, 27, 15, 0, + 0, 33, 20, 0, 0, 36, 364, 365, 366, -2, + 0, 0, 0, 419, 372, 373, 374, 353, 0, 0, + 0, 0, 0, 0, 0, 0, 135, 133, 0, 0, + 216, 0, 0, 124, 0, 124, 158, 0, 163, -2, + 166, 214, 0, 285, 0, 0, 0, 0, 0, 0, + 0, 73, -2, 0, 139, 141, 87, 146, 147, 148, + 333, 0, 0, 0, 0, 99, 168, 102, 105, -2, + -2, 232, 0, 0, 478, 478, 331, 283, 228, 225, + 226, 463, 221, 0, 309, 308, 0, 499, 500, 501, + 495, 496, 0, 498, 437, 442, 443, 441, 463, 0, + 446, 0, 447, 331, 341, 448, 502, 0, 503, 504, + 507, 311, 310, 312, 482, 0, 483, 0, 450, 451, + 150, 0, 151, 156, 157, 324, 325, 458, 459, 326, + 327, 462, 11, 23, 26, 0, 29, 32, 0, 22, + 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, + 419, 0, 421, 426, 0, 0, 382, 383, 405, 406, + 0, 0, 46, 0, 0, 137, 0, 49, 0, 218, + 120, 0, 0, 0, 0, 0, 162, 0, 0, 284, + 65, 83, 107, 109, 0, 0, 107, 68, 116, 38, + 0, 118, 75, 0, 0, 315, 145, 89, 0, 335, + 168, 104, 198, 0, 349, 0, 474, 0, 463, 224, + 220, 0, 444, 494, 0, 434, 463, 463, 0, 0, + 471, 338, 511, 0, 486, 487, 153, 28, 34, 0, + 376, 377, 378, 379, 380, 381, 384, 385, 386, 387, + 388, 389, 390, 391, 392, 393, 394, -2, -2, -2, + -2, -2, -2, -2, -2, 0, 0, -2, 0, 371, + 420, 422, 0, 363, 516, 407, 42, 0, 136, 0, + 0, 0, 130, 216, 0, 38, 127, 128, 121, 122, + 0, 164, 315, 0, 0, 110, 478, 0, 0, 0, + 70, 0, 0, 0, 0, 0, 142, 0, 90, 334, + 198, 93, 167, 0, 0, 171, 0, -2, 197, 0, + 0, 200, 202, 203, 204, 205, 206, 207, 106, 233, + 230, 477, 0, 223, 438, 0, 436, 0, 0, 467, + 468, 340, 0, 481, 0, 375, 403, 0, 370, 424, + 425, 132, 0, 0, 38, 0, 38, 126, 123, 0, + 0, 108, 0, 0, 0, 119, 38, 0, 38, 38, + 0, 143, 92, 0, 210, 170, 0, 87, 201, 0, + 0, 174, 222, 497, 440, 439, 342, 485, 404, 0, + 47, 38, 138, 0, 125, 38, 66, 114, 38, 111, + 67, 117, 0, 0, 0, 0, 0, 319, 0, 0, + 169, 0, 0, 0, 0, 0, 173, 0, 176, 178, + 423, 134, 50, 112, 38, 0, 0, 76, 0, 91, + 302, 316, 0, 320, 144, 208, 211, 0, 0, 213, + 175, 0, 179, 180, 0, 0, 188, 0, 0, -2, + 0, 303, 0, 38, 317, 0, 0, 212, -2, 177, + 181, 182, 183, 0, 192, 0, 0, 115, 0, 318, + 209, 0, 184, 185, 0, -2, 189, 113, 78, 0, + 0, 190, 74, 77, 79, 0, 172, 194, 38, 186, + 80, 0, 0, 0, 195, 0, 0, 38, 0, 81, +} +var yyTok1 = [...]int{ + + 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 131, 117, 3, 134, 166, 128, 3, + 123, 124, 164, 130, 135, 129, 163, 165, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 122, 121, + 157, 136, 159, 127, 133, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 125, 3, 126, 152, 3, 118, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 119, 151, 120, 132, +} +var yyTok2 = [...]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, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 153, + 154, 155, 156, 158, 160, 161, 162, 167, +} +var yyTok3 = [...]int{ + 0, +} + +var yyErrorMessages = [...]struct { + state int + token int + msg string +}{} + +//line yaccpar:1 + +/* parser for yacc output */ + +var ( + yyDebug = 0 + yyErrorVerbose = false +) + +type yyLexer interface { + Lex(lval *yySymType) int + Error(s string) +} + +type yyParser interface { + Parse(yyLexer) int + Lookahead() int +} + +type yyParserImpl struct { + lval yySymType + stack [yyInitialStackSize]yySymType + char int +} + +func (p *yyParserImpl) Lookahead() int { + return p.char +} + +func yyNewParser() yyParser { + return &yyParserImpl{} +} + +const yyFlag = -1000 + +func yyTokname(c int) string { + if c >= 1 && c-1 < len(yyToknames) { + if yyToknames[c-1] != "" { + return yyToknames[c-1] + } + } + return __yyfmt__.Sprintf("tok-%v", c) +} + +func yyStatname(s int) string { + if s >= 0 && s < len(yyStatenames) { + if yyStatenames[s] != "" { + return yyStatenames[s] + } + } + return __yyfmt__.Sprintf("state-%v", s) +} + +func yyErrorMessage(state, lookAhead int) string { + const TOKSTART = 4 + + if !yyErrorVerbose { + return "syntax error" + } + + for _, e := range yyErrorMessages { + if e.state == state && e.token == lookAhead { + return "syntax error: " + e.msg + } + } + + res := "syntax error: unexpected " + yyTokname(lookAhead) + + // To match Bison, suggest at most four expected tokens. + expected := make([]int, 0, 4) + + // Look for shiftable tokens. + base := yyPact[state] + for tok := TOKSTART; tok-1 < len(yyToknames); tok++ { + if n := base + tok; n >= 0 && n < yyLast && yyChk[yyAct[n]] == tok { + if len(expected) == cap(expected) { + return res + } + expected = append(expected, tok) + } + } + + if yyDef[state] == -2 { + i := 0 + for yyExca[i] != -1 || yyExca[i+1] != state { + i += 2 + } + + // Look for tokens that we accept or reduce. + for i += 2; yyExca[i] >= 0; i += 2 { + tok := yyExca[i] + if tok < TOKSTART || yyExca[i+1] == 0 { + continue + } + if len(expected) == cap(expected) { + return res + } + expected = append(expected, tok) + } + + // If the default action is to accept or reduce, give up. + if yyExca[i+1] != 0 { + return res + } + } + + for i, tok := range expected { + if i == 0 { + res += ", expecting " + } else { + res += " or " + } + res += yyTokname(tok) + } + return res +} + +func yylex1(lex yyLexer, lval *yySymType) (char, token int) { + token = 0 + char = lex.Lex(lval) + if char <= 0 { + token = yyTok1[0] + goto out + } + if char < len(yyTok1) { + token = yyTok1[char] + goto out + } + if char >= yyPrivate { + if char < yyPrivate+len(yyTok2) { + token = yyTok2[char-yyPrivate] + goto out + } + } + for i := 0; i < len(yyTok3); i += 2 { + token = yyTok3[i+0] + if token == char { + token = yyTok3[i+1] + goto out + } + } + +out: + if token == 0 { + token = yyTok2[1] /* unknown char */ + } + if yyDebug >= 3 { + __yyfmt__.Printf("lex %s(%d)\n", yyTokname(token), uint(char)) + } + return char, token +} + +func yyParse(yylex yyLexer) int { + return yyNewParser().Parse(yylex) +} + +func (yyrcvr *yyParserImpl) Parse(yylex yyLexer) int { + var yyn int + var yyVAL yySymType + var yyDollar []yySymType + _ = yyDollar // silence set and not used + yyS := yyrcvr.stack[:] + + Nerrs := 0 /* number of errors */ + Errflag := 0 /* error recovery flag */ + yystate := 0 + yyrcvr.char = -1 + yytoken := -1 // yyrcvr.char translated into internal numbering + defer func() { + // Make sure we report no lookahead when not parsing. + yystate = -1 + yyrcvr.char = -1 + yytoken = -1 + }() + yyp := -1 + goto yystack + +ret0: + return 0 + +ret1: + return 1 + +yystack: + /* put a state and value onto the stack */ + if yyDebug >= 4 { + __yyfmt__.Printf("char %v in %v\n", yyTokname(yytoken), yyStatname(yystate)) + } + + yyp++ + if yyp >= len(yyS) { + nyys := make([]yySymType, len(yyS)*2) + copy(nyys, yyS) + yyS = nyys + } + yyS[yyp] = yyVAL + yyS[yyp].yys = yystate + +yynewstate: + yyn = yyPact[yystate] + if yyn <= yyFlag { + goto yydefault /* simple state */ + } + if yyrcvr.char < 0 { + yyrcvr.char, yytoken = yylex1(yylex, &yyrcvr.lval) + } + yyn += yytoken + if yyn < 0 || yyn >= yyLast { + goto yydefault + } + yyn = yyAct[yyn] + if yyChk[yyn] == yytoken { /* valid shift */ + yyrcvr.char = -1 + yytoken = -1 + yyVAL = yyrcvr.lval + yystate = yyn + if Errflag > 0 { + Errflag-- + } + goto yystack + } + +yydefault: + /* default state action */ + yyn = yyDef[yystate] + if yyn == -2 { + if yyrcvr.char < 0 { + yyrcvr.char, yytoken = yylex1(yylex, &yyrcvr.lval) + } + + /* look through exception table */ + xi := 0 + for { + if yyExca[xi+0] == -1 && yyExca[xi+1] == yystate { + break + } + xi += 2 + } + for xi += 2; ; xi += 2 { + yyn = yyExca[xi+0] + if yyn < 0 || yyn == yytoken { + break + } + } + yyn = yyExca[xi+1] + if yyn < 0 { + goto ret0 + } + } + if yyn == 0 { + /* error ... attempt to resume parsing */ + switch Errflag { + case 0: /* brand new error */ + yylex.Error(yyErrorMessage(yystate, yytoken)) + Nerrs++ + if yyDebug >= 1 { + __yyfmt__.Printf("%s", yyStatname(yystate)) + __yyfmt__.Printf(" saw %s\n", yyTokname(yytoken)) + } + fallthrough + + case 1, 2: /* incompletely recovered error ... try again */ + Errflag = 3 + + /* find a state where "error" is a legal shift action */ + for yyp >= 0 { + yyn = yyPact[yyS[yyp].yys] + yyErrCode + if yyn >= 0 && yyn < yyLast { + yystate = yyAct[yyn] /* simulate a shift of "error" */ + if yyChk[yystate] == yyErrCode { + goto yystack + } + } + + /* the current p has no shift on "error", pop stack */ + if yyDebug >= 2 { + __yyfmt__.Printf("error recovery pops state %d\n", yyS[yyp].yys) + } + yyp-- + } + /* there is no state on the stack with an error shift ... abort */ + goto ret1 + + case 3: /* no shift yet; clobber input char */ + if yyDebug >= 2 { + __yyfmt__.Printf("error recovery discards %s\n", yyTokname(yytoken)) + } + if yytoken == yyEofCode { + goto ret1 + } + yyrcvr.char = -1 + yytoken = -1 + goto yynewstate /* try again in the same state */ + } + } + + /* reduction by production yyn */ + if yyDebug >= 2 { + __yyfmt__.Printf("reduce %v in:\n\t%v\n", yyn, yyStatname(yystate)) + } + + yynt := yyn + yypt := yyp + _ = yypt // guard against "declared and not used" + + yyp -= yyR2[yyn] + // yyp is now the index of $0. Perform the default action. Iff the + // reduced production is ε, $1 is possibly out of range. + if yyp+1 >= len(yyS) { + nyys := make([]yySymType, len(yyS)*2) + copy(nyys, yyS) + yyS = nyys + } + yyVAL = yyS[yyp+1] + + /* consult goto table to find next state */ + yyn = yyR1[yyn] + yyg := yyPgo[yyn] + yyj := yyg + yyS[yyp].yys + 1 + + if yyj >= yyLast { + yystate = yyAct[yyg] + } else { + yystate = yyAct[yyj] + if yyChk[yystate] != -yyn { + yystate = yyAct[yyg] + } + } + // dummy call; replaced with literal code + switch yynt { + + case 1: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:236 + { + rootnode = stmt.NewStmtList(yyDollar[1].list) + } + case 2: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:242 + { + yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) + } + case 3: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:243 + { + yyVAL.list = []node.Node{} + } + case 4: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:248 + { + namePart := name.NewNamePart(yyDollar[1].token.Value) + positions.AddPosition(namePart, positionBuilder.NewTokenPosition(yyDollar[1].token)) + yyVAL.list = []node.Node{namePart} + comments.AddComments(namePart, yyDollar[1].token.Comments()) + } + case 5: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:255 + { + namePart := name.NewNamePart(yyDollar[3].token.Value) + positions.AddPosition(namePart, positionBuilder.NewTokenPosition(yyDollar[3].token)) + yyVAL.list = append(yyDollar[1].list, namePart) + comments.AddComments(namePart, yyDollar[3].token.Comments()) + } + case 6: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:265 + { + yyVAL.node = yyDollar[1].node + } + case 7: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:267 + { + yyVAL.node = yyDollar[1].node + } + case 8: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:269 + { + yyVAL.node = yyDollar[1].node + } + case 9: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:271 + { + yyVAL.node = stmt.NewHaltCompiler() + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 10: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:277 + { + name := name.NewName(yyDollar[2].list) + positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[2].list)) + yyVAL.node = stmt.NewNamespace(name, nil) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) + + comments.AddComments(name, ListGetFirstNodeComments(yyDollar[2].list)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 11: + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:287 + { + name := name.NewName(yyDollar[2].list) + positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[2].list)) + yyVAL.node = stmt.NewNamespace(name, yyDollar[4].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[5].token)) + + comments.AddComments(name, ListGetFirstNodeComments(yyDollar[2].list)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 12: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:297 + { + yyVAL.node = stmt.NewNamespace(nil, yyDollar[3].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 13: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:303 + { + yyVAL.node = stmt.NewUseList(nil, yyDollar[2].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 14: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:309 + { + useType := node.NewIdentifier(yyDollar[2].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[2].token)) + comments.AddComments(yyVAL.node, yyDollar[2].token.Comments()) + + yyVAL.node = stmt.NewUseList(useType, yyDollar[3].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 15: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:319 + { + useType := node.NewIdentifier(yyDollar[2].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[2].token)) + comments.AddComments(yyVAL.node, yyDollar[2].token.Comments()) + + yyVAL.node = stmt.NewUseList(useType, yyDollar[3].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 16: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:329 + { + yyVAL.node = yyDollar[1].node + } + case 17: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:334 + { + yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) + } + case 18: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:336 + { + yyVAL.list = []node.Node{yyDollar[1].node} + } + case 19: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:341 + { + name := name.NewName(yyDollar[1].list) + positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[1].list)) + yyVAL.node = stmt.NewUse(nil, name, nil) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeListPosition(yyDollar[1].list)) + + comments.AddComments(name, ListGetFirstNodeComments(yyDollar[1].list)) + comments.AddComments(yyVAL.node, ListGetFirstNodeComments(yyDollar[1].list)) + } + case 20: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:351 + { + name := name.NewName(yyDollar[1].list) + positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[1].list)) + alias := node.NewIdentifier(yyDollar[3].token.Value) + positions.AddPosition(alias, positionBuilder.NewTokenPosition(yyDollar[3].token)) + yyVAL.node = stmt.NewUse(nil, name, alias) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeListTokenPosition(yyDollar[1].list, yyDollar[3].token)) + + comments.AddComments(name, ListGetFirstNodeComments(yyDollar[1].list)) + comments.AddComments(alias, yyDollar[3].token.Comments()) + comments.AddComments(yyVAL.node, ListGetFirstNodeComments(yyDollar[1].list)) + } + case 21: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:364 + { + name := name.NewName(yyDollar[2].list) + positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[2].list)) + yyVAL.node = stmt.NewUse(nil, name, nil) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeListPosition(yyDollar[2].list)) + + comments.AddComments(name, ListGetFirstNodeComments(yyDollar[2].list)) + comments.AddComments(yyVAL.node, ListGetFirstNodeComments(yyDollar[2].list)) + } + case 22: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:374 + { + name := name.NewName(yyDollar[2].list) + positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[2].list)) + alias := node.NewIdentifier(yyDollar[4].token.Value) + positions.AddPosition(alias, positionBuilder.NewTokenPosition(yyDollar[4].token)) + yyVAL.node = stmt.NewUse(nil, name, alias) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeListTokenPosition(yyDollar[2].list, yyDollar[4].token)) + + comments.AddComments(name, ListGetFirstNodeComments(yyDollar[2].list)) + comments.AddComments(alias, yyDollar[4].token.Comments()) + comments.AddComments(yyVAL.node, ListGetFirstNodeComments(yyDollar[2].list)) + } + case 23: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:390 + { + yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) + } + case 24: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:392 + { + yyVAL.list = []node.Node{yyDollar[1].node} + } + case 25: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:397 + { + name := name.NewName(yyDollar[1].list) + positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[1].list)) + yyVAL.node = stmt.NewUse(nil, name, nil) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeListPosition(yyDollar[1].list)) + + comments.AddComments(name, ListGetFirstNodeComments(yyDollar[1].list)) + comments.AddComments(yyVAL.node, ListGetFirstNodeComments(yyDollar[1].list)) + } + case 26: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:407 + { + name := name.NewName(yyDollar[1].list) + positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[1].list)) + alias := node.NewIdentifier(yyDollar[3].token.Value) + positions.AddPosition(alias, positionBuilder.NewTokenPosition(yyDollar[3].token)) + yyVAL.node = stmt.NewUse(nil, name, alias) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeListTokenPosition(yyDollar[1].list, yyDollar[3].token)) + + comments.AddComments(name, ListGetFirstNodeComments(yyDollar[1].list)) + comments.AddComments(alias, yyDollar[3].token.Comments()) + comments.AddComments(yyVAL.node, ListGetFirstNodeComments(yyDollar[1].list)) + } + case 27: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:420 + { + name := name.NewName(yyDollar[2].list) + positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[2].list)) + yyVAL.node = stmt.NewUse(nil, name, nil) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeListPosition(yyDollar[2].list)) + + comments.AddComments(name, ListGetFirstNodeComments(yyDollar[2].list)) + comments.AddComments(yyVAL.node, ListGetFirstNodeComments(yyDollar[2].list)) + } + case 28: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:430 + { + name := name.NewName(yyDollar[2].list) + positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[2].list)) + alias := node.NewIdentifier(yyDollar[4].token.Value) + positions.AddPosition(alias, positionBuilder.NewTokenPosition(yyDollar[4].token)) + yyVAL.node = stmt.NewUse(nil, name, alias) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeListTokenPosition(yyDollar[2].list, yyDollar[4].token)) + + comments.AddComments(name, ListGetFirstNodeComments(yyDollar[2].list)) + comments.AddComments(alias, yyDollar[4].token.Comments()) + comments.AddComments(yyVAL.node, ListGetFirstNodeComments(yyDollar[2].list)) + } + case 29: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:446 + { + yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) + } + case 30: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:448 + { + yyVAL.list = []node.Node{yyDollar[1].node} + } + case 31: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:453 + { + name := name.NewName(yyDollar[1].list) + positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[1].list)) + yyVAL.node = stmt.NewUse(nil, name, nil) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeListPosition(yyDollar[1].list)) + + comments.AddComments(name, ListGetFirstNodeComments(yyDollar[1].list)) + comments.AddComments(yyVAL.node, ListGetFirstNodeComments(yyDollar[1].list)) + } + case 32: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:463 + { + name := name.NewName(yyDollar[1].list) + positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[1].list)) + alias := node.NewIdentifier(yyDollar[3].token.Value) + positions.AddPosition(alias, positionBuilder.NewTokenPosition(yyDollar[3].token)) + yyVAL.node = stmt.NewUse(nil, name, alias) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeListTokenPosition(yyDollar[1].list, yyDollar[3].token)) + + comments.AddComments(name, ListGetFirstNodeComments(yyDollar[1].list)) + comments.AddComments(alias, yyDollar[3].token.Comments()) + comments.AddComments(yyVAL.node, ListGetFirstNodeComments(yyDollar[1].list)) + } + case 33: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:476 + { + name := name.NewName(yyDollar[2].list) + positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[2].list)) + yyVAL.node = stmt.NewUse(nil, name, nil) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeListPosition(yyDollar[2].list)) + + comments.AddComments(name, ListGetFirstNodeComments(yyDollar[2].list)) + comments.AddComments(yyVAL.node, ListGetFirstNodeComments(yyDollar[2].list)) + } + case 34: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:486 + { + name := name.NewName(yyDollar[2].list) + positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[2].list)) + alias := node.NewIdentifier(yyDollar[4].token.Value) + positions.AddPosition(alias, positionBuilder.NewTokenPosition(yyDollar[4].token)) + yyVAL.node = stmt.NewUse(nil, name, alias) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeListTokenPosition(yyDollar[2].list, yyDollar[4].token)) + + comments.AddComments(name, ListGetFirstNodeComments(yyDollar[2].list)) + comments.AddComments(alias, yyDollar[4].token.Comments()) + comments.AddComments(yyVAL.node, ListGetFirstNodeComments(yyDollar[2].list)) + } + case 35: + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:502 + { + name := node.NewIdentifier(yyDollar[3].token.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[3].token)) + comments.AddComments(name, yyDollar[3].token.Comments()) + + constant := stmt.NewConstant(name, yyDollar[5].node, "") + positions.AddPosition(constant, positionBuilder.NewTokenNodePosition(yyDollar[3].token, yyDollar[5].node)) + comments.AddComments(constant, yyDollar[3].token.Comments()) + + constList := yyDollar[1].node.(*stmt.ConstList) + constList.Consts = append(constList.Consts, constant) + + yyVAL.node = yyDollar[1].node + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeNodeListPosition(yyDollar[1].node, constList.Consts)) + } + case 36: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:518 + { + name := node.NewIdentifier(yyDollar[2].token.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[2].token)) + comments.AddComments(name, yyDollar[2].token.Comments()) + + constant := stmt.NewConstant(name, yyDollar[4].node, "") + positions.AddPosition(constant, positionBuilder.NewTokenNodePosition(yyDollar[2].token, yyDollar[4].node)) + comments.AddComments(constant, yyDollar[2].token.Comments()) + + constList := []node.Node{constant} + + yyVAL.node = stmt.NewConstList(constList) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, constList)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 37: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:537 + { + yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) + } + case 38: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:539 + { + yyVAL.list = []node.Node{} + } + case 39: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:545 + { + yyVAL.node = yyDollar[1].node + } + case 40: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:547 + { + yyVAL.node = yyDollar[1].node + } + case 41: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:549 + { + yyVAL.node = yyDollar[1].node + } + case 42: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:551 + { + yyVAL.node = stmt.NewHaltCompiler() + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 43: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:561 + { + yyVAL.node = yyDollar[1].node + } + case 44: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:563 + { + label := node.NewIdentifier(yyDollar[1].token.Value) + positions.AddPosition(label, positionBuilder.NewTokenPosition(yyDollar[1].token)) + yyVAL.node = stmt.NewLabel(label) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) + + comments.AddComments(label, yyDollar[1].token.Comments()) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 45: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:576 + { + yyVAL.node = stmt.NewStmtList(yyDollar[2].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 46: + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:582 + { + yyVAL.node = stmt.NewIf(yyDollar[2].node, yyDollar[3].node, yyDollar[4].list, yyDollar[5].node) + + if yyDollar[5].node != nil { + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[5].node)) + } else if len(yyDollar[4].list) > 0 { + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[4].list)) + } else { + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) + } + + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 47: + yyDollar = yyS[yypt-8 : yypt+1] + //line php5/php5.y:596 + { + stmts := stmt.NewStmtList(yyDollar[4].list) + positions.AddPosition(stmts, positionBuilder.NewNodeListPosition(yyDollar[4].list)) + + yyVAL.node = stmt.NewIf(yyDollar[2].node, stmts, yyDollar[5].list, yyDollar[6].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[8].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 48: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:605 + { + yyVAL.node = stmt.NewWhile(yyDollar[1].token, yyDollar[2].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 49: + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:611 + { + yyVAL.node = stmt.NewDo(yyDollar[2].node, yyDollar[4].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[5].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 50: + yyDollar = yyS[yypt-9 : yypt+1] + //line php5/php5.y:617 + { + yyVAL.node = stmt.NewFor(yyDollar[3].list, yyDollar[5].list, yyDollar[7].list, yyDollar[9].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[9].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 51: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:623 + { + yyVAL.node = stmt.NewSwitch(yyDollar[1].token, yyDollar[2].node, yyDollar[3].nodesWithEndToken.nodes) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].nodesWithEndToken.endToken)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 52: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:629 + { + yyVAL.node = stmt.NewBreak(nil) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 53: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:635 + { + yyVAL.node = stmt.NewBreak(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 54: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:641 + { + yyVAL.node = stmt.NewContinue(nil) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 55: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:647 + { + yyVAL.node = stmt.NewContinue(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 56: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:653 + { + yyVAL.node = stmt.NewReturn(nil) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 57: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:659 + { + yyVAL.node = stmt.NewReturn(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 58: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:665 + { + yyVAL.node = stmt.NewReturn(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 59: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:671 + { + yyVAL.node = yyDollar[1].node + } + case 60: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:673 + { + yyVAL.node = stmt.NewGlobal(yyDollar[2].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 61: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:679 + { + yyVAL.node = stmt.NewStatic(yyDollar[2].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 62: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:685 + { + yyVAL.node = stmt.NewEcho(yyDollar[2].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 63: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:691 + { + yyVAL.node = stmt.NewInlineHtml(yyDollar[1].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 64: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:697 + { + yyVAL.node = yyDollar[1].node + } + case 65: + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:699 + { + yyVAL.node = stmt.NewUnset(yyDollar[3].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[5].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 66: + yyDollar = yyS[yypt-8 : yypt+1] + //line php5/php5.y:705 + { + if yyDollar[6].foreachVariable.node == nil { + yyVAL.node = stmt.NewForeach(yyDollar[3].node, nil, yyDollar[5].foreachVariable.node, yyDollar[8].node, yyDollar[5].foreachVariable.byRef) + } else { + yyVAL.node = stmt.NewForeach(yyDollar[3].node, yyDollar[5].foreachVariable.node, yyDollar[6].foreachVariable.node, yyDollar[8].node, yyDollar[6].foreachVariable.byRef) + } + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[8].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 67: + yyDollar = yyS[yypt-8 : yypt+1] + //line php5/php5.y:715 + { + if yyDollar[6].foreachVariable.node == nil { + yyVAL.node = stmt.NewForeach(yyDollar[3].node, nil, yyDollar[5].foreachVariable.node, yyDollar[8].node, yyDollar[5].foreachVariable.byRef) + } else { + yyVAL.node = stmt.NewForeach(yyDollar[3].node, yyDollar[5].foreachVariable.node, yyDollar[6].foreachVariable.node, yyDollar[8].node, yyDollar[6].foreachVariable.byRef) + } + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[8].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 68: + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:725 + { + yyVAL.node = stmt.NewDeclare(yyDollar[3].list, yyDollar[5].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[5].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 69: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:731 + { + yyVAL.node = stmt.NewNop() + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 70: + yyDollar = yyS[yypt-6 : yypt+1] + //line php5/php5.y:737 + { + yyVAL.node = stmt.NewTry(yyDollar[3].list, yyDollar[5].list, yyDollar[6].node) + + if yyDollar[6].node == nil { + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[5].list)) + } else { + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[6].node)) + } + + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 71: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:749 + { + yyVAL.node = stmt.NewThrow(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 72: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:755 + { + label := node.NewIdentifier(yyDollar[2].token.Value) + positions.AddPosition(label, positionBuilder.NewTokenPosition(yyDollar[2].token)) + yyVAL.node = stmt.NewGoto(label) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) + + comments.AddComments(label, yyDollar[2].token.Comments()) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 73: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:768 + { + yyVAL.list = []node.Node{} + } + case 74: + yyDollar = yyS[yypt-9 : yypt+1] + //line php5/php5.y:770 + { + identifier := node.NewIdentifier(yyDollar[4].token.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[4].token)) + comments.AddComments(identifier, yyDollar[4].token.Comments()) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[4].token)) + comments.AddComments(variable, yyDollar[4].token.Comments()) + + catch := stmt.NewCatch([]node.Node{yyDollar[3].node}, variable, yyDollar[7].list) + positions.AddPosition(catch, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[8].token)) + comments.AddComments(catch, yyDollar[1].token.Comments()) + + yyVAL.list = append([]node.Node{catch}, yyDollar[9].list...) + } + case 75: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:788 + { + yyVAL.node = nil + } + case 76: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:790 + { + yyVAL.node = stmt.NewFinally(yyDollar[3].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 77: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:799 + { + yyVAL.list = yyDollar[1].list + } + case 78: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:801 + { + yyVAL.list = []node.Node{} + } + case 79: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:806 + { + yyVAL.list = []node.Node{yyDollar[1].node} + } + case 80: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:808 + { + yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) + } + case 81: + yyDollar = yyS[yypt-8 : yypt+1] + //line php5/php5.y:813 + { + identifier := node.NewIdentifier(yyDollar[4].token.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[4].token)) + comments.AddComments(identifier, yyDollar[4].token.Comments()) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[4].token)) + comments.AddComments(variable, yyDollar[4].token.Comments()) + + yyVAL.node = stmt.NewCatch([]node.Node{yyDollar[3].node}, variable, yyDollar[7].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[8].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 82: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:830 + { + yyVAL.list = []node.Node{yyDollar[1].node} + } + case 83: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:832 + { + yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) + } + case 84: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:837 + { + yyVAL.node = yyDollar[1].node + } + case 85: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:842 + { + yyVAL.node = yyDollar[1].node + } + case 86: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:847 + { + yyVAL.node = yyDollar[1].node + } + case 87: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:852 + { + yyVAL.boolWithToken = boolWithToken{false, nil} + } + case 88: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:854 + { + yyVAL.boolWithToken = boolWithToken{true, &yyDollar[1].token} + } + case 89: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:859 + { + yyVAL.boolWithToken = boolWithToken{false, nil} + } + case 90: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:861 + { + yyVAL.boolWithToken = boolWithToken{true, &yyDollar[1].token} + } + case 91: + yyDollar = yyS[yypt-9 : yypt+1] + //line php5/php5.y:866 + { + name := node.NewIdentifier(yyDollar[3].token.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[3].token)) + comments.AddComments(name, yyDollar[3].token.Comments()) + + yyVAL.node = stmt.NewFunction(name, yyDollar[2].boolWithToken.value, yyDollar[5].list, nil, yyDollar[8].list, "") + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[9].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 92: + yyDollar = yyS[yypt-7 : yypt+1] + //line php5/php5.y:879 + { + switch n := yyDollar[1].node.(type) { + case *stmt.Class: + name := node.NewIdentifier(yyDollar[2].token.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[2].token)) + n.ClassName = name + n.Stmts = yyDollar[6].list + n.Extends = yyDollar[3].node + n.Implements = yyDollar[4].list + + case *stmt.Trait: + // TODO: is it possible that trait extend or implement + name := node.NewIdentifier(yyDollar[2].token.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[2].token)) + n.TraitName = name + n.Stmts = yyDollar[6].list + } + + yyVAL.node = yyDollar[1].node + } + case 93: + yyDollar = yyS[yypt-6 : yypt+1] + //line php5/php5.y:900 + { + name := node.NewIdentifier(yyDollar[2].token.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[2].token)) + comments.AddComments(name, yyDollar[2].token.Comments()) + + yyVAL.node = stmt.NewInterface(name, yyDollar[3].list, yyDollar[5].list, "") + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[6].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 94: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:914 + { + yyVAL.node = stmt.NewClass(nil, nil, nil, nil, nil, nil, "") + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 95: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:920 + { + classModifier := node.NewIdentifier(yyDollar[1].token.Value) + positions.AddPosition(classModifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(classModifier, yyDollar[1].token.Comments()) + + yyVAL.node = stmt.NewClass(nil, []node.Node{classModifier}, nil, nil, nil, nil, "") + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 96: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:930 + { + yyVAL.node = stmt.NewTrait(nil, nil, "") + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 97: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:936 + { + classModifier := node.NewIdentifier(yyDollar[1].token.Value) + positions.AddPosition(classModifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(classModifier, yyDollar[1].token.Comments()) + + yyVAL.node = stmt.NewClass(nil, []node.Node{classModifier}, nil, nil, nil, nil, "") + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 98: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:949 + { + yyVAL.node = nil + } + case 99: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:951 + { + yyVAL.node = yyDollar[2].node + } + case 100: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:956 + { + yyVAL.token = yyDollar[1].token + } + case 101: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:961 + { + yyVAL.list = nil + } + case 102: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:963 + { + yyVAL.list = yyDollar[2].list + } + case 103: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:968 + { + yyVAL.list = nil + } + case 104: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:970 + { + yyVAL.list = yyDollar[2].list + } + case 105: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:975 + { + yyVAL.list = []node.Node{yyDollar[1].node} + } + case 106: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:977 + { + yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) + } + case 107: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:982 + { + yyVAL.foreachVariable = foreachVariable{nil, false} + } + case 108: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:984 + { + yyVAL.foreachVariable = yyDollar[2].foreachVariable + } + case 109: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:989 + { + yyVAL.foreachVariable = foreachVariable{yyDollar[1].node, false} + } + case 110: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:991 + { + yyVAL.foreachVariable = foreachVariable{yyDollar[2].node, true} + } + case 111: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:993 + { + list := expr.NewList(yyDollar[3].list) + positions.AddPosition(list, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) + yyVAL.foreachVariable = foreachVariable{list, false} + comments.AddComments(list, yyDollar[1].token.Comments()) + } + case 112: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1003 + { + yyVAL.node = yyDollar[1].node + } + case 113: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1005 + { + yyVAL.node = stmt.NewStmtList(yyDollar[2].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 114: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1015 + { + yyVAL.node = yyDollar[1].node + } + case 115: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1017 + { + yyVAL.node = stmt.NewStmtList(yyDollar[2].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 116: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1027 + { + yyVAL.node = yyDollar[1].node + } + case 117: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1029 + { + yyVAL.node = stmt.NewStmtList(yyDollar[2].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 118: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1039 + { + name := node.NewIdentifier(yyDollar[1].token.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(name, yyDollar[1].token.Comments()) + + constant := stmt.NewConstant(name, yyDollar[3].node, "") + positions.AddPosition(constant, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) + comments.AddComments(constant, yyDollar[1].token.Comments()) + + yyVAL.list = []node.Node{constant} + } + case 119: + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:1051 + { + name := node.NewIdentifier(yyDollar[3].token.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[3].token)) + comments.AddComments(name, yyDollar[3].token.Comments()) + + constant := stmt.NewConstant(name, yyDollar[5].node, "") + positions.AddPosition(constant, positionBuilder.NewTokenNodePosition(yyDollar[3].token, yyDollar[5].node)) + comments.AddComments(constant, yyDollar[3].token.Comments()) + + yyVAL.list = append(yyDollar[1].list, constant) + } + case 120: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1067 + { + yyVAL.nodesWithEndToken = &nodesWithEndToken{yyDollar[2].list, yyDollar[3].token} + } + case 121: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1069 + { + yyVAL.nodesWithEndToken = &nodesWithEndToken{yyDollar[3].list, yyDollar[4].token} + } + case 122: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1071 + { + yyVAL.nodesWithEndToken = &nodesWithEndToken{yyDollar[2].list, yyDollar[4].token} + } + case 123: + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:1073 + { + yyVAL.nodesWithEndToken = &nodesWithEndToken{yyDollar[3].list, yyDollar[5].token} + } + case 124: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:1079 + { + yyVAL.list = []node.Node{} + } + case 125: + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:1081 + { + _case := stmt.NewCase(yyDollar[3].node, yyDollar[5].list) + positions.AddPosition(_case, positionBuilder.NewTokenNodeListPosition(yyDollar[2].token, yyDollar[5].list)) + yyVAL.list = append(yyDollar[1].list, _case) + comments.AddComments(_case, yyDollar[2].token.Comments()) + } + case 126: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1088 + { + _default := stmt.NewDefault(yyDollar[4].list) + positions.AddPosition(_default, positionBuilder.NewTokenNodeListPosition(yyDollar[2].token, yyDollar[4].list)) + yyVAL.list = append(yyDollar[1].list, _default) + comments.AddComments(_default, yyDollar[2].token.Comments()) + } + case 129: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1105 + { + yyVAL.node = yyDollar[1].node + } + case 130: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1107 + { + yyVAL.node = stmt.NewStmtList(yyDollar[2].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) + } + case 131: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:1117 + { + yyVAL.list = []node.Node{} + } + case 132: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1119 + { + _elseIf := stmt.NewElseIf(yyDollar[3].node, yyDollar[4].node) + positions.AddPosition(_elseIf, positionBuilder.NewTokenNodePosition(yyDollar[2].token, yyDollar[4].node)) + comments.AddComments(_elseIf, yyDollar[2].token.Comments()) + + yyVAL.list = append(yyDollar[1].list, _elseIf) + } + case 133: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:1131 + { + yyVAL.list = []node.Node{} + } + case 134: + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:1133 + { + stmts := stmt.NewStmtList(yyDollar[5].list) + positions.AddPosition(stmts, positionBuilder.NewNodeListPosition(yyDollar[5].list)) + + _elseIf := stmt.NewAltElseIf(yyDollar[3].node, stmts) + positions.AddPosition(_elseIf, positionBuilder.NewTokenNodeListPosition(yyDollar[2].token, yyDollar[5].list)) + comments.AddComments(_elseIf, yyDollar[2].token.Comments()) + + yyVAL.list = append(yyDollar[1].list, _elseIf) + } + case 135: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:1148 + { + yyVAL.node = nil + } + case 136: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1150 + { + yyVAL.node = stmt.NewElse(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 137: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:1160 + { + yyVAL.node = nil + } + case 138: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1162 + { + stmts := stmt.NewStmtList(yyDollar[3].list) + positions.AddPosition(stmts, positionBuilder.NewNodeListPosition(yyDollar[3].list)) + + yyVAL.node = stmt.NewAltElse(stmts) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[3].list)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 139: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1175 + { + yyVAL.list = yyDollar[1].list + } + case 140: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:1177 + { + yyVAL.list = nil + } + case 141: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1182 + { + yyVAL.list = []node.Node{yyDollar[1].node} + } + case 142: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1184 + { + yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) + } + case 143: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1189 + { + identifier := node.NewIdentifier(yyDollar[4].token.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[4].token)) + comments.AddComments(yyVAL.node, yyDollar[4].token.Comments()) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[4].token)) + comments.AddComments(yyVAL.node, yyDollar[4].token.Comments()) + + yyVAL.node = node.NewParameter(yyDollar[1].node, variable, nil, yyDollar[2].boolWithToken.value, yyDollar[3].boolWithToken.value) + + if yyDollar[1].node != nil { + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } else if yyDollar[2].boolWithToken.value == true { + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(*yyDollar[2].boolWithToken.token, yyDollar[4].token)) + comments.AddComments(yyVAL.node, yyDollar[2].boolWithToken.token.Comments()) + } else if yyDollar[3].boolWithToken.value == true { + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(*yyDollar[3].boolWithToken.token, yyDollar[4].token)) + comments.AddComments(yyVAL.node, yyDollar[3].boolWithToken.token.Comments()) + } else { + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[4].token)) + comments.AddComments(yyVAL.node, yyDollar[4].token.Comments()) + } + } + case 144: + yyDollar = yyS[yypt-6 : yypt+1] + //line php5/php5.y:1215 + { + identifier := node.NewIdentifier(yyDollar[4].token.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[4].token)) + comments.AddComments(identifier, yyDollar[4].token.Comments()) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[4].token)) + comments.AddComments(variable, yyDollar[4].token.Comments()) + + yyVAL.node = node.NewParameter(yyDollar[1].node, variable, yyDollar[6].node, yyDollar[2].boolWithToken.value, yyDollar[3].boolWithToken.value) + + if yyDollar[1].node != nil { + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[6].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } else if yyDollar[2].boolWithToken.value == true { + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(*yyDollar[2].boolWithToken.token, yyDollar[6].node)) + comments.AddComments(yyVAL.node, yyDollar[2].boolWithToken.token.Comments()) + } else if yyDollar[3].boolWithToken.value == true { + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(*yyDollar[3].boolWithToken.token, yyDollar[6].node)) + comments.AddComments(yyVAL.node, yyDollar[3].boolWithToken.token.Comments()) + } else { + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[4].token, yyDollar[6].node)) + comments.AddComments(yyVAL.node, yyDollar[4].token.Comments()) + } + } + case 145: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:1245 + { + yyVAL.node = nil + } + case 146: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1247 + { + yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 147: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1253 + { + yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 148: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1259 + { + yyVAL.node = yyDollar[1].node + } + case 149: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1265 + { + yyVAL.nodesWithEndToken = &nodesWithEndToken{[]node.Node{}, yyDollar[2].token} + } + case 150: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1267 + { + yyVAL.nodesWithEndToken = &nodesWithEndToken{yyDollar[2].list, yyDollar[3].token} + } + case 151: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1269 + { + arg := node.NewArgument(yyDollar[2].node, false, false) + positions.AddPosition(arg, positionBuilder.NewNodePosition(yyDollar[2].node)) + comments.AddComments(arg, comments[yyDollar[2].node]) + + yyVAL.nodesWithEndToken = &nodesWithEndToken{[]node.Node{arg}, yyDollar[3].token} + } + case 152: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1281 + { + yyVAL.list = []node.Node{yyDollar[1].node} + } + case 153: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1283 + { + yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) + } + case 154: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1288 + { + yyVAL.node = node.NewArgument(yyDollar[1].node, false, false) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodePosition(yyDollar[1].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 155: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1294 + { + yyVAL.node = node.NewArgument(yyDollar[1].node, false, false) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodePosition(yyDollar[1].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 156: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1300 + { + yyVAL.node = node.NewArgument(yyDollar[2].node, false, true) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodePosition(yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 157: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1306 + { + yyVAL.node = node.NewArgument(yyDollar[2].node, true, false) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 158: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1315 + { + yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) + } + case 159: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1317 + { + yyVAL.list = []node.Node{yyDollar[1].node} + } + case 160: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1323 + { + name := node.NewIdentifier(yyDollar[1].token.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[1].token)) + yyVAL.node = expr.NewVariable(name) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + + comments.AddComments(name, yyDollar[1].token.Comments()) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 161: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1333 + { + yyVAL.node = expr.NewVariable(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 162: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1339 + { + yyVAL.node = expr.NewVariable(yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 163: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1349 + { + identifier := node.NewIdentifier(yyDollar[3].token.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[3].token)) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[3].token)) + + staticVar := stmt.NewStaticVar(variable, nil) + positions.AddPosition(staticVar, positionBuilder.NewTokenPosition(yyDollar[3].token)) + + yyVAL.list = append(yyDollar[1].list, staticVar) + + comments.AddComments(identifier, yyDollar[3].token.Comments()) + comments.AddComments(variable, yyDollar[3].token.Comments()) + comments.AddComments(staticVar, yyDollar[3].token.Comments()) + } + case 164: + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:1366 + { + identifier := node.NewIdentifier(yyDollar[3].token.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[3].token)) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[3].token)) + + staticVar := stmt.NewStaticVar(variable, yyDollar[5].node) + positions.AddPosition(staticVar, positionBuilder.NewTokenNodePosition(yyDollar[3].token, yyDollar[5].node)) + + yyVAL.list = append(yyDollar[1].list, staticVar) + + comments.AddComments(identifier, yyDollar[3].token.Comments()) + comments.AddComments(variable, yyDollar[3].token.Comments()) + comments.AddComments(staticVar, yyDollar[3].token.Comments()) + } + case 165: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1383 + { + identifier := node.NewIdentifier(yyDollar[1].token.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[1].token)) + + staticVar := stmt.NewStaticVar(variable, nil) + positions.AddPosition(staticVar, positionBuilder.NewTokenPosition(yyDollar[1].token)) + + yyVAL.list = []node.Node{staticVar} + + comments.AddComments(identifier, yyDollar[1].token.Comments()) + comments.AddComments(variable, yyDollar[1].token.Comments()) + comments.AddComments(staticVar, yyDollar[1].token.Comments()) + } + case 166: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1400 + { + identifier := node.NewIdentifier(yyDollar[1].token.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[1].token)) + + staticVar := stmt.NewStaticVar(variable, yyDollar[3].node) + positions.AddPosition(staticVar, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) + + yyVAL.list = []node.Node{staticVar} + + comments.AddComments(identifier, yyDollar[1].token.Comments()) + comments.AddComments(variable, yyDollar[1].token.Comments()) + comments.AddComments(staticVar, yyDollar[1].token.Comments()) + } + case 167: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1422 + { + yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) + } + case 168: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:1424 + { + yyVAL.list = []node.Node{} + } + case 169: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1430 + { + yyVAL.node = stmt.NewPropertyList(yyDollar[1].list, yyDollar[2].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeListTokenPosition(yyDollar[1].list, yyDollar[3].token)) + comments.AddComments(yyVAL.node, ListGetFirstNodeComments(yyDollar[1].list)) + } + case 170: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1436 + { + yyVAL.node = yyDollar[1].node + } + case 171: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1438 + { + yyVAL.node = yyDollar[1].node + } + case 172: + yyDollar = yyS[yypt-8 : yypt+1] + //line php5/php5.y:1440 + { + name := node.NewIdentifier(yyDollar[4].token.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[4].token)) + comments.AddComments(name, yyDollar[4].token.Comments()) + + yyVAL.node = stmt.NewClassMethod(name, yyDollar[1].list, yyDollar[3].boolWithToken.value, yyDollar[6].list, nil, yyDollar[8].nodesWithEndToken.nodes, "") + positions.AddPosition(yyVAL.node, positionBuilder.NewOptionalListTokensPosition(yyDollar[1].list, yyDollar[2].token, yyDollar[8].nodesWithEndToken.endToken)) + comments.AddComments(yyVAL.node, ListGetFirstNodeComments(yyDollar[1].list)) + } + case 173: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1453 + { + yyVAL.node = stmt.NewTraitUse(yyDollar[2].list, yyDollar[3].nodesWithEndToken.nodes) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].nodesWithEndToken.endToken)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 174: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1462 + { + yyVAL.list = []node.Node{yyDollar[1].node} + } + case 175: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1464 + { + yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) + } + case 176: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1469 + { + yyVAL.nodesWithEndToken = &nodesWithEndToken{nil, yyDollar[1].token} + } + case 177: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1471 + { + yyVAL.nodesWithEndToken = &nodesWithEndToken{yyDollar[2].list, yyDollar[3].token} + } + case 178: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:1476 + { + yyVAL.list = nil + } + case 179: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1478 + { + yyVAL.list = yyDollar[1].list + } + case 180: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1483 + { + yyVAL.list = []node.Node{yyDollar[1].node} + } + case 181: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1485 + { + yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) + } + case 182: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1490 + { + yyVAL.node = yyDollar[1].node + } + case 183: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1492 + { + yyVAL.node = yyDollar[1].node + } + case 184: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1497 + { + name := name.NewName(yyDollar[3].list) + positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[3].list)) + yyVAL.node = stmt.NewTraitUsePrecedence(yyDollar[1].node, name) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeNodeListPosition(yyDollar[1].node, yyDollar[3].list)) + + comments.AddComments(name, ListGetFirstNodeComments(yyDollar[3].list)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 185: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1510 + { + yyVAL.list = []node.Node{yyDollar[1].node} + } + case 186: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1512 + { + yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) + } + case 187: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1517 + { + name := node.NewIdentifier(yyDollar[1].token.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(name, yyDollar[1].token.Comments()) + + yyVAL.node = stmt.NewTraitMethodRef(nil, name) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 188: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1527 + { + yyVAL.node = yyDollar[1].node + } + case 189: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1532 + { + target := node.NewIdentifier(yyDollar[3].token.Value) + positions.AddPosition(target, positionBuilder.NewTokenPosition(yyDollar[3].token)) + comments.AddComments(target, yyDollar[3].token.Comments()) + + yyVAL.node = stmt.NewTraitMethodRef(yyDollar[1].node, target) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 190: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1545 + { + alias := node.NewIdentifier(yyDollar[4].token.Value) + positions.AddPosition(alias, positionBuilder.NewTokenPosition(yyDollar[4].token)) + yyVAL.node = stmt.NewTraitUseAlias(yyDollar[1].node, yyDollar[3].node, alias) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) + + comments.AddComments(alias, yyDollar[4].token.Comments()) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 191: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1555 + { + yyVAL.node = stmt.NewTraitUseAlias(yyDollar[1].node, yyDollar[3].node, nil) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 192: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:1564 + { + yyVAL.node = nil + } + case 193: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1566 + { + yyVAL.node = yyDollar[1].node + } + case 194: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1571 + { + yyVAL.nodesWithEndToken = &nodesWithEndToken{nil, yyDollar[1].token} + } + case 195: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1573 + { + yyVAL.nodesWithEndToken = &nodesWithEndToken{yyDollar[2].list, yyDollar[3].token} + } + case 196: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1578 + { + yyVAL.list = yyDollar[1].list + } + case 197: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1580 + { + modifier := node.NewIdentifier(yyDollar[1].token.Value) + positions.AddPosition(modifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(modifier, yyDollar[1].token.Comments()) + + yyVAL.list = []node.Node{modifier} + } + case 198: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:1591 + { + yyVAL.list = nil + } + case 199: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1593 + { + yyVAL.list = yyDollar[1].list + } + case 200: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1598 + { + yyVAL.list = []node.Node{yyDollar[1].node} + } + case 201: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1600 + { + yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) + } + case 202: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1605 + { + yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 203: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1611 + { + yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 204: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1617 + { + yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 205: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1623 + { + yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 206: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1629 + { + yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 207: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1635 + { + yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 208: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1644 + { + identifier := node.NewIdentifier(yyDollar[3].token.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[3].token)) + comments.AddComments(identifier, yyDollar[3].token.Comments()) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[3].token)) + comments.AddComments(variable, yyDollar[3].token.Comments()) + + property := stmt.NewProperty(variable, nil, "") + positions.AddPosition(property, positionBuilder.NewTokenPosition(yyDollar[3].token)) + comments.AddComments(property, yyDollar[3].token.Comments()) + + yyVAL.list = append(yyDollar[1].list, property) + } + case 209: + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:1660 + { + identifier := node.NewIdentifier(yyDollar[3].token.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[3].token)) + comments.AddComments(identifier, yyDollar[3].token.Comments()) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[3].token)) + comments.AddComments(variable, yyDollar[3].token.Comments()) + + property := stmt.NewProperty(variable, yyDollar[5].node, "") + positions.AddPosition(property, positionBuilder.NewTokenNodePosition(yyDollar[3].token, yyDollar[5].node)) + comments.AddComments(property, yyDollar[3].token.Comments()) + + yyVAL.list = append(yyDollar[1].list, property) + } + case 210: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1676 + { + identifier := node.NewIdentifier(yyDollar[1].token.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(identifier, yyDollar[1].token.Comments()) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(variable, yyDollar[1].token.Comments()) + + property := stmt.NewProperty(variable, nil, "") + positions.AddPosition(property, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(property, yyDollar[1].token.Comments()) + + yyVAL.list = []node.Node{property} + } + case 211: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1692 + { + identifier := node.NewIdentifier(yyDollar[1].token.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(identifier, yyDollar[1].token.Comments()) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(variable, yyDollar[1].token.Comments()) + + property := stmt.NewProperty(variable, yyDollar[3].node, "") + positions.AddPosition(property, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node)) + comments.AddComments(property, yyDollar[1].token.Comments()) + + yyVAL.list = []node.Node{property} + } + case 212: + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:1711 + { + name := node.NewIdentifier(yyDollar[3].token.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[3].token)) + comments.AddComments(name, yyDollar[3].token.Comments()) + + constant := stmt.NewConstant(name, yyDollar[5].node, "") + positions.AddPosition(constant, positionBuilder.NewTokenNodePosition(yyDollar[3].token, yyDollar[5].node)) + comments.AddComments(constant, yyDollar[3].token.Comments()) + + yyDollar[1].node.(*stmt.ConstList).Consts = append(yyDollar[1].node.(*stmt.ConstList).Consts, constant) + positions.AddPosition(yyDollar[1].node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[5].node)) + + yyVAL.node = yyDollar[1].node + } + case 213: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1726 + { + name := node.NewIdentifier(yyDollar[2].token.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[2].token)) + comments.AddComments(name, yyDollar[2].token.Comments()) + + constant := stmt.NewConstant(name, yyDollar[4].node, "") + positions.AddPosition(constant, positionBuilder.NewTokenNodePosition(yyDollar[2].token, yyDollar[4].node)) + comments.AddComments(constant, yyDollar[2].token.Comments()) + + yyVAL.node = stmt.NewClassConstList(nil, []node.Node{constant}) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[4].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 214: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1743 + { + yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) + } + case 215: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1745 + { + yyVAL.list = []node.Node{yyDollar[1].node} + } + case 216: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:1751 + { + yyVAL.list = nil + } + case 217: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1753 + { + yyVAL.list = yyDollar[1].list + } + case 218: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1758 + { + yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) + } + case 219: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1760 + { + yyVAL.list = []node.Node{yyDollar[1].node} + } + case 220: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1765 + { + yyVAL.list = append(yyDollar[1].list, yyDollar[2].list...) + } + case 221: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1767 + { + yyVAL.list = yyDollar[1].list + } + case 222: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1772 + { + fetch := expr.NewArrayDimFetch(nil, yyDollar[3].node) + positions.AddPosition(fetch, positionBuilder.NewNodePosition(yyDollar[3].node)) + + yyVAL.list = append(yyDollar[1].list, fetch) + } + case 223: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1779 + { + fetch := expr.NewArrayDimFetch(nil, yyDollar[2].node) + positions.AddPosition(fetch, positionBuilder.NewNodePosition(yyDollar[2].node)) + + yyVAL.list = []node.Node{fetch} + } + case 224: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1789 + { + yyVAL.list = append(yyDollar[1].list, yyDollar[2].list...) + } + case 225: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1791 + { + yyVAL.list = yyDollar[1].list + } + case 226: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1793 + { + yyVAL.list = yyDollar[1].list + } + case 227: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:1798 + { + yyVAL.list = nil + } + case 228: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:1800 + { + yyVAL.list = yyDollar[1].list + } + case 229: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1805 + { + if yyDollar[3].nodesWithEndToken != nil { + yyVAL.node = expr.NewNew(yyDollar[2].node, yyDollar[3].nodesWithEndToken.nodes) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].nodesWithEndToken.endToken)) + } else { + yyVAL.node = expr.NewNew(yyDollar[2].node, nil) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + } + + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 230: + yyDollar = yyS[yypt-6 : yypt+1] + //line php5/php5.y:1820 + { + list := expr.NewList(yyDollar[3].list) + positions.AddPosition(list, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) + yyVAL.node = assign_op.NewAssign(list, yyDollar[6].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[6].node)) + + comments.AddComments(list, yyDollar[1].token.Comments()) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 231: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1830 + { + yyVAL.node = assign_op.NewAssign(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 232: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:1836 + { + yyVAL.node = assign_op.NewAssignRef(yyDollar[1].node, yyDollar[4].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 233: + yyDollar = yyS[yypt-6 : yypt+1] + //line php5/php5.y:1842 + { + _new := expr.NewNew(yyDollar[5].node, nil) + positions.AddPosition(_new, positionBuilder.NewTokenNodePosition(yyDollar[4].token, yyDollar[5].node)) + + if yyDollar[6].nodesWithEndToken != nil { + _new := expr.NewNew(yyDollar[5].node, yyDollar[6].nodesWithEndToken.nodes) + positions.AddPosition(_new, positionBuilder.NewTokensPosition(yyDollar[4].token, yyDollar[6].nodesWithEndToken.endToken)) + } + comments.AddComments(_new, comments[yyDollar[1].node]) + + yyVAL.node = assign_op.NewAssignRef(yyDollar[1].node, _new) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, _new)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 234: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1857 + { + yyVAL.node = expr.NewClone(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 235: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1863 + { + yyVAL.node = assign_op.NewPlus(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 236: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1869 + { + yyVAL.node = assign_op.NewMinus(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 237: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1875 + { + yyVAL.node = assign_op.NewMul(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 238: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1881 + { + yyVAL.node = assign_op.NewPow(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 239: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1887 + { + yyVAL.node = assign_op.NewDiv(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 240: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1893 + { + yyVAL.node = assign_op.NewConcat(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 241: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1899 + { + yyVAL.node = assign_op.NewMod(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 242: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1905 + { + yyVAL.node = assign_op.NewBitwiseAnd(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 243: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1911 + { + yyVAL.node = assign_op.NewBitwiseOr(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 244: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1917 + { + yyVAL.node = assign_op.NewBitwiseXor(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 245: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1923 + { + yyVAL.node = assign_op.NewShiftLeft(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 246: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1929 + { + yyVAL.node = assign_op.NewShiftRight(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 247: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1935 + { + yyVAL.node = expr.NewPostInc(yyDollar[1].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 248: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1941 + { + yyVAL.node = expr.NewPreInc(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 249: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1947 + { + yyVAL.node = expr.NewPostDec(yyDollar[1].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 250: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:1953 + { + yyVAL.node = expr.NewPreDec(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 251: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1959 + { + yyVAL.node = binary_op.NewBooleanOr(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 252: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1965 + { + yyVAL.node = binary_op.NewBooleanAnd(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 253: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1971 + { + yyVAL.node = binary_op.NewLogicalOr(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 254: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1977 + { + yyVAL.node = binary_op.NewLogicalAnd(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 255: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1983 + { + yyVAL.node = binary_op.NewLogicalXor(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 256: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1989 + { + yyVAL.node = binary_op.NewBitwiseOr(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 257: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:1995 + { + yyVAL.node = binary_op.NewBitwiseAnd(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 258: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2001 + { + yyVAL.node = binary_op.NewBitwiseXor(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 259: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2007 + { + yyVAL.node = binary_op.NewConcat(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 260: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2013 + { + yyVAL.node = binary_op.NewPlus(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 261: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2019 + { + yyVAL.node = binary_op.NewMinus(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 262: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2025 + { + yyVAL.node = binary_op.NewMul(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 263: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2031 + { + yyVAL.node = binary_op.NewPow(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 264: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2037 + { + yyVAL.node = binary_op.NewDiv(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 265: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2043 + { + yyVAL.node = binary_op.NewMod(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 266: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2049 + { + yyVAL.node = binary_op.NewShiftLeft(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 267: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2055 + { + yyVAL.node = binary_op.NewShiftRight(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 268: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2061 + { + yyVAL.node = expr.NewUnaryPlus(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 269: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2067 + { + yyVAL.node = expr.NewUnaryMinus(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 270: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2073 + { + yyVAL.node = expr.NewBooleanNot(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 271: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2079 + { + yyVAL.node = expr.NewBitwiseNot(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 272: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2085 + { + yyVAL.node = binary_op.NewIdentical(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 273: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2091 + { + yyVAL.node = binary_op.NewNotIdentical(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 274: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2097 + { + yyVAL.node = binary_op.NewEqual(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 275: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2103 + { + yyVAL.node = binary_op.NewNotEqual(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 276: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2109 + { + yyVAL.node = binary_op.NewSmaller(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 277: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2115 + { + yyVAL.node = binary_op.NewSmallerOrEqual(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 278: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2121 + { + yyVAL.node = binary_op.NewGreater(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 279: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2127 + { + yyVAL.node = binary_op.NewGreaterOrEqual(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 280: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2133 + { + yyVAL.node = expr.NewInstanceOf(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 281: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2139 + { + yyVAL.node = yyDollar[1].node + } + case 282: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2141 + { + yyVAL.node = yyDollar[1].node + } + case 283: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:2143 + { + yyVAL.node = yyDollar[2].node + + for _, n := range yyDollar[4].list { + switch nn := n.(type) { + case *expr.ArrayDimFetch: + nn.Variable = yyVAL.node + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyVAL.node, nn)) + comments.AddComments(nn, yyDollar[1].token.Comments()) + yyVAL.node = nn + + case *expr.PropertyFetch: + nn.Variable = yyVAL.node + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyVAL.node, nn)) + comments.AddComments(nn, yyDollar[1].token.Comments()) + yyVAL.node = nn + + case *expr.MethodCall: + nn.Variable = yyVAL.node + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyVAL.node, nn)) + comments.AddComments(nn, yyDollar[1].token.Comments()) + yyVAL.node = nn + } + } + } + case 284: + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:2169 + { + yyVAL.node = expr.NewTernary(yyDollar[1].node, yyDollar[3].node, yyDollar[5].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[5].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 285: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:2175 + { + yyVAL.node = expr.NewTernary(yyDollar[1].node, nil, yyDollar[4].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 286: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2181 + { + yyVAL.node = yyDollar[1].node + } + case 287: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2183 + { + yyVAL.node = cast.NewCastInt(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 288: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2189 + { + yyVAL.node = cast.NewCastDouble(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 289: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2195 + { + yyVAL.node = cast.NewCastString(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 290: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2201 + { + yyVAL.node = cast.NewCastArray(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 291: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2207 + { + yyVAL.node = cast.NewCastObject(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 292: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2213 + { + yyVAL.node = cast.NewCastBool(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 293: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2219 + { + yyVAL.node = cast.NewCastUnset(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 294: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2225 + { + yyVAL.node = expr.NewExit(yyDollar[2].node, strings.EqualFold(yyDollar[1].token.Value, "die")) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 295: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2231 + { + yyVAL.node = expr.NewErrorSuppress(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 296: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2237 + { + yyVAL.node = yyDollar[1].node + } + case 297: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2239 + { + yyVAL.node = yyDollar[1].node + } + case 298: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2241 + { + yyVAL.node = yyDollar[1].node + } + case 299: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2243 + { + yyVAL.node = expr.NewShellExec(yyDollar[2].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 300: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2249 + { + yyVAL.node = expr.NewPrint(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 301: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2255 + { + yyVAL.node = expr.NewYield(nil, nil) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 302: + yyDollar = yyS[yypt-9 : yypt+1] + //line php5/php5.y:2261 + { + yyVAL.node = expr.NewClosure(yyDollar[4].list, yyDollar[6].list, nil, yyDollar[8].list, false, yyDollar[2].boolWithToken.value, "") + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[9].token)) + + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 303: + yyDollar = yyS[yypt-10 : yypt+1] + //line php5/php5.y:2268 + { + yyVAL.node = expr.NewClosure(yyDollar[5].list, yyDollar[7].list, nil, yyDollar[9].list, true, yyDollar[3].boolWithToken.value, "") + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[10].token)) + + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 304: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2278 + { + yyVAL.node = expr.NewYield(nil, yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 305: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2284 + { + yyVAL.node = expr.NewYield(nil, yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 306: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:2290 + { + yyVAL.node = expr.NewYield(yyDollar[2].node, yyDollar[4].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[4].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 307: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:2296 + { + yyVAL.node = expr.NewYield(yyDollar[2].node, yyDollar[4].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[4].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 308: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:2305 + { + yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 309: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:2311 + { + yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 310: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:2317 + { + str := scalar.NewString(yyDollar[1].token.Value) + positions.AddPosition(str, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(str, yyDollar[1].token.Comments()) + + yyVAL.node = expr.NewArrayDimFetch(str, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(str, yyDollar[4].token)) + comments.AddComments(yyVAL.node, comments[str]) + } + case 311: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:2327 + { + yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 312: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:2336 + { + yyVAL.node = expr.NewArray(yyDollar[3].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 313: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2342 + { + yyVAL.node = expr.NewShortArray(yyDollar[2].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 314: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2351 + { + yyVAL.token = yyDollar[1].token + } + case 315: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:2356 + { + yyVAL.list = []node.Node{} + } + case 316: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:2358 + { + yyVAL.list = yyDollar[3].list + } + case 317: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2363 + { + identifier := node.NewIdentifier(yyDollar[3].token.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[3].token)) + comments.AddComments(identifier, yyDollar[3].token.Comments()) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[3].token)) + comments.AddComments(variable, yyDollar[3].token.Comments()) + + use := expr.NewClusureUse(variable, false) + positions.AddPosition(use, positionBuilder.NewTokenPosition(yyDollar[3].token)) + comments.AddComments(use, yyDollar[3].token.Comments()) + + yyVAL.list = append(yyDollar[1].list, use) + } + case 318: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:2379 + { + identifier := node.NewIdentifier(yyDollar[4].token.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[4].token)) + comments.AddComments(identifier, yyDollar[4].token.Comments()) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[4].token)) + comments.AddComments(variable, yyDollar[3].token.Comments()) + + use := expr.NewClusureUse(variable, true) + positions.AddPosition(use, positionBuilder.NewTokensPosition(yyDollar[3].token, yyDollar[4].token)) + comments.AddComments(use, yyDollar[3].token.Comments()) + + yyVAL.list = append(yyDollar[1].list, use) + } + case 319: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2395 + { + identifier := node.NewIdentifier(yyDollar[1].token.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(identifier, yyDollar[1].token.Comments()) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(variable, yyDollar[1].token.Comments()) + + use := expr.NewClusureUse(variable, false) + positions.AddPosition(use, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(use, yyDollar[1].token.Comments()) + + yyVAL.list = []node.Node{use} + } + case 320: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2411 + { + identifier := node.NewIdentifier(yyDollar[2].token.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[2].token)) + comments.AddComments(identifier, yyDollar[2].token.Comments()) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[2].token)) + comments.AddComments(variable, yyDollar[1].token.Comments()) + + use := expr.NewClusureUse(variable, true) + positions.AddPosition(use, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) + comments.AddComments(use, yyDollar[1].token.Comments()) + + yyVAL.list = []node.Node{use} + } + case 321: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2430 + { + name := name.NewName(yyDollar[1].list) + positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[1].list)) + comments.AddComments(name, ListGetFirstNodeComments(yyDollar[1].list)) + + yyVAL.node = expr.NewFunctionCall(name, yyDollar[2].nodesWithEndToken.nodes) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(name, yyDollar[2].nodesWithEndToken.endToken)) + comments.AddComments(yyVAL.node, comments[name]) + } + case 322: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:2440 + { + funcName := name.NewRelative(yyDollar[3].list) + positions.AddPosition(funcName, positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[3].list)) + comments.AddComments(funcName, yyDollar[1].token.Comments()) + + yyVAL.node = expr.NewFunctionCall(funcName, yyDollar[4].nodesWithEndToken.nodes) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(funcName, yyDollar[4].nodesWithEndToken.endToken)) + comments.AddComments(yyVAL.node, comments[funcName]) + } + case 323: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2450 + { + funcName := name.NewFullyQualified(yyDollar[2].list) + positions.AddPosition(funcName, positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[2].list)) + comments.AddComments(funcName, yyDollar[1].token.Comments()) + + yyVAL.node = expr.NewFunctionCall(funcName, yyDollar[3].nodesWithEndToken.nodes) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(funcName, yyDollar[3].nodesWithEndToken.endToken)) + comments.AddComments(yyVAL.node, comments[funcName]) + } + case 324: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:2460 + { + yyVAL.node = expr.NewStaticCall(yyDollar[1].node, yyDollar[3].node, yyDollar[4].nodesWithEndToken.nodes) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].nodesWithEndToken.endToken)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 325: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:2466 + { + yyVAL.node = expr.NewStaticCall(yyDollar[1].node, yyDollar[3].node, yyDollar[4].nodesWithEndToken.nodes) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].nodesWithEndToken.endToken)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 326: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:2472 + { + yyVAL.node = expr.NewStaticCall(yyDollar[1].node, yyDollar[3].node, yyDollar[4].nodesWithEndToken.nodes) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].nodesWithEndToken.endToken)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 327: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:2478 + { + yyVAL.node = expr.NewStaticCall(yyDollar[1].node, yyDollar[3].node, yyDollar[4].nodesWithEndToken.nodes) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].nodesWithEndToken.endToken)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 328: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2484 + { + yyVAL.node = expr.NewFunctionCall(yyDollar[1].node, yyDollar[2].nodesWithEndToken.nodes) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].nodesWithEndToken.endToken)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 329: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2493 + { + yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 330: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2499 + { + yyVAL.node = name.NewName(yyDollar[1].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeListPosition(yyDollar[1].list)) + comments.AddComments(yyVAL.node, ListGetFirstNodeComments(yyDollar[1].list)) + } + case 331: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2505 + { + yyVAL.node = name.NewRelative(yyDollar[3].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[3].list)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 332: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2511 + { + yyVAL.node = name.NewFullyQualified(yyDollar[2].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[2].list)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 333: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2520 + { + yyVAL.node = name.NewName(yyDollar[1].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeListPosition(yyDollar[1].list)) + comments.AddComments(yyVAL.node, ListGetFirstNodeComments(yyDollar[1].list)) + } + case 334: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2526 + { + yyVAL.node = name.NewRelative(yyDollar[3].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[3].list)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 335: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2532 + { + yyVAL.node = name.NewFullyQualified(yyDollar[2].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[2].list)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 336: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2541 + { + yyVAL.node = yyDollar[1].node + } + case 337: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2543 + { + yyVAL.node = yyDollar[1].node + } + case 338: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:2548 + { + yyVAL.node = yyDollar[1].node + + for _, n := range yyDollar[3].list { + switch nn := n.(type) { + case *expr.ArrayDimFetch: + nn.Variable = yyVAL.node + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyVAL.node, nn)) + comments.AddComments(nn, comments[yyDollar[1].node]) + yyVAL.node = nn + + case *expr.PropertyFetch: + nn.Variable = yyVAL.node + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyVAL.node, nn)) + comments.AddComments(nn, comments[yyDollar[1].node]) + yyVAL.node = nn + + case *expr.MethodCall: + nn.Variable = yyVAL.node + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyVAL.node, nn)) + comments.AddComments(nn, comments[yyDollar[1].node]) + yyVAL.node = nn + } + } + + for _, n := range yyDollar[4].list { + switch nn := n.(type) { + case *expr.ArrayDimFetch: + nn.Variable = yyVAL.node + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyVAL.node, nn)) + comments.AddComments(nn, comments[yyDollar[1].node]) + yyVAL.node = nn + + case *expr.PropertyFetch: + nn.Variable = yyVAL.node + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyVAL.node, nn)) + comments.AddComments(nn, comments[yyDollar[1].node]) + yyVAL.node = nn + + case *expr.MethodCall: + nn.Variable = yyVAL.node + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyVAL.node, nn)) + comments.AddComments(nn, comments[yyDollar[1].node]) + yyVAL.node = nn + } + } + } + case 339: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2596 + { + yyVAL.node = yyDollar[1].node + } + case 340: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2602 + { + yyVAL.list = append(yyDollar[1].list, yyDollar[2].list...) + } + case 341: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:2604 + { + yyVAL.list = []node.Node{} + } + case 342: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2610 + { + yyVAL.list = yyDollar[2].list + } + case 343: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:2615 + { + yyVAL.node = nil + } + case 344: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2617 + { + yyVAL.node = nil + } + case 345: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2619 + { + yyVAL.node = yyDollar[1].node + } + case 346: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:2624 + { + yyVAL.list = []node.Node{} + } + case 347: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2626 + { + yyVAL.list = []node.Node{scalar.NewEncapsedStringPart(yyDollar[1].token.Value)} + } + case 348: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2628 + { + yyVAL.list = yyDollar[1].list + } + case 349: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:2633 + { + yyVAL.nodesWithEndToken = nil + } + case 350: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2635 + { + yyVAL.nodesWithEndToken = yyDollar[1].nodesWithEndToken + } + case 351: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2640 + { + yyVAL.node = scalar.NewLnumber(yyDollar[1].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 352: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2646 + { + yyVAL.node = scalar.NewDnumber(yyDollar[1].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 353: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2652 + { + yyVAL.node = scalar.NewString(yyDollar[1].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 354: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2658 + { + yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 355: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2664 + { + yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 356: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2670 + { + yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 357: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2676 + { + yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 358: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2682 + { + yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 359: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2688 + { + yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 360: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2694 + { + yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 361: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2700 + { + yyVAL.node = scalar.NewString(yyDollar[2].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) /* TODO: mark as Heredoc*/ + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 362: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2705 + { + yyVAL.node = scalar.NewEncapsed(nil) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 363: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2714 + { + target := node.NewIdentifier(yyDollar[3].token.Value) + positions.AddPosition(target, positionBuilder.NewTokenPosition(yyDollar[3].token)) + yyVAL.node = expr.NewClassConstFetch(yyDollar[1].node, target) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) + + comments.AddComments(target, yyDollar[3].token.Comments()) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 364: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2727 + { + yyVAL.node = yyDollar[1].node + } + case 365: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2732 + { + yyVAL.node = yyDollar[1].node + } + case 366: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2734 + { + yyVAL.node = yyDollar[1].node + } + case 367: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2736 + { + yyVAL.node = name.NewName(yyDollar[1].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeListPosition(yyDollar[1].list)) + comments.AddComments(yyVAL.node, ListGetFirstNodeComments(yyDollar[1].list)) + } + case 368: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2742 + { + yyVAL.node = name.NewRelative(yyDollar[3].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[3].list)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 369: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2748 + { + yyVAL.node = name.NewFullyQualified(yyDollar[2].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[2].list)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 370: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:2754 + { + yyVAL.node = expr.NewArray(yyDollar[3].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 371: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2760 + { + yyVAL.node = expr.NewShortArray(yyDollar[2].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 372: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2766 + { + yyVAL.node = yyDollar[1].node + } + case 373: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2768 + { + yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 374: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2774 + { + yyVAL.node = yyDollar[1].node + } + case 375: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:2779 + { + yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 376: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2785 + { + yyVAL.node = binary_op.NewPlus(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 377: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2791 + { + yyVAL.node = binary_op.NewMinus(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 378: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2797 + { + yyVAL.node = binary_op.NewMul(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 379: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2803 + { + yyVAL.node = binary_op.NewPow(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 380: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2809 + { + yyVAL.node = binary_op.NewDiv(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 381: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2815 + { + yyVAL.node = binary_op.NewMod(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 382: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2821 + { + yyVAL.node = expr.NewBooleanNot(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 383: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2827 + { + yyVAL.node = expr.NewBitwiseNot(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 384: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2833 + { + yyVAL.node = binary_op.NewBitwiseOr(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 385: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2839 + { + yyVAL.node = binary_op.NewBitwiseAnd(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 386: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2845 + { + yyVAL.node = binary_op.NewBitwiseXor(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 387: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2851 + { + yyVAL.node = binary_op.NewShiftLeft(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 388: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2857 + { + yyVAL.node = binary_op.NewShiftRight(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 389: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2863 + { + yyVAL.node = binary_op.NewConcat(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 390: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2869 + { + yyVAL.node = binary_op.NewLogicalXor(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 391: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2875 + { + yyVAL.node = binary_op.NewLogicalAnd(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 392: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2881 + { + yyVAL.node = binary_op.NewLogicalOr(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 393: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2887 + { + yyVAL.node = binary_op.NewBooleanAnd(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 394: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2893 + { + yyVAL.node = binary_op.NewBooleanOr(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 395: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2899 + { + yyVAL.node = binary_op.NewIdentical(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 396: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2905 + { + yyVAL.node = binary_op.NewNotIdentical(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 397: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2911 + { + yyVAL.node = binary_op.NewEqual(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 398: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2917 + { + yyVAL.node = binary_op.NewNotEqual(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 399: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2923 + { + yyVAL.node = binary_op.NewSmaller(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 400: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2929 + { + yyVAL.node = binary_op.NewGreater(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 401: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2935 + { + yyVAL.node = binary_op.NewSmallerOrEqual(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 402: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2941 + { + yyVAL.node = binary_op.NewGreaterOrEqual(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 403: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:2947 + { + yyVAL.node = expr.NewTernary(yyDollar[1].node, nil, yyDollar[4].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 404: + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:2953 + { + yyVAL.node = expr.NewTernary(yyDollar[1].node, yyDollar[3].node, yyDollar[5].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[5].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 405: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2959 + { + yyVAL.node = expr.NewUnaryPlus(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 406: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2965 + { + yyVAL.node = expr.NewUnaryMinus(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 407: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2971 + { + yyVAL.node = yyDollar[2].node + } + case 408: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2976 + { + yyVAL.node = yyDollar[1].node + } + case 409: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2978 + { + yyVAL.node = name.NewName(yyDollar[1].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeListPosition(yyDollar[1].list)) + comments.AddComments(yyVAL.node, ListGetFirstNodeComments(yyDollar[1].list)) + } + case 410: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:2984 + { + yyVAL.node = name.NewRelative(yyDollar[3].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[3].list)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 411: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:2990 + { + yyVAL.node = name.NewFullyQualified(yyDollar[2].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[2].list)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 412: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:2999 + { + name := node.NewIdentifier(yyDollar[1].token.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[1].token)) + yyVAL.node = expr.NewVariable(name) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + + comments.AddComments(name, yyDollar[1].token.Comments()) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 413: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3009 + { + yyVAL.node = yyDollar[1].node + } + case 414: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3011 + { + yyVAL.node = yyDollar[1].node + } + case 415: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3013 + { + yyVAL.node = yyDollar[1].node + } + case 416: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:3015 + { + yyVAL.node = scalar.NewEncapsed(yyDollar[2].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 417: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:3021 + { + yyVAL.node = scalar.NewEncapsed(yyDollar[2].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 418: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3027 + { + yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 419: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:3036 + { + yyVAL.list = nil + } + case 420: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:3038 + { + yyVAL.list = yyDollar[1].list + } + case 423: + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:3048 + { + arrayItem := expr.NewArrayItem(yyDollar[3].node, yyDollar[5].node, false) + positions.AddPosition(arrayItem, positionBuilder.NewNodesPosition(yyDollar[3].node, yyDollar[5].node)) + comments.AddComments(arrayItem, comments[yyDollar[3].node]) + + yyVAL.list = append(yyDollar[1].list, arrayItem) + } + case 424: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:3056 + { + arrayItem := expr.NewArrayItem(nil, yyDollar[3].node, false) + positions.AddPosition(arrayItem, positionBuilder.NewNodePosition(yyDollar[3].node)) + comments.AddComments(arrayItem, comments[yyDollar[3].node]) + + yyVAL.list = append(yyDollar[1].list, arrayItem) + } + case 425: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:3064 + { + arrayItem := expr.NewArrayItem(yyDollar[1].node, yyDollar[3].node, false) + positions.AddPosition(arrayItem, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(arrayItem, comments[yyDollar[1].node]) + + yyVAL.list = []node.Node{arrayItem} + } + case 426: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3072 + { + arrayItem := expr.NewArrayItem(nil, yyDollar[1].node, false) + positions.AddPosition(arrayItem, positionBuilder.NewNodePosition(yyDollar[1].node)) + comments.AddComments(arrayItem, comments[yyDollar[1].node]) + + yyVAL.list = []node.Node{arrayItem} + } + case 427: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3083 + { + yyVAL.node = yyDollar[1].node + } + case 428: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3085 + { + yyVAL.node = yyDollar[1].node + } + case 429: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:3090 + { + yyVAL.node = yyDollar[2].node + } + case 430: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:3092 + { + yyVAL.node = yyDollar[2].node + } + case 431: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3098 + { + yyVAL.node = yyDollar[1].node + } + case 432: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3104 + { + yyVAL.node = yyDollar[1].node + } + case 433: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3109 + { + yyVAL.node = yyDollar[1].node + } + case 434: + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:3114 + { + yyVAL.node = yyDollar[1].node + + if yyDollar[4].list != nil { + yyDollar[4].list[0].(*expr.MethodCall).Method = yyDollar[3].list[len(yyDollar[3].list)-1].(*expr.PropertyFetch).Property + yyDollar[3].list = append(yyDollar[3].list[:len(yyDollar[3].list)-1], yyDollar[4].list...) + } + + for _, n := range yyDollar[3].list { + switch nn := n.(type) { + case *expr.ArrayDimFetch: + nn.Variable = yyVAL.node + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyVAL.node, nn)) + comments.AddComments(nn, comments[yyDollar[1].node]) + yyVAL.node = nn + + case *expr.PropertyFetch: + nn.Variable = yyVAL.node + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyVAL.node, nn)) + comments.AddComments(nn, comments[yyDollar[1].node]) + yyVAL.node = nn + + case *expr.MethodCall: + nn.Variable = yyVAL.node + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyVAL.node, nn)) + comments.AddComments(nn, comments[yyDollar[1].node]) + yyVAL.node = nn + } + } + + for _, n := range yyDollar[5].list { + switch nn := n.(type) { + case *expr.ArrayDimFetch: + nn.Variable = yyVAL.node + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyVAL.node, nn)) + comments.AddComments(nn, comments[yyDollar[1].node]) + yyVAL.node = nn + + case *expr.PropertyFetch: + nn.Variable = yyVAL.node + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyVAL.node, nn)) + comments.AddComments(nn, comments[yyDollar[1].node]) + yyVAL.node = nn + + case *expr.MethodCall: + nn.Variable = yyVAL.node + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyVAL.node, nn)) + comments.AddComments(nn, comments[yyDollar[1].node]) + yyVAL.node = nn + } + } + } + case 435: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3167 + { + yyVAL.node = yyDollar[1].node + } + case 436: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:3172 + { + yyVAL.list = append(yyDollar[1].list, yyDollar[2].list...) + } + case 437: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:3174 + { + yyVAL.list = []node.Node{} + } + case 438: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:3180 + { + if yyDollar[3].list != nil { + yyDollar[3].list[0].(*expr.MethodCall).Method = yyDollar[2].list[len(yyDollar[2].list)-1].(*expr.PropertyFetch).Property + yyDollar[2].list = append(yyDollar[2].list[:len(yyDollar[2].list)-1], yyDollar[3].list...) + } + + yyVAL.list = yyDollar[2].list + } + case 439: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:3192 + { + fetch := expr.NewArrayDimFetch(nil, yyDollar[3].node) + positions.AddPosition(fetch, positionBuilder.NewNodePosition(yyDollar[3].node)) + + yyVAL.list = append(yyDollar[1].list, fetch) + } + case 440: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:3199 + { + fetch := expr.NewArrayDimFetch(nil, yyDollar[3].node) + positions.AddPosition(fetch, positionBuilder.NewNodePosition(yyDollar[3].node)) + + yyVAL.list = []node.Node{yyDollar[1].node, fetch} + } + case 441: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3209 + { + yyVAL.node = expr.NewMethodCall(nil, nil, yyDollar[1].nodesWithEndToken.nodes) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeListTokenPosition(yyDollar[1].nodesWithEndToken.nodes, yyDollar[1].nodesWithEndToken.endToken)) + } + case 442: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3217 + { + yyVAL.list = []node.Node{yyDollar[1].node} + } + case 443: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3219 + { + yyVAL.list = yyDollar[1].list + } + case 444: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:3221 + { + yyVAL.list = nil + } + case 445: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3226 + { + yyVAL.node = yyDollar[1].node + } + case 446: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:3228 + { + yyDollar[1].simpleIndirectReference.last.SetVarName(yyDollar[2].node) + + for _, n := range yyDollar[1].simpleIndirectReference.all { + positions[n] = positionBuilder.NewNodesPosition(n, yyDollar[2].node) + } + + yyVAL.node = yyDollar[1].simpleIndirectReference.all[0] + } + case 447: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:3241 + { + yyVAL.node = expr.NewStaticPropertyFetch(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 448: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:3247 + { + yyVAL.node = expr.NewStaticPropertyFetch(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 449: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3257 + { + yyVAL.node = yyDollar[1].node + } + case 450: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:3262 + { + yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 451: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:3268 + { + yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 452: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3276 + { + yyVAL.node = yyDollar[1].node + } + case 453: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3277 + { + yyVAL.node = yyDollar[1].node + } + case 454: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3278 + { + yyVAL.node = yyDollar[1].node + } + case 455: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3284 + { + yyVAL.node = yyDollar[1].node + } + case 456: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:3286 + { + yyDollar[1].simpleIndirectReference.last.SetVarName(yyDollar[2].node) + + for _, n := range yyDollar[1].simpleIndirectReference.all { + positions[n] = positionBuilder.NewNodesPosition(n, yyDollar[2].node) + } + + yyVAL.node = yyDollar[1].simpleIndirectReference.all[0] + } + case 457: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3296 + { + yyVAL.node = yyDollar[1].node + } + case 458: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:3301 + { + yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 459: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:3307 + { + yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 460: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3313 + { + yyVAL.node = yyDollar[1].node + } + case 461: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3319 + { + name := node.NewIdentifier(yyDollar[1].token.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[1].token)) + yyVAL.node = expr.NewVariable(name) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + + comments.AddComments(name, yyDollar[1].token.Comments()) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 462: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:3329 + { + yyVAL.node = expr.NewVariable(yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 463: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:3338 + { + yyVAL.node = nil + } + case 464: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3340 + { + yyVAL.node = yyDollar[1].node + } + case 465: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3346 + { + yyVAL.list = yyDollar[1].list + } + case 466: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3348 + { + fetch := expr.NewPropertyFetch(nil, yyDollar[1].node) + positions.AddPosition(fetch, positionBuilder.NewNodePosition(yyDollar[1].node)) + + yyVAL.list = []node.Node{fetch} + } + case 467: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:3358 + { + fetch := expr.NewArrayDimFetch(nil, yyDollar[3].node) + positions.AddPosition(fetch, positionBuilder.NewNodePosition(yyDollar[3].node)) + + yyVAL.list = append(yyDollar[1].list, fetch) + } + case 468: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:3365 + { + fetch := expr.NewArrayDimFetch(nil, yyDollar[3].node) + positions.AddPosition(fetch, positionBuilder.NewNodePosition(yyDollar[3].node)) + + yyVAL.list = append(yyDollar[1].list, fetch) + } + case 469: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3372 + { + fetch := expr.NewPropertyFetch(nil, yyDollar[1].node) + positions.AddPosition(fetch, positionBuilder.NewNodePosition(yyDollar[1].node)) + + yyVAL.list = []node.Node{fetch} + } + case 470: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3382 + { + yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 471: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:3388 + { + yyVAL.node = yyDollar[2].node + } + case 472: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3393 + { + n := expr.NewVariable(nil) + positions.AddPosition(n, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(n, yyDollar[1].token.Comments()) + + yyVAL.simpleIndirectReference = simpleIndirectReference{[]*expr.Variable{n}, n} + } + case 473: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:3401 + { + n := expr.NewVariable(nil) + positions.AddPosition(n, positionBuilder.NewTokenPosition(yyDollar[2].token)) + comments.AddComments(n, yyDollar[2].token.Comments()) + + yyDollar[1].simpleIndirectReference.last.SetVarName(n) + + yyDollar[1].simpleIndirectReference.all = append(yyDollar[1].simpleIndirectReference.all, n) + yyDollar[1].simpleIndirectReference.last = n + yyVAL.simpleIndirectReference = yyDollar[1].simpleIndirectReference + } + case 474: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:3416 + { + yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) + } + case 475: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3418 + { + yyVAL.list = []node.Node{yyDollar[1].node} + } + case 476: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3424 + { + yyVAL.node = yyDollar[1].node + } + case 477: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:3426 + { + yyVAL.node = expr.NewList(yyDollar[3].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 478: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:3432 + { + yyVAL.node = nil + } + case 479: + yyDollar = yyS[yypt-0 : yypt+1] + //line php5/php5.y:3438 + { + yyVAL.list = nil + } + case 480: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:3440 + { + yyVAL.list = yyDollar[1].list + } + case 481: + yyDollar = yyS[yypt-5 : yypt+1] + //line php5/php5.y:3445 + { + arrayItem := expr.NewArrayItem(yyDollar[3].node, yyDollar[5].node, false) + positions.AddPosition(arrayItem, positionBuilder.NewNodesPosition(yyDollar[3].node, yyDollar[5].node)) + comments.AddComments(arrayItem, comments[yyDollar[3].node]) + + yyVAL.list = append(yyDollar[1].list, arrayItem) + } + case 482: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:3453 + { + arrayItem := expr.NewArrayItem(nil, yyDollar[3].node, false) + positions.AddPosition(arrayItem, positionBuilder.NewNodePosition(yyDollar[3].node)) + comments.AddComments(arrayItem, comments[yyDollar[3].node]) + + yyVAL.list = append(yyDollar[1].list, arrayItem) + } + case 483: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:3461 + { + arrayItem := expr.NewArrayItem(yyDollar[1].node, yyDollar[3].node, false) + positions.AddPosition(arrayItem, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) + comments.AddComments(arrayItem, comments[yyDollar[1].node]) + + yyVAL.list = []node.Node{arrayItem} + } + case 484: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3469 + { + arrayItem := expr.NewArrayItem(nil, yyDollar[1].node, false) + positions.AddPosition(arrayItem, positionBuilder.NewNodePosition(yyDollar[1].node)) + comments.AddComments(arrayItem, comments[yyDollar[1].node]) + + yyVAL.list = []node.Node{arrayItem} + } + case 485: + yyDollar = yyS[yypt-6 : yypt+1] + //line php5/php5.y:3477 + { + arrayItem := expr.NewArrayItem(yyDollar[3].node, yyDollar[6].node, true) + positions.AddPosition(arrayItem, positionBuilder.NewNodesPosition(yyDollar[3].node, yyDollar[6].node)) + comments.AddComments(arrayItem, comments[yyDollar[3].node]) + + yyVAL.list = append(yyDollar[1].list, arrayItem) + } + case 486: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:3485 + { + arrayItem := expr.NewArrayItem(nil, yyDollar[4].node, true) + positions.AddPosition(arrayItem, positionBuilder.NewTokenNodePosition(yyDollar[3].token, yyDollar[4].node)) + comments.AddComments(arrayItem, yyDollar[3].token.Comments()) + + yyVAL.list = append(yyDollar[1].list, arrayItem) + } + case 487: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:3493 + { + arrayItem := expr.NewArrayItem(yyDollar[1].node, yyDollar[4].node, true) + positions.AddPosition(arrayItem, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) + comments.AddComments(arrayItem, comments[yyDollar[1].node]) + + yyVAL.list = []node.Node{arrayItem} + } + case 488: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:3501 + { + arrayItem := expr.NewArrayItem(nil, yyDollar[2].node, true) + positions.AddPosition(arrayItem, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(arrayItem, yyDollar[1].token.Comments()) + + yyVAL.list = []node.Node{arrayItem} + } + case 489: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:3512 + { + yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) + } + case 490: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:3514 + { + encapsed := scalar.NewEncapsedStringPart(yyDollar[2].token.Value) + positions.AddPosition(encapsed, positionBuilder.NewTokenPosition(yyDollar[2].token)) + yyVAL.list = append(yyDollar[1].list, encapsed) + comments.AddComments(encapsed, yyDollar[2].token.Comments()) + } + case 491: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3521 + { + yyVAL.list = []node.Node{yyDollar[1].node} + } + case 492: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:3523 + { + encapsed := scalar.NewEncapsedStringPart(yyDollar[1].token.Value) + positions.AddPosition(encapsed, positionBuilder.NewTokenPosition(yyDollar[1].token)) + yyVAL.list = []node.Node{encapsed, yyDollar[2].node} + comments.AddComments(encapsed, yyDollar[1].token.Comments()) + } + case 493: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3533 + { + name := node.NewIdentifier(yyDollar[1].token.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[1].token)) + yyVAL.node = expr.NewVariable(name) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + + comments.AddComments(name, yyDollar[1].token.Comments()) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 494: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:3543 + { + identifier := node.NewIdentifier(yyDollar[1].token.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[1].token)) + yyVAL.node = expr.NewArrayDimFetch(variable, yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) + + comments.AddComments(identifier, yyDollar[1].token.Comments()) + comments.AddComments(variable, yyDollar[1].token.Comments()) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 495: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:3556 + { + identifier := node.NewIdentifier(yyDollar[1].token.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[1].token)) + fetch := node.NewIdentifier(yyDollar[3].token.Value) + positions.AddPosition(fetch, positionBuilder.NewTokenPosition(yyDollar[3].token)) + yyVAL.node = expr.NewPropertyFetch(variable, fetch) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) + + comments.AddComments(identifier, yyDollar[1].token.Comments()) + comments.AddComments(variable, yyDollar[1].token.Comments()) + comments.AddComments(fetch, yyDollar[3].token.Comments()) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 496: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:3572 + { + yyVAL.node = expr.NewVariable(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 497: + yyDollar = yyS[yypt-6 : yypt+1] + //line php5/php5.y:3578 + { + identifier := node.NewIdentifier(yyDollar[2].token.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[2].token)) + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition(yyDollar[2].token)) + yyVAL.node = expr.NewArrayDimFetch(variable, yyDollar[4].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[6].token)) + + comments.AddComments(identifier, yyDollar[2].token.Comments()) + comments.AddComments(variable, yyDollar[1].token.Comments()) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 498: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:3592 + { + yyVAL.node = yyDollar[2].node + } + case 499: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3597 + { + yyVAL.node = scalar.NewString(yyDollar[1].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 500: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3603 + { + // TODO: add option to handle 64 bit integer + if _, err := strconv.Atoi(yyDollar[1].token.Value); err == nil { + yyVAL.node = scalar.NewLnumber(yyDollar[1].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + } else { + yyVAL.node = scalar.NewString(yyDollar[1].token.Value) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + } + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 501: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3615 + { + identifier := node.NewIdentifier(yyDollar[1].token.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) + yyVAL.node = expr.NewVariable(identifier) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) + + comments.AddComments(identifier, yyDollar[1].token.Comments()) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 502: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:3628 + { + yyVAL.node = expr.NewIsset(yyDollar[3].list) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 503: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:3634 + { + yyVAL.node = expr.NewEmpty(yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 504: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:3640 + { + yyVAL.node = expr.NewEmpty(yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 505: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:3646 + { + yyVAL.node = expr.NewInclude(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 506: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:3652 + { + yyVAL.node = expr.NewIncludeOnce(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 507: + yyDollar = yyS[yypt-4 : yypt+1] + //line php5/php5.y:3658 + { + yyVAL.node = expr.NewEval(yyDollar[3].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 508: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:3664 + { + yyVAL.node = expr.NewRequire(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 509: + yyDollar = yyS[yypt-2 : yypt+1] + //line php5/php5.y:3670 + { + yyVAL.node = expr.NewRequireOnce(yyDollar[2].node) + positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) + comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) + } + case 510: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3679 + { + yyVAL.list = []node.Node{yyDollar[1].node} + } + case 511: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:3681 + { + yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) + } + case 512: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3686 + { + yyVAL.node = yyDollar[1].node + } + case 513: + yyDollar = yyS[yypt-1 : yypt+1] + //line php5/php5.y:3688 + { + yyVAL.node = yyDollar[1].node + } + case 514: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:3693 + { + target := node.NewIdentifier(yyDollar[3].token.Value) + positions.AddPosition(target, positionBuilder.NewTokenPosition(yyDollar[3].token)) + yyVAL.node = expr.NewClassConstFetch(yyDollar[1].node, target) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) + + comments.AddComments(target, yyDollar[3].token.Comments()) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 515: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:3703 + { + target := node.NewIdentifier(yyDollar[3].token.Value) + positions.AddPosition(target, positionBuilder.NewTokenPosition(yyDollar[3].token)) + yyVAL.node = expr.NewClassConstFetch(yyDollar[1].node, target) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) + + comments.AddComments(target, yyDollar[3].token.Comments()) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 516: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:3716 + { + target := node.NewIdentifier(yyDollar[3].token.Value) + positions.AddPosition(target, positionBuilder.NewTokenPosition(yyDollar[3].token)) + yyVAL.node = expr.NewClassConstFetch(yyDollar[1].node, target) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) + + comments.AddComments(target, yyDollar[3].token.Comments()) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + case 517: + yyDollar = yyS[yypt-3 : yypt+1] + //line php5/php5.y:3729 + { + target := node.NewIdentifier(yyDollar[3].token.Value) + positions.AddPosition(target, positionBuilder.NewTokenPosition(yyDollar[3].token)) + yyVAL.node = expr.NewClassConstFetch(yyDollar[1].node, target) + positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) + + comments.AddComments(target, yyDollar[3].token.Comments()) + comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) + } + } + goto yystack /* stack new state and value */ +} diff --git a/php5/php5.y b/php5/php5.y new file mode 100644 index 0000000..746a2fa --- /dev/null +++ b/php5/php5.y @@ -0,0 +1,3741 @@ +%{ +package php5 + +import ( +// "fmt" + "strings" + "strconv" + + "github.com/z7zmey/php-parser/token" + "github.com/z7zmey/php-parser/node" + "github.com/z7zmey/php-parser/node/scalar" + "github.com/z7zmey/php-parser/node/name" + "github.com/z7zmey/php-parser/node/stmt" + "github.com/z7zmey/php-parser/node/expr" + "github.com/z7zmey/php-parser/node/expr/assign_op" + "github.com/z7zmey/php-parser/node/expr/binary_op" + "github.com/z7zmey/php-parser/node/expr/cast" +) + +%} + +%union{ + node node.Node + token token.Token + boolWithToken boolWithToken + list []node.Node + foreachVariable foreachVariable + nodesWithEndToken *nodesWithEndToken + simpleIndirectReference simpleIndirectReference +// str string +} + +%type $unk +%token T_INCLUDE +%token T_INCLUDE_ONCE +%token T_EXIT +%token T_IF +%token T_LNUMBER +%token T_DNUMBER +%token T_STRING +%token T_STRING_VARNAME +%token T_VARIABLE +%token T_NUM_STRING +%token T_INLINE_HTML +%token T_CHARACTER +%token T_BAD_CHARACTER +%token T_ENCAPSED_AND_WHITESPACE +%token T_CONSTANT_ENCAPSED_STRING +%token T_ECHO +%token T_DO +%token T_WHILE +%token T_ENDWHILE +%token T_FOR +%token T_ENDFOR +%token T_FOREACH +%token T_ENDFOREACH +%token T_DECLARE +%token T_ENDDECLARE +%token T_AS +%token T_SWITCH +%token T_ENDSWITCH +%token T_CASE +%token T_DEFAULT +%token T_BREAK +%token T_CONTINUE +%token T_GOTO +%token T_FUNCTION +%token T_CONST +%token T_RETURN +%token T_TRY +%token T_CATCH +%token T_FINALLY +%token T_THROW +%token T_USE +%token T_INSTEADOF +%token T_GLOBAL +%token T_VAR +%token T_UNSET +%token T_ISSET +%token T_EMPTY +%token T_HALT_COMPILER +%token T_CLASS +%token T_TRAIT +%token T_INTERFACE +%token T_EXTENDS +%token T_IMPLEMENTS +%token T_OBJECT_OPERATOR +%token T_DOUBLE_ARROW +%token T_LIST +%token T_ARRAY +%token T_CALLABLE +%token T_CLASS_C +%token T_TRAIT_C +%token T_METHOD_C +%token T_FUNC_C +%token T_LINE +%token T_FILE +%token T_COMMENT +%token T_DOC_COMMENT +%token T_OPEN_TAG +%token T_OPEN_TAG_WITH_ECHO +%token T_CLOSE_TAG +%token T_WHITESPACE +%token T_START_HEREDOC +%token T_END_HEREDOC +%token T_DOLLAR_OPEN_CURLY_BRACES +%token T_CURLY_OPEN +%token T_PAAMAYIM_NEKUDOTAYIM +%token T_NAMESPACE +%token T_NS_C +%token T_DIR +%token T_NS_SEPARATOR +%token T_ELLIPSIS +%token T_EVAL +%token T_REQUIRE +%token T_REQUIRE_ONCE +%token T_LOGICAL_OR +%token T_LOGICAL_XOR +%token T_LOGICAL_AND +%token T_INSTANCEOF +%token T_NEW +%token T_CLONE +%token T_ELSEIF +%token T_ELSE +%token T_ENDIF +%token T_PRINT +%token T_YIELD +%token T_STATIC +%token T_ABSTRACT +%token T_FINAL +%token T_PRIVATE +%token T_PROTECTED +%token T_PUBLIC +%token T_INC +%token T_DEC +%token T_YIELD_FROM +%token T_INT_CAST +%token T_DOUBLE_CAST +%token T_STRING_CAST +%token T_ARRAY_CAST +%token T_OBJECT_CAST +%token T_BOOL_CAST +%token T_UNSET_CAST +%token T_COALESCE +%token T_SPACESHIP +%token T_NOELSE +%token '"' +%token '`' +%token '{' +%token '}' +%token ';' +%token ':' +%token '(' +%token ')' +%token '[' +%token ']' +%token '?' +%token '&' +%token '-' +%token '+' +%token '!' +%token '~' +%token '@' +%token '$' + +%left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE +%left ',' +%left T_LOGICAL_OR +%left T_LOGICAL_XOR +%left T_LOGICAL_AND +%right T_PRINT +%right T_YIELD +%left '=' T_PLUS_EQUAL T_MINUS_EQUAL T_MUL_EQUAL T_DIV_EQUAL T_CONCAT_EQUAL T_MOD_EQUAL T_AND_EQUAL T_OR_EQUAL T_XOR_EQUAL T_SL_EQUAL T_SR_EQUAL T_POW_EQUAL +%left '?' ':' +%left T_BOOLEAN_OR +%left T_BOOLEAN_AND +%left '|' +%left '^' +%left '&' +%nonassoc T_IS_EQUAL T_IS_NOT_EQUAL T_IS_IDENTICAL T_IS_NOT_IDENTICAL +%nonassoc '<' T_IS_SMALLER_OR_EQUAL '>' T_IS_GREATER_OR_EQUAL +%left T_SL T_SR +%left '+' '-' '.' +%left '*' '/' '%' +%right '!' +%nonassoc T_INSTANCEOF +%right '~' T_INC T_DEC T_INT_CAST T_DOUBLE_CAST T_STRING_CAST T_ARRAY_CAST T_OBJECT_CAST T_BOOL_CAST T_UNSET_CAST '@' +%right T_POW +%right '[' +%nonassoc T_NEW T_CLONE +%left T_ELSEIF +%left T_ELSE +%left T_ENDIF +%right T_STATIC T_ABSTRACT T_FINAL T_PRIVATE T_PROTECTED T_PUBLIC + +%type function interface_entry + +%type top_statement use_declaration use_function_declaration use_const_declaration common_scalar +%type static_class_constant compound_variable reference_variable class_name variable_class_name +%type dim_offset expr expr_without_variable r_variable w_variable rw_variable variable base_variable_with_function_calls +%type base_variable array_function_dereference function_call inner_statement statement unticked_statement +%type inner_statement statement global_var static_scalar scalar class_constant static_class_name_scalar class_name_scalar +%type encaps_var encaps_var encaps_var_offset general_constant isset_variable internal_functions_in_yacc assignment_list_element +%type variable_name variable_without_objects dynamic_class_name_reference new_expr class_name_reference static_member +%type function_call fully_qualified_class_name combined_scalar combined_scalar_offset general_constant parenthesis_expr +%type exit_expr yield_expr function_declaration_statement class_declaration_statement constant_declaration +%type else_single new_else_single while_statement for_statement unset_variable foreach_statement declare_statement +%type finally_statement additional_catch unticked_function_declaration_statement unticked_class_declaration_statement +%type optional_class_type parameter class_entry_type extends_from class_statement class_constant_declaration +%type trait_use_statement function_call_parameter trait_adaptation_statement trait_precedence trait_alias +%type trait_method_reference_fully_qualified trait_method_reference trait_modifiers member_modifier method +%type static_scalar_value static_operation + +%type top_statement_list namespace_name use_declarations use_function_declarations use_const_declarations +%type inner_statement_list global_var_list static_var_list encaps_list isset_variables non_empty_array_pair_list +%type array_pair_list assignment_list lexical_var_list lexical_vars elseif_list new_elseif_list non_empty_for_expr +%type for_expr case_list echo_expr_list unset_variables declare_list catch_statement additional_catches +%type non_empty_additional_catches parameter_list non_empty_parameter_list class_statement_list implements_list +%type class_statement_list variable_modifiers method_modifiers class_variable_declaration interface_extends_list +%type interface_list non_empty_function_call_parameter_list trait_list trait_adaptation_list non_empty_trait_adaptation_list +%type trait_reference_list non_empty_member_modifiers backticks_expr static_array_pair_list non_empty_static_array_pair_list + +%type chaining_dereference chaining_instance_call chaining_method_or_property instance_call variable_property +%type method_or_not array_method_dereference object_property object_dim_list dynamic_class_name_variable_property +%type dynamic_class_name_variable_properties variable_properties + +%type simple_indirect_reference +%type foreach_variable foreach_optional_arg +%type ctor_arguments function_call_parameter_list switch_case_list method_body trait_adaptations +%type is_reference is_variadic + +%% + +start: + top_statement_list + { + rootnode = stmt.NewStmtList($1) + } +; + +top_statement_list: + top_statement_list top_statement { $$ = append($1, $2) } + | /* empty */ { $$ = []node.Node{} } +; + +namespace_name: + T_STRING + { + namePart := name.NewNamePart($1.Value) + positions.AddPosition(namePart, positionBuilder.NewTokenPosition($1)) + $$ = []node.Node{namePart} + comments.AddComments(namePart, $1.Comments()) + } + | namespace_name T_NS_SEPARATOR T_STRING + { + namePart := name.NewNamePart($3.Value) + positions.AddPosition(namePart, positionBuilder.NewTokenPosition($3)) + $$ = append($1, namePart) + comments.AddComments(namePart, $3.Comments()) + } +; + +top_statement: + statement + { $$ = $1 } + | function_declaration_statement + { $$ = $1 } + | class_declaration_statement + { $$ = $1 } + | T_HALT_COMPILER '(' ')' ';' + { + $$ = stmt.NewHaltCompiler() + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) + comments.AddComments($$, $1.Comments()) + } + | T_NAMESPACE namespace_name ';' + { + name := name.NewName($2) + positions.AddPosition(name, positionBuilder.NewNodeListPosition($2)) + $$ = stmt.NewNamespace(name, nil) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) + + comments.AddComments(name, ListGetFirstNodeComments($2)) + comments.AddComments($$, $1.Comments()) + } + | T_NAMESPACE namespace_name '{' top_statement_list '}' + { + name := name.NewName($2) + positions.AddPosition(name, positionBuilder.NewNodeListPosition($2)) + $$ = stmt.NewNamespace(name, $4) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $5)) + + comments.AddComments(name, ListGetFirstNodeComments($2)) + comments.AddComments($$, $1.Comments()) + } + | T_NAMESPACE '{' top_statement_list '}' + { + $$ = stmt.NewNamespace(nil, $3) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) + comments.AddComments($$, $1.Comments()) + } + | T_USE use_declarations ';' + { + $$ = stmt.NewUseList(nil, $2) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) + comments.AddComments($$, $1.Comments()) + } + | T_USE T_FUNCTION use_function_declarations ';' + { + useType := node.NewIdentifier($2.Value) + positions.AddPosition($$, positionBuilder.NewTokenPosition($2)) + comments.AddComments($$, $2.Comments()) + + $$ = stmt.NewUseList(useType, $3) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) + comments.AddComments($$, $1.Comments()) + } + | T_USE T_CONST use_const_declarations ';' + { + useType := node.NewIdentifier($2.Value) + positions.AddPosition($$, positionBuilder.NewTokenPosition($2)) + comments.AddComments($$, $2.Comments()) + + $$ = stmt.NewUseList(useType, $3) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) + comments.AddComments($$, $1.Comments()) + } + | constant_declaration ';' + { $$ = $1 } +; + +use_declarations: + use_declarations ',' use_declaration + { $$ = append($1, $3) } + | use_declaration + { $$ = []node.Node{$1} } +; + +use_declaration: + namespace_name + { + name := name.NewName($1) + positions.AddPosition(name, positionBuilder.NewNodeListPosition($1)) + $$ = stmt.NewUse(nil, name, nil) + positions.AddPosition($$, positionBuilder.NewNodeListPosition($1)) + + comments.AddComments(name, ListGetFirstNodeComments($1)) + comments.AddComments($$, ListGetFirstNodeComments($1)) + } + | namespace_name T_AS T_STRING + { + name := name.NewName($1) + positions.AddPosition(name, positionBuilder.NewNodeListPosition($1)) + alias := node.NewIdentifier($3.Value) + positions.AddPosition(alias, positionBuilder.NewTokenPosition($3)) + $$ = stmt.NewUse(nil, name, alias) + positions.AddPosition($$, positionBuilder.NewNodeListTokenPosition($1, $3)) + + comments.AddComments(name, ListGetFirstNodeComments($1)) + comments.AddComments(alias, $3.Comments()) + comments.AddComments($$, ListGetFirstNodeComments($1)) + } + | T_NS_SEPARATOR namespace_name + { + name := name.NewName($2) + positions.AddPosition(name, positionBuilder.NewNodeListPosition($2)) + $$ = stmt.NewUse(nil, name, nil) + positions.AddPosition($$, positionBuilder.NewNodeListPosition($2)) + + comments.AddComments(name, ListGetFirstNodeComments($2)) + comments.AddComments($$, ListGetFirstNodeComments($2)) + } + | T_NS_SEPARATOR namespace_name T_AS T_STRING + { + name := name.NewName($2) + positions.AddPosition(name, positionBuilder.NewNodeListPosition($2)) + alias := node.NewIdentifier($4.Value) + positions.AddPosition(alias, positionBuilder.NewTokenPosition($4)) + $$ = stmt.NewUse(nil, name, alias) + positions.AddPosition($$, positionBuilder.NewNodeListTokenPosition($2, $4)) + + comments.AddComments(name, ListGetFirstNodeComments($2)) + comments.AddComments(alias, $4.Comments()) + comments.AddComments($$, ListGetFirstNodeComments($2)) + } +; + +use_function_declarations: + use_function_declarations ',' use_function_declaration + { $$ = append($1, $3) } + | use_function_declaration + { $$ = []node.Node{$1} } +; + +use_function_declaration: + namespace_name + { + name := name.NewName($1) + positions.AddPosition(name, positionBuilder.NewNodeListPosition($1)) + $$ = stmt.NewUse(nil, name, nil) + positions.AddPosition($$, positionBuilder.NewNodeListPosition($1)) + + comments.AddComments(name, ListGetFirstNodeComments($1)) + comments.AddComments($$, ListGetFirstNodeComments($1)) + } + | namespace_name T_AS T_STRING + { + name := name.NewName($1) + positions.AddPosition(name, positionBuilder.NewNodeListPosition($1)) + alias := node.NewIdentifier($3.Value) + positions.AddPosition(alias, positionBuilder.NewTokenPosition($3)) + $$ = stmt.NewUse(nil, name, alias) + positions.AddPosition($$, positionBuilder.NewNodeListTokenPosition($1, $3)) + + comments.AddComments(name, ListGetFirstNodeComments($1)) + comments.AddComments(alias, $3.Comments()) + comments.AddComments($$, ListGetFirstNodeComments($1)) + } + | T_NS_SEPARATOR namespace_name + { + name := name.NewName($2) + positions.AddPosition(name, positionBuilder.NewNodeListPosition($2)) + $$ = stmt.NewUse(nil, name, nil) + positions.AddPosition($$, positionBuilder.NewNodeListPosition($2)) + + comments.AddComments(name, ListGetFirstNodeComments($2)) + comments.AddComments($$, ListGetFirstNodeComments($2)) + } + | T_NS_SEPARATOR namespace_name T_AS T_STRING + { + name := name.NewName($2) + positions.AddPosition(name, positionBuilder.NewNodeListPosition($2)) + alias := node.NewIdentifier($4.Value) + positions.AddPosition(alias, positionBuilder.NewTokenPosition($4)) + $$ = stmt.NewUse(nil, name, alias) + positions.AddPosition($$, positionBuilder.NewNodeListTokenPosition($2, $4)) + + comments.AddComments(name, ListGetFirstNodeComments($2)) + comments.AddComments(alias, $4.Comments()) + comments.AddComments($$, ListGetFirstNodeComments($2)) + } +; + +use_const_declarations: + use_const_declarations ',' use_const_declaration + { $$ = append($1, $3) } + | use_const_declaration + { $$ = []node.Node{$1} } +; + +use_const_declaration: + namespace_name + { + name := name.NewName($1) + positions.AddPosition(name, positionBuilder.NewNodeListPosition($1)) + $$ = stmt.NewUse(nil, name, nil) + positions.AddPosition($$, positionBuilder.NewNodeListPosition($1)) + + comments.AddComments(name, ListGetFirstNodeComments($1)) + comments.AddComments($$, ListGetFirstNodeComments($1)) + } + | namespace_name T_AS T_STRING + { + name := name.NewName($1) + positions.AddPosition(name, positionBuilder.NewNodeListPosition($1)) + alias := node.NewIdentifier($3.Value) + positions.AddPosition(alias, positionBuilder.NewTokenPosition($3)) + $$ = stmt.NewUse(nil, name, alias) + positions.AddPosition($$, positionBuilder.NewNodeListTokenPosition($1, $3)) + + comments.AddComments(name, ListGetFirstNodeComments($1)) + comments.AddComments(alias, $3.Comments()) + comments.AddComments($$, ListGetFirstNodeComments($1)) + } + | T_NS_SEPARATOR namespace_name + { + name := name.NewName($2) + positions.AddPosition(name, positionBuilder.NewNodeListPosition($2)) + $$ = stmt.NewUse(nil, name, nil) + positions.AddPosition($$, positionBuilder.NewNodeListPosition($2)) + + comments.AddComments(name, ListGetFirstNodeComments($2)) + comments.AddComments($$, ListGetFirstNodeComments($2)) + } + | T_NS_SEPARATOR namespace_name T_AS T_STRING + { + name := name.NewName($2) + positions.AddPosition(name, positionBuilder.NewNodeListPosition($2)) + alias := node.NewIdentifier($4.Value) + positions.AddPosition(alias, positionBuilder.NewTokenPosition($4)) + $$ = stmt.NewUse(nil, name, alias) + positions.AddPosition($$, positionBuilder.NewNodeListTokenPosition($2, $4)) + + comments.AddComments(name, ListGetFirstNodeComments($2)) + comments.AddComments(alias, $4.Comments()) + comments.AddComments($$, ListGetFirstNodeComments($2)) + } +; + +constant_declaration: + constant_declaration ',' T_STRING '=' static_scalar + { + name := node.NewIdentifier($3.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition($3)) + comments.AddComments(name, $3.Comments()) + + constant := stmt.NewConstant(name, $5, "") + positions.AddPosition(constant, positionBuilder.NewTokenNodePosition($3, $5)) + comments.AddComments(constant, $3.Comments()) + + constList := $1.(*stmt.ConstList) + constList.Consts = append(constList.Consts, constant) + + $$ = $1 + positions.AddPosition($$, positionBuilder.NewNodeNodeListPosition($1, constList.Consts)) + } + | T_CONST T_STRING '=' static_scalar + { + name := node.NewIdentifier($2.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition($2)) + comments.AddComments(name, $2.Comments()) + + constant := stmt.NewConstant(name, $4, "") + positions.AddPosition(constant, positionBuilder.NewTokenNodePosition($2, $4)) + comments.AddComments(constant, $2.Comments()) + + constList := []node.Node{constant} + + $$ = stmt.NewConstList(constList) + positions.AddPosition($$, positionBuilder.NewTokenNodeListPosition($1, constList)) + comments.AddComments($$, $1.Comments()) + } +; + +inner_statement_list: + inner_statement_list inner_statement + { $$ = append($1, $2) } + | /* empty */ + { $$ = []node.Node{} } +; + + +inner_statement: + statement + { $$ = $1 } + | function_declaration_statement + { $$ = $1 } + | class_declaration_statement + { $$ = $1 } + | T_HALT_COMPILER '(' ')' ';' + { + $$ = stmt.NewHaltCompiler() + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) + comments.AddComments($$, $1.Comments()) + } +; + + +statement: + unticked_statement + { $$ = $1 } + | T_STRING ':' + { + label := node.NewIdentifier($1.Value) + positions.AddPosition(label, positionBuilder.NewTokenPosition($1)) + $$ = stmt.NewLabel(label) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $2)) + + comments.AddComments(label, $1.Comments()) + comments.AddComments($$, $1.Comments()) + } +; + +unticked_statement: + '{' inner_statement_list '}' + { + $$ = stmt.NewStmtList($2) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) + comments.AddComments($$, $1.Comments()) + } + | T_IF parenthesis_expr statement elseif_list else_single + { + $$ = stmt.NewIf($2, $3, $4, $5) + + if $5 != nil { + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $5)) + } else if len($4) > 0 { + positions.AddPosition($$, positionBuilder.NewTokenNodeListPosition($1, $4)) + } else { + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $3)) + } + + comments.AddComments($$, $1.Comments()) + } + | T_IF parenthesis_expr ':' inner_statement_list new_elseif_list new_else_single T_ENDIF ';' + { + stmts := stmt.NewStmtList($4) + positions.AddPosition(stmts, positionBuilder.NewNodeListPosition($4)) + + $$ = stmt.NewIf($2, stmts, $5, $6) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $8)) + comments.AddComments($$, $1.Comments()) + } + | T_WHILE parenthesis_expr while_statement + { + $$ = stmt.NewWhile($1, $2, $3) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $3)) + comments.AddComments($$, $1.Comments()) + } + | T_DO statement T_WHILE parenthesis_expr ';' + { + $$ = stmt.NewDo($2, $4) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $5)) + comments.AddComments($$, $1.Comments()) + } + | T_FOR '(' for_expr ';' for_expr ';' for_expr ')' for_statement + { + $$ = stmt.NewFor($3, $5, $7, $9) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $9)) + comments.AddComments($$, $1.Comments()) + } + | T_SWITCH parenthesis_expr switch_case_list + { + $$ = stmt.NewSwitch($1, $2, $3.nodes) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3.endToken)) + comments.AddComments($$, $1.Comments()) + } + | T_BREAK ';' + { + $$ = stmt.NewBreak(nil) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | T_BREAK expr ';' + { + $$ = stmt.NewBreak($2) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) + comments.AddComments($$, $1.Comments()) + } + | T_CONTINUE ';' + { + $$ = stmt.NewContinue(nil) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | T_CONTINUE expr ';' + { + $$ = stmt.NewContinue($2) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) + comments.AddComments($$, $1.Comments()) + } + | T_RETURN ';' + { + $$ = stmt.NewReturn(nil) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | T_RETURN expr_without_variable ';' + { + $$ = stmt.NewReturn($2) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) + comments.AddComments($$, $1.Comments()) + } + | T_RETURN variable ';' + { + $$ = stmt.NewReturn($2) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) + comments.AddComments($$, $1.Comments()) + } + | yield_expr ';' + { $$ = $1 } + | T_GLOBAL global_var_list ';' + { + $$ = stmt.NewGlobal($2) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) + comments.AddComments($$, $1.Comments()) + } + | T_STATIC static_var_list ';' + { + $$ = stmt.NewStatic($2) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) + comments.AddComments($$, $1.Comments()) + } + | T_ECHO echo_expr_list ';' + { + $$ = stmt.NewEcho($2) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) + comments.AddComments($$, $1.Comments()) + } + | T_INLINE_HTML + { + $$ = stmt.NewInlineHtml($1.Value) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } + | expr ';' + { $$ = $1 } + | T_UNSET '(' unset_variables ')' ';' + { + $$ = stmt.NewUnset($3) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $5)) + comments.AddComments($$, $1.Comments()) + } + | T_FOREACH '(' variable T_AS foreach_variable foreach_optional_arg ')' foreach_statement + { + if $6.node == nil { + $$ = stmt.NewForeach($3, nil, $5.node, $8, $5.byRef) + } else { + $$ = stmt.NewForeach($3, $5.node, $6.node, $8, $6.byRef) + } + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $8)) + comments.AddComments($$, $1.Comments()) + } + | T_FOREACH '(' expr_without_variable T_AS foreach_variable foreach_optional_arg ')' foreach_statement + { + if $6.node == nil { + $$ = stmt.NewForeach($3, nil, $5.node, $8, $5.byRef) + } else { + $$ = stmt.NewForeach($3, $5.node, $6.node, $8, $6.byRef) + } + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $8)) + comments.AddComments($$, $1.Comments()) + } + | T_DECLARE '(' declare_list ')' declare_statement + { + $$ = stmt.NewDeclare($3, $5) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $5)) + comments.AddComments($$, $1.Comments()) + } + | ';' + { + $$ = stmt.NewNop() + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } + | T_TRY '{' inner_statement_list '}' catch_statement finally_statement + { + $$ = stmt.NewTry($3, $5, $6) + + if $6 == nil { + positions.AddPosition($$, positionBuilder.NewTokenNodeListPosition($1, $5)) + } else { + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $6)) + } + + comments.AddComments($$, $1.Comments()) + } + | T_THROW expr ';' + { + $$ = stmt.NewThrow($2) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) + comments.AddComments($$, $1.Comments()) + } + | T_GOTO T_STRING ';' + { + label := node.NewIdentifier($2.Value) + positions.AddPosition(label, positionBuilder.NewTokenPosition($2)) + $$ = stmt.NewGoto(label) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) + + comments.AddComments(label, $2.Comments()) + comments.AddComments($$, $1.Comments()) + } +; + +catch_statement: + /* empty */ + { $$ = []node.Node{} } + | T_CATCH '(' fully_qualified_class_name T_VARIABLE ')' '{' inner_statement_list '}' additional_catches + { + identifier := node.NewIdentifier($4.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition($4)) + comments.AddComments(identifier, $4.Comments()) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition($4)) + comments.AddComments(variable, $4.Comments()) + + catch := stmt.NewCatch([]node.Node{$3}, variable, $7) + positions.AddPosition(catch, positionBuilder.NewTokensPosition($1, $8)) + comments.AddComments(catch, $1.Comments()) + + $$ = append([]node.Node{catch}, $9...) + } + +finally_statement: + /* empty */ + { $$ = nil } + | T_FINALLY '{' inner_statement_list '}' + { + $$ = stmt.NewFinally($3) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) + comments.AddComments($$, $1.Comments()) + } +; + +additional_catches: + non_empty_additional_catches + { $$ = $1 } + | /* empty */ + { $$ = []node.Node{} } +; + +non_empty_additional_catches: + additional_catch + { $$ = []node.Node{$1} } + | non_empty_additional_catches additional_catch + { $$ = append($1, $2) } +; + +additional_catch: + T_CATCH '(' fully_qualified_class_name T_VARIABLE ')' '{' inner_statement_list '}' + { + identifier := node.NewIdentifier($4.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition($4)) + comments.AddComments(identifier, $4.Comments()) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition($4)) + comments.AddComments(variable, $4.Comments()) + + $$ = stmt.NewCatch([]node.Node{$3}, variable, $7) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $8)) + comments.AddComments($$, $1.Comments()) + } +; + +unset_variables: + unset_variable + { $$ = []node.Node{$1} } + | unset_variables ',' unset_variable + { $$ = append($1, $3) } +; + +unset_variable: + variable + { $$ = $1 } +; + +function_declaration_statement: + unticked_function_declaration_statement + { $$ = $1 } +; + +class_declaration_statement: + unticked_class_declaration_statement + { $$ = $1 } +; + +is_reference: + /* empty */ + { $$ = boolWithToken{false, nil} } + | '&' + { $$ = boolWithToken{true, &$1} } +; + +is_variadic: + /* empty */ + { $$ = boolWithToken{false, nil} } + | T_ELLIPSIS + { $$ = boolWithToken{true, &$1} } +; + +unticked_function_declaration_statement: + function is_reference T_STRING '(' parameter_list ')' '{' inner_statement_list '}' + { + name := node.NewIdentifier($3.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition($3)) + comments.AddComments(name, $3.Comments()) + + $$ = stmt.NewFunction(name, $2.value, $5, nil, $8, "") + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $9)) + comments.AddComments($$, $1.Comments()) + } +; + +unticked_class_declaration_statement: + class_entry_type T_STRING extends_from implements_list '{' class_statement_list '}' + { + switch n := $1.(type) { + case *stmt.Class : + name := node.NewIdentifier($2.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition($2)) + n.ClassName = name + n.Stmts = $6 + n.Extends = $3 + n.Implements = $4 + + case *stmt.Trait : + // TODO: is it possible that trait extend or implement + name := node.NewIdentifier($2.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition($2)) + n.TraitName = name + n.Stmts = $6 + } + + $$ = $1 + } + | interface_entry T_STRING interface_extends_list '{' class_statement_list '}' + { + name := node.NewIdentifier($2.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition($2)) + comments.AddComments(name, $2.Comments()) + + $$ = stmt.NewInterface(name, $3, $5, "") + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $6)) + comments.AddComments($$, $1.Comments()) + } +; + + +class_entry_type: + T_CLASS + { + $$ = stmt.NewClass(nil, nil, nil, nil, nil, nil, "") + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } + | T_ABSTRACT T_CLASS + { + classModifier := node.NewIdentifier($1.Value) + positions.AddPosition(classModifier, positionBuilder.NewTokenPosition($1)) + comments.AddComments(classModifier, $1.Comments()) + + $$ = stmt.NewClass(nil, []node.Node{classModifier}, nil, nil, nil, nil, "") + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | T_TRAIT + { + $$ = stmt.NewTrait(nil, nil, "") + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } + | T_FINAL T_CLASS + { + classModifier := node.NewIdentifier($1.Value) + positions.AddPosition(classModifier, positionBuilder.NewTokenPosition($1)) + comments.AddComments(classModifier, $1.Comments()) + + $$ = stmt.NewClass(nil, []node.Node{classModifier}, nil, nil, nil, nil, "") + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } +; + +extends_from: + /* empty */ + { $$ = nil } + | T_EXTENDS fully_qualified_class_name + { $$ = $2 } +; + +interface_entry: + T_INTERFACE + { $$ = $1 } +; + +interface_extends_list: + /* empty */ + { $$ = nil } + | T_EXTENDS interface_list + { $$ = $2 } +; + +implements_list: + /* empty */ + { $$ = nil } + | T_IMPLEMENTS interface_list + { $$ = $2 } +; + +interface_list: + fully_qualified_class_name + { $$ = []node.Node{$1} } + | interface_list ',' fully_qualified_class_name + { $$ = append($1, $3) } +; + +foreach_optional_arg: + /* empty */ + { $$ = foreachVariable{nil, false} } + | T_DOUBLE_ARROW foreach_variable + { $$ = $2 } +; + +foreach_variable: + variable + { $$ = foreachVariable{$1, false} } + | '&' variable + { $$ = foreachVariable{$2, true} } + | T_LIST '(' assignment_list ')' + { + list := expr.NewList($3) + positions.AddPosition(list, positionBuilder.NewTokensPosition($1, $4)) + $$ = foreachVariable{list, false} + comments.AddComments(list, $1.Comments()) + } +; + +for_statement: + statement + { $$ = $1; } + | ':' inner_statement_list T_ENDFOR ';' + { + $$ = stmt.NewStmtList($2) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) + comments.AddComments($$, $1.Comments()) + } +; + + +foreach_statement: + statement + { $$ = $1; } + | ':' inner_statement_list T_ENDFOREACH ';' + { + $$ = stmt.NewStmtList($2) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) + comments.AddComments($$, $1.Comments()) + } +; + + +declare_statement: + statement + { $$ = $1; } + | ':' inner_statement_list T_ENDDECLARE ';' + { + $$ = stmt.NewStmtList($2) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) + comments.AddComments($$, $1.Comments()) + } +; + + +declare_list: + T_STRING '=' static_scalar + { + name := node.NewIdentifier($1.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition($1)) + comments.AddComments(name, $1.Comments()) + + constant := stmt.NewConstant(name, $3, "") + positions.AddPosition(constant, positionBuilder.NewTokenNodePosition($1, $3)) + comments.AddComments(constant, $1.Comments()) + + $$ = []node.Node{constant} + } + | declare_list ',' T_STRING '=' static_scalar + { + name := node.NewIdentifier($3.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition($3)) + comments.AddComments(name, $3.Comments()) + + constant := stmt.NewConstant(name, $5, "") + positions.AddPosition(constant, positionBuilder.NewTokenNodePosition($3, $5)) + comments.AddComments(constant, $3.Comments()) + + $$ = append($1, constant) + } +; + + +switch_case_list: + '{' case_list '}' + { $$ = &nodesWithEndToken{$2, $3} } + | '{' ';' case_list '}' + { $$ = &nodesWithEndToken{$3, $4} } + | ':' case_list T_ENDSWITCH ';' + { $$ = &nodesWithEndToken{$2, $4} } + | ':' ';' case_list T_ENDSWITCH ';' + { $$ = &nodesWithEndToken{$3, $5} } +; + + +case_list: + /* empty */ + { $$ = []node.Node{} } + | case_list T_CASE expr case_separator inner_statement_list + { + _case := stmt.NewCase($3, $5) + positions.AddPosition(_case, positionBuilder.NewTokenNodeListPosition($2, $5)) + $$ = append($1, _case) + comments.AddComments(_case, $2.Comments()) + } + | case_list T_DEFAULT case_separator inner_statement_list + { + _default := stmt.NewDefault($4) + positions.AddPosition(_default, positionBuilder.NewTokenNodeListPosition($2, $4)) + $$ = append($1, _default) + comments.AddComments(_default, $2.Comments()) + } +; + + +case_separator: + ':' + | ';' +; + + +while_statement: + statement + { $$ = $1 } + | ':' inner_statement_list T_ENDWHILE ';' + { + $$ = stmt.NewStmtList($2) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) + } +; + + + +elseif_list: + /* empty */ + { $$ = []node.Node{} } + | elseif_list T_ELSEIF parenthesis_expr statement + { + _elseIf := stmt.NewElseIf($3, $4) + positions.AddPosition(_elseIf, positionBuilder.NewTokenNodePosition($2, $4)) + comments.AddComments(_elseIf, $2.Comments()) + + $$ = append($1, _elseIf) + } +; + + +new_elseif_list: + /* empty */ + { $$ = []node.Node{} } + | new_elseif_list T_ELSEIF parenthesis_expr ':' inner_statement_list + { + stmts := stmt.NewStmtList($5) + positions.AddPosition(stmts, positionBuilder.NewNodeListPosition($5)) + + _elseIf := stmt.NewAltElseIf($3, stmts) + positions.AddPosition(_elseIf, positionBuilder.NewTokenNodeListPosition($2, $5)) + comments.AddComments(_elseIf, $2.Comments()) + + $$ = append($1, _elseIf) + } +; + + +else_single: + /* empty */ + { $$ = nil } + | T_ELSE statement + { + $$ = stmt.NewElse($2) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } +; + + +new_else_single: + /* empty */ + { $$ = nil } + | T_ELSE ':' inner_statement_list + { + stmts := stmt.NewStmtList($3) + positions.AddPosition(stmts, positionBuilder.NewNodeListPosition($3)) + + $$ = stmt.NewAltElse(stmts) + positions.AddPosition($$, positionBuilder.NewTokenNodeListPosition($1, $3)) + comments.AddComments($$, $1.Comments()) + } +; + + +parameter_list: + non_empty_parameter_list + { $$ = $1; } + | /* empty */ + { $$ = nil } +; + +non_empty_parameter_list: + parameter + { $$ = []node.Node{$1} } + | non_empty_parameter_list ',' parameter + { $$ = append($1, $3) } +; + +parameter: + optional_class_type is_reference is_variadic T_VARIABLE + { + identifier := node.NewIdentifier($4.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition($4)) + comments.AddComments($$, $4.Comments()) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition($4)) + comments.AddComments($$, $4.Comments()) + + $$ = node.NewParameter($1, variable, nil, $2.value, $3.value) + + if $1 != nil { + positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $4)) + comments.AddComments($$, comments[$1]) + } else if $2.value == true { + positions.AddPosition($$, positionBuilder.NewTokensPosition(*$2.token, $4)) + comments.AddComments($$, $2.token.Comments()) + } else if $3.value == true { + positions.AddPosition($$, positionBuilder.NewTokensPosition(*$3.token, $4)) + comments.AddComments($$, $3.token.Comments()) + } else { + positions.AddPosition($$, positionBuilder.NewTokenPosition($4)) + comments.AddComments($$, $4.Comments()) + } + } + | optional_class_type is_reference is_variadic T_VARIABLE '=' static_scalar + { + identifier := node.NewIdentifier($4.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition($4)) + comments.AddComments(identifier, $4.Comments()) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition($4)) + comments.AddComments(variable, $4.Comments()) + + $$ = node.NewParameter($1, variable, $6, $2.value, $3.value) + + if $1 != nil { + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $6)) + comments.AddComments($$, comments[$1]) + } else if $2.value == true { + positions.AddPosition($$, positionBuilder.NewTokenNodePosition(*$2.token, $6)) + comments.AddComments($$, $2.token.Comments()) + } else if $3.value == true { + positions.AddPosition($$, positionBuilder.NewTokenNodePosition(*$3.token, $6)) + comments.AddComments($$, $3.token.Comments()) + } else { + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($4, $6)) + comments.AddComments($$, $4.Comments()) + } + } +; + + +optional_class_type: + /* empty */ + { $$ = nil } + | T_ARRAY + { + $$ = node.NewIdentifier($1.Value) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } + | T_CALLABLE + { + $$ = node.NewIdentifier($1.Value) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } + | fully_qualified_class_name + { $$ = $1 } +; + + +function_call_parameter_list: + '(' ')' + { $$ = &nodesWithEndToken{[]node.Node{}, $2} } + | '(' non_empty_function_call_parameter_list ')' + { $$ = &nodesWithEndToken{$2, $3} } + | '(' yield_expr ')' + { + arg := node.NewArgument($2, false, false) + positions.AddPosition(arg, positionBuilder.NewNodePosition($2)) + comments.AddComments(arg, comments[$2]) + + $$ = &nodesWithEndToken{[]node.Node{arg}, $3} + } +; + + +non_empty_function_call_parameter_list: + function_call_parameter + { $$ = []node.Node{$1} } + | non_empty_function_call_parameter_list ',' function_call_parameter + { $$ = append($1, $3) } +; + +function_call_parameter: + expr_without_variable + { + $$ = node.NewArgument($1, false, false) + positions.AddPosition($$, positionBuilder.NewNodePosition($1)) + comments.AddComments($$, comments[$1]) + } + | variable + { + $$ = node.NewArgument($1, false, false) + positions.AddPosition($$, positionBuilder.NewNodePosition($1)) + comments.AddComments($$, comments[$1]) + } + | '&' w_variable + { + $$ = node.NewArgument($2, false, true) + positions.AddPosition($$, positionBuilder.NewNodePosition($2)) + comments.AddComments($$, $1.Comments()) + } + | T_ELLIPSIS expr + { + $$ = node.NewArgument($2, true, false) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } +; + +global_var_list: + global_var_list ',' global_var + { $$ = append($1, $3) } + | global_var + { $$ = []node.Node{$1} } +; + + +global_var: + T_VARIABLE + { + name := node.NewIdentifier($1.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition($1)) + $$ = expr.NewVariable(name) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + + comments.AddComments(name, $1.Comments()) + comments.AddComments($$, $1.Comments()) + } + | '$' r_variable + { + $$ = expr.NewVariable($2) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | '$' '{' expr '}' + { + $$ = expr.NewVariable($3) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) + comments.AddComments($$, $1.Comments()) + } +; + + +static_var_list: + static_var_list ',' T_VARIABLE + { + identifier := node.NewIdentifier($3.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition($3)) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition($3)) + + staticVar := stmt.NewStaticVar(variable, nil) + positions.AddPosition(staticVar, positionBuilder.NewTokenPosition($3)) + + $$ = append($1, staticVar) + + comments.AddComments(identifier, $3.Comments()) + comments.AddComments(variable, $3.Comments()) + comments.AddComments(staticVar, $3.Comments()) + } + | static_var_list ',' T_VARIABLE '=' static_scalar + { + identifier := node.NewIdentifier($3.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition($3)) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition($3)) + + staticVar := stmt.NewStaticVar(variable, $5) + positions.AddPosition(staticVar, positionBuilder.NewTokenNodePosition($3, $5)) + + $$ = append($1, staticVar) + + comments.AddComments(identifier, $3.Comments()) + comments.AddComments(variable, $3.Comments()) + comments.AddComments(staticVar, $3.Comments()) + } + | T_VARIABLE + { + identifier := node.NewIdentifier($1.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition($1)) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition($1)) + + staticVar := stmt.NewStaticVar(variable, nil) + positions.AddPosition(staticVar, positionBuilder.NewTokenPosition($1)) + + $$ = []node.Node{staticVar} + + comments.AddComments(identifier, $1.Comments()) + comments.AddComments(variable, $1.Comments()) + comments.AddComments(staticVar, $1.Comments()) + } + | T_VARIABLE '=' static_scalar + { + identifier := node.NewIdentifier($1.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition($1)) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition($1)) + + staticVar := stmt.NewStaticVar(variable, $3) + positions.AddPosition(staticVar, positionBuilder.NewTokenNodePosition($1, $3)) + + $$ = []node.Node{staticVar} + + comments.AddComments(identifier, $1.Comments()) + comments.AddComments(variable, $1.Comments()) + comments.AddComments(staticVar, $1.Comments()) + } + +; + + +class_statement_list: + class_statement_list class_statement + { $$ = append($1, $2) } + | /* empty */ + { $$ = []node.Node{} } +; + + +class_statement: + variable_modifiers class_variable_declaration ';' + { + $$ = stmt.NewPropertyList($1, $2) + positions.AddPosition($$, positionBuilder.NewNodeListTokenPosition($1, $3)) + comments.AddComments($$, ListGetFirstNodeComments($1)) + } + | class_constant_declaration ';' + { $$ = $1 } + | trait_use_statement + { $$ = $1 } + | method_modifiers function is_reference T_STRING '(' parameter_list ')' method_body + { + name := node.NewIdentifier($4.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition($4)) + comments.AddComments(name, $4.Comments()) + + $$ = stmt.NewClassMethod(name, $1, $3.value, $6, nil, $8.nodes, "") + positions.AddPosition($$, positionBuilder.NewOptionalListTokensPosition($1, $2, $8.endToken)) + comments.AddComments($$, ListGetFirstNodeComments($1)) + } +; + +trait_use_statement: + T_USE trait_list trait_adaptations + { + $$ = stmt.NewTraitUse($2, $3.nodes) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3.endToken)) + comments.AddComments($$, $1.Comments()) + } +; + +trait_list: + fully_qualified_class_name + { $$ = []node.Node{$1} } + | trait_list ',' fully_qualified_class_name + { $$ = append($1, $3) } +; + +trait_adaptations: + ';' + { $$ = &nodesWithEndToken{nil, $1} } + | '{' trait_adaptation_list '}' + { $$ = &nodesWithEndToken{$2, $3} } +; + +trait_adaptation_list: + /* empty */ + { $$ = nil } + | non_empty_trait_adaptation_list + { $$ = $1 } +; + +non_empty_trait_adaptation_list: + trait_adaptation_statement + { $$ = []node.Node{$1} } + | non_empty_trait_adaptation_list trait_adaptation_statement + { $$ = append($1, $2) } +; + +trait_adaptation_statement: + trait_precedence ';' + { $$ = $1 } + | trait_alias ';' + { $$ = $1 } +; + +trait_precedence: + trait_method_reference_fully_qualified T_INSTEADOF trait_reference_list + { + name := name.NewName($3) + positions.AddPosition(name, positionBuilder.NewNodeListPosition($3)) + $$ = stmt.NewTraitUsePrecedence($1, name) + positions.AddPosition($$, positionBuilder.NewNodeNodeListPosition($1, $3)) + + comments.AddComments(name, ListGetFirstNodeComments($3)) + comments.AddComments($$, comments[$1]) + } +; + +trait_reference_list: + fully_qualified_class_name + { $$ = []node.Node{$1} } + | trait_reference_list ',' fully_qualified_class_name + { $$ = append($1, $3) } +; + +trait_method_reference: + T_STRING + { + name := node.NewIdentifier($1.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition($1)) + comments.AddComments(name, $1.Comments()) + + $$ = stmt.NewTraitMethodRef(nil, name) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } + | trait_method_reference_fully_qualified + { $$ = $1 } +; + +trait_method_reference_fully_qualified: + fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING + { + target := node.NewIdentifier($3.Value) + positions.AddPosition(target, positionBuilder.NewTokenPosition($3)) + comments.AddComments(target, $3.Comments()) + + $$ = stmt.NewTraitMethodRef($1, target) + positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } +; + +trait_alias: + trait_method_reference T_AS trait_modifiers T_STRING + { + alias := node.NewIdentifier($4.Value) + positions.AddPosition(alias, positionBuilder.NewTokenPosition($4)) + $$ = stmt.NewTraitUseAlias($1, $3, alias) + positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $4)) + + comments.AddComments(alias, $4.Comments()) + comments.AddComments($$, comments[$1]) + } + | trait_method_reference T_AS member_modifier + { + $$ = stmt.NewTraitUseAlias($1, $3, nil) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } +; + +trait_modifiers: + /* empty */ + { $$ = nil } + | member_modifier + { $$ = $1 } +; + +method_body: + ';' /* abstract method */ + { $$ = &nodesWithEndToken{nil, $1} } + | '{' inner_statement_list '}' + { $$ = &nodesWithEndToken{$2, $3} } +; + +variable_modifiers: + non_empty_member_modifiers + { $$ = $1; } + | T_VAR + { + modifier := node.NewIdentifier($1.Value) + positions.AddPosition(modifier, positionBuilder.NewTokenPosition($1)) + comments.AddComments(modifier, $1.Comments()) + + $$ = []node.Node{modifier} + } +; + +method_modifiers: + /* empty */ + { $$ = nil } + | non_empty_member_modifiers + { $$ = $1 } +; + +non_empty_member_modifiers: + member_modifier + { $$ = []node.Node{$1} } + | non_empty_member_modifiers member_modifier + { $$ = append($1, $2) } +; + +member_modifier: + T_PUBLIC + { + $$ = node.NewIdentifier($1.Value) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } + | T_PROTECTED + { + $$ = node.NewIdentifier($1.Value) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } + | T_PRIVATE + { + $$ = node.NewIdentifier($1.Value) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } + | T_STATIC + { + $$ = node.NewIdentifier($1.Value) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } + | T_ABSTRACT + { + $$ = node.NewIdentifier($1.Value) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } + | T_FINAL + { + $$ = node.NewIdentifier($1.Value) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } +; + +class_variable_declaration: + class_variable_declaration ',' T_VARIABLE + { + identifier := node.NewIdentifier($3.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition($3)) + comments.AddComments(identifier, $3.Comments()) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition($3)) + comments.AddComments(variable, $3.Comments()) + + property := stmt.NewProperty(variable, nil, "") + positions.AddPosition(property, positionBuilder.NewTokenPosition($3)) + comments.AddComments(property, $3.Comments()) + + $$ = append($1, property) + } + | class_variable_declaration ',' T_VARIABLE '=' static_scalar + { + identifier := node.NewIdentifier($3.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition($3)) + comments.AddComments(identifier, $3.Comments()) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition($3)) + comments.AddComments(variable, $3.Comments()) + + property := stmt.NewProperty(variable, $5, "") + positions.AddPosition(property, positionBuilder.NewTokenNodePosition($3, $5)) + comments.AddComments(property, $3.Comments()) + + $$ = append($1, property) + } + | T_VARIABLE + { + identifier := node.NewIdentifier($1.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition($1)) + comments.AddComments(identifier, $1.Comments()) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition($1)) + comments.AddComments(variable, $1.Comments()) + + property := stmt.NewProperty(variable, nil, "") + positions.AddPosition(property, positionBuilder.NewTokenPosition($1)) + comments.AddComments(property, $1.Comments()) + + $$ = []node.Node{property} + } + | T_VARIABLE '=' static_scalar + { + identifier := node.NewIdentifier($1.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition($1)) + comments.AddComments(identifier, $1.Comments()) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition($1)) + comments.AddComments(variable, $1.Comments()) + + property := stmt.NewProperty(variable, $3, "") + positions.AddPosition(property, positionBuilder.NewTokenNodePosition($1, $3)) + comments.AddComments(property, $1.Comments()) + + $$ = []node.Node{property} + } +; + +class_constant_declaration: + class_constant_declaration ',' T_STRING '=' static_scalar + { + name := node.NewIdentifier($3.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition($3)) + comments.AddComments(name, $3.Comments()) + + constant := stmt.NewConstant(name, $5, "") + positions.AddPosition(constant, positionBuilder.NewTokenNodePosition($3, $5)) + comments.AddComments(constant, $3.Comments()) + + $1.(*stmt.ConstList).Consts = append($1.(*stmt.ConstList).Consts, constant) + positions.AddPosition($1, positionBuilder.NewNodesPosition($1, $5)) + + $$ = $1 + } + | T_CONST T_STRING '=' static_scalar + { + name := node.NewIdentifier($2.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition($2)) + comments.AddComments(name, $2.Comments()) + + constant := stmt.NewConstant(name, $4, "") + positions.AddPosition(constant, positionBuilder.NewTokenNodePosition($2, $4)) + comments.AddComments(constant, $2.Comments()) + + $$ = stmt.NewClassConstList(nil, []node.Node{constant}) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $4)) + comments.AddComments($$, $1.Comments()) + } +; + +echo_expr_list: + echo_expr_list ',' expr + { $$ = append($1, $3) } + | expr + { $$ = []node.Node{$1} } +; + + +for_expr: + /* empty */ + { $$ = nil } + | non_empty_for_expr + { $$ = $1 } +; + +non_empty_for_expr: + non_empty_for_expr ',' expr + { $$ = append($1, $3) } + | expr + { $$ = []node.Node{$1} } +; + +chaining_method_or_property: + chaining_method_or_property variable_property + { $$ = append($1, $2...) } + | variable_property + { $$ = $1 } +; + +chaining_dereference: + chaining_dereference '[' dim_offset ']' + { + fetch := expr.NewArrayDimFetch(nil, $3) + positions.AddPosition(fetch, positionBuilder.NewNodePosition($3)) + + $$ = append($1, fetch) + } + | '[' dim_offset ']' + { + fetch := expr.NewArrayDimFetch(nil, $2) + positions.AddPosition(fetch, positionBuilder.NewNodePosition($2)) + + $$ = []node.Node{fetch} + } +; + +chaining_instance_call: + chaining_dereference chaining_method_or_property + { $$ = append($1, $2...) } + | chaining_dereference + { $$ = $1 } + | chaining_method_or_property + { $$ = $1 } +; + +instance_call: + /* empty */ + { $$ = nil } + | chaining_instance_call + { $$ = $1 } +; + +new_expr: + T_NEW class_name_reference ctor_arguments + { + if $3 != nil { + $$ = expr.NewNew($2, $3.nodes) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3.endToken)) + } else { + $$ = expr.NewNew($2, nil) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + } + + comments.AddComments($$, $1.Comments()) + } +; + +expr_without_variable: + T_LIST '(' assignment_list ')' '=' expr + { + list := expr.NewList($3) + positions.AddPosition(list, positionBuilder.NewTokensPosition($1, $4)) + $$ = assign_op.NewAssign(list, $6) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $6)) + + comments.AddComments(list, $1.Comments()) + comments.AddComments($$, $1.Comments()) + } + | variable '=' expr + { + $$ = assign_op.NewAssign($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | variable '=' '&' variable + { + $$ = assign_op.NewAssignRef($1, $4) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $4)) + comments.AddComments($$, comments[$1]) + } + | variable '=' '&' T_NEW class_name_reference ctor_arguments + { + _new := expr.NewNew($5, nil) + positions.AddPosition(_new, positionBuilder.NewTokenNodePosition($4, $5)) + + if $6 != nil { + _new := expr.NewNew($5, $6.nodes) + positions.AddPosition(_new, positionBuilder.NewTokensPosition($4, $6.endToken)) + } + comments.AddComments(_new, comments[$1]) + + $$ = assign_op.NewAssignRef($1, _new) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, _new)) + comments.AddComments($$, comments[$1]) + } + | T_CLONE expr + { + $$ = expr.NewClone($2) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | variable T_PLUS_EQUAL expr + { + $$ = assign_op.NewPlus($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | variable T_MINUS_EQUAL expr + { + $$ = assign_op.NewMinus($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | variable T_MUL_EQUAL expr + { + $$ = assign_op.NewMul($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | variable T_POW_EQUAL expr + { + $$ = assign_op.NewPow($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | variable T_DIV_EQUAL expr + { + $$ = assign_op.NewDiv($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | variable T_CONCAT_EQUAL expr + { + $$ = assign_op.NewConcat($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | variable T_MOD_EQUAL expr + { + $$ = assign_op.NewMod($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | variable T_AND_EQUAL expr + { + $$ = assign_op.NewBitwiseAnd($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | variable T_OR_EQUAL expr + { + $$ = assign_op.NewBitwiseOr($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | variable T_XOR_EQUAL expr + { + $$ = assign_op.NewBitwiseXor($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | variable T_SL_EQUAL expr + { + $$ = assign_op.NewShiftLeft($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | variable T_SR_EQUAL expr + { + $$ = assign_op.NewShiftRight($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | rw_variable T_INC + { + $$ = expr.NewPostInc($1) + positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $2)) + comments.AddComments($$, comments[$1]) + } + | T_INC rw_variable + { + $$ = expr.NewPreInc($2) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | rw_variable T_DEC + { + $$ = expr.NewPostDec($1) + positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $2)) + comments.AddComments($$, comments[$1]) + } + | T_DEC rw_variable + { + $$ = expr.NewPreDec($2) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | expr T_BOOLEAN_OR expr + { + $$ = binary_op.NewBooleanOr($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | expr T_BOOLEAN_AND expr + { + $$ = binary_op.NewBooleanAnd($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | expr T_LOGICAL_OR expr + { + $$ = binary_op.NewLogicalOr($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | expr T_LOGICAL_AND expr + { + $$ = binary_op.NewLogicalAnd($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | expr T_LOGICAL_XOR expr + { + $$ = binary_op.NewLogicalXor($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | expr '|' expr + { + $$ = binary_op.NewBitwiseOr($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | expr '&' expr + { + $$ = binary_op.NewBitwiseAnd($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | expr '^' expr + { + $$ = binary_op.NewBitwiseXor($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | expr '.' expr + { + $$ = binary_op.NewConcat($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | expr '+' expr + { + $$ = binary_op.NewPlus($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | expr '-' expr + { + $$ = binary_op.NewMinus($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | expr '*' expr + { + $$ = binary_op.NewMul($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | expr T_POW expr + { + $$ = binary_op.NewPow($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | expr '/' expr + { + $$ = binary_op.NewDiv($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | expr '%' expr + { + $$ = binary_op.NewMod($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | expr T_SL expr + { + $$ = binary_op.NewShiftLeft($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | expr T_SR expr + { + $$ = binary_op.NewShiftRight($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | '+' expr %prec T_INC + { + $$ = expr.NewUnaryPlus($2) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | '-' expr %prec T_INC + { + $$ = expr.NewUnaryMinus($2) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | '!' expr + { + $$ = expr.NewBooleanNot($2) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | '~' expr + { + $$ = expr.NewBitwiseNot($2) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | expr T_IS_IDENTICAL expr + { + $$ = binary_op.NewIdentical($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | expr T_IS_NOT_IDENTICAL expr + { + $$ = binary_op.NewNotIdentical($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | expr T_IS_EQUAL expr + { + $$ = binary_op.NewEqual($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | expr T_IS_NOT_EQUAL expr + { + $$ = binary_op.NewNotEqual($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | expr '<' expr + { + $$ = binary_op.NewSmaller($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | expr T_IS_SMALLER_OR_EQUAL expr + { + $$ = binary_op.NewSmallerOrEqual($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | expr '>' expr + { + $$ = binary_op.NewGreater($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | expr T_IS_GREATER_OR_EQUAL expr + { + $$ = binary_op.NewGreaterOrEqual($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | expr T_INSTANCEOF class_name_reference + { + $$ = expr.NewInstanceOf($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | parenthesis_expr + { $$ = $1 } + | new_expr + { $$ = $1 } + | '(' new_expr ')' instance_call + { + $$ = $2 + + for _, n := range($4) { + switch nn := n.(type) { + case *expr.ArrayDimFetch: + nn.Variable = $$ + positions.AddPosition($$, positionBuilder.NewNodesPosition($$, nn)) + comments.AddComments(nn, $1.Comments()) + $$ = nn + + case *expr.PropertyFetch: + nn.Variable = $$ + positions.AddPosition($$, positionBuilder.NewNodesPosition($$, nn)) + comments.AddComments(nn, $1.Comments()) + $$ = nn + + case *expr.MethodCall: + nn.Variable = $$ + positions.AddPosition($$, positionBuilder.NewNodesPosition($$, nn)) + comments.AddComments(nn, $1.Comments()) + $$ = nn + } + } + } + | expr '?' expr ':' expr + { + $$ = expr.NewTernary($1, $3, $5) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $5)) + comments.AddComments($$, comments[$1]) + } + | expr '?' ':' expr + { + $$ = expr.NewTernary($1, nil, $4) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $4)) + comments.AddComments($$, comments[$1]) + } + | internal_functions_in_yacc + { $$ = $1 } + | T_INT_CAST expr + { + $$ = cast.NewCastInt($2) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | T_DOUBLE_CAST expr + { + $$ = cast.NewCastDouble($2) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | T_STRING_CAST expr + { + $$ = cast.NewCastString($2) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | T_ARRAY_CAST expr + { + $$ = cast.NewCastArray($2) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | T_OBJECT_CAST expr + { + $$ = cast.NewCastObject($2) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | T_BOOL_CAST expr + { + $$ = cast.NewCastBool($2) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | T_UNSET_CAST expr + { + $$ = cast.NewCastUnset($2) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | T_EXIT exit_expr + { + $$ = expr.NewExit($2, strings.EqualFold($1.Value, "die")) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | '@' expr + { + $$ = expr.NewErrorSuppress($2) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | scalar + { $$ = $1 } + | combined_scalar_offset + { $$ = $1 } + | combined_scalar + { $$ = $1 } + | '`' backticks_expr '`' + { + $$ = expr.NewShellExec($2) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) + comments.AddComments($$, $1.Comments()) + } + | T_PRINT expr + { + $$ = expr.NewPrint($2) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | T_YIELD + { + $$ = expr.NewYield(nil, nil) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } + | function is_reference '(' parameter_list ')' lexical_vars '{' inner_statement_list '}' + { + $$ = expr.NewClosure($4, $6, nil, $8, false, $2.value, "") + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $9)) + + comments.AddComments($$, $1.Comments()) + } + | T_STATIC function is_reference '(' parameter_list ')' lexical_vars '{' inner_statement_list '}' + { + $$ = expr.NewClosure($5, $7, nil, $9, true, $3.value, "") + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $10)) + + comments.AddComments($$, $1.Comments()) + } +; + +yield_expr: + T_YIELD expr_without_variable + { + $$ = expr.NewYield(nil, $2) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | T_YIELD variable + { + $$ = expr.NewYield(nil, $2) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | T_YIELD expr T_DOUBLE_ARROW expr_without_variable + { + $$ = expr.NewYield($2, $4) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $4)) + comments.AddComments($$, $1.Comments()) + } + | T_YIELD expr T_DOUBLE_ARROW variable + { + $$ = expr.NewYield($2, $4) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $4)) + comments.AddComments($$, $1.Comments()) + } +; + +combined_scalar_offset: + combined_scalar '[' dim_offset ']' + { + $$ = expr.NewArrayDimFetch($1, $3) + positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $4)) + comments.AddComments($$, comments[$1]) + } + | combined_scalar_offset '[' dim_offset ']' + { + $$ = expr.NewArrayDimFetch($1, $3) + positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $4)) + comments.AddComments($$, comments[$1]) + } + | T_CONSTANT_ENCAPSED_STRING '[' dim_offset ']' + { + str := scalar.NewString($1.Value) + positions.AddPosition(str, positionBuilder.NewTokenPosition($1)) + comments.AddComments(str, $1.Comments()) + + $$ = expr.NewArrayDimFetch(str, $3) + positions.AddPosition($$, positionBuilder.NewNodeTokenPosition(str, $4)) + comments.AddComments($$, comments[str]) + } + | general_constant '[' dim_offset ']' + { + $$ = expr.NewArrayDimFetch($1, $3) + positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $4)) + comments.AddComments($$, comments[$1]) + } +; + +combined_scalar: + T_ARRAY '(' array_pair_list ')' + { + $$ = expr.NewArray($3) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) + comments.AddComments($$, $1.Comments()) + } + | '[' array_pair_list ']' + { + $$ = expr.NewShortArray($2) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) + comments.AddComments($$, $1.Comments()) + } +; + +function: + T_FUNCTION + { $$ = $1 } +; + +lexical_vars: + /* empty */ + { $$ = []node.Node{} } + | T_USE '(' lexical_var_list ')' + { $$ = $3; } +; + +lexical_var_list: + lexical_var_list ',' T_VARIABLE + { + identifier := node.NewIdentifier($3.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition($3)) + comments.AddComments(identifier, $3.Comments()) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition($3)) + comments.AddComments(variable, $3.Comments()) + + use := expr.NewClusureUse(variable, false) + positions.AddPosition(use, positionBuilder.NewTokenPosition($3)) + comments.AddComments(use, $3.Comments()) + + $$ = append($1, use) + } + | lexical_var_list ',' '&' T_VARIABLE + { + identifier := node.NewIdentifier($4.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition($4)) + comments.AddComments(identifier, $4.Comments()) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition($4)) + comments.AddComments(variable, $3.Comments()) + + use := expr.NewClusureUse(variable, true) + positions.AddPosition(use, positionBuilder.NewTokensPosition($3, $4)) + comments.AddComments(use, $3.Comments()) + + $$ = append($1, use) + } + | T_VARIABLE + { + identifier := node.NewIdentifier($1.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition($1)) + comments.AddComments(identifier, $1.Comments()) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition($1)) + comments.AddComments(variable, $1.Comments()) + + use := expr.NewClusureUse(variable, false) + positions.AddPosition(use, positionBuilder.NewTokenPosition($1)) + comments.AddComments(use, $1.Comments()) + + $$ = []node.Node{use} + } + | '&' T_VARIABLE + { + identifier := node.NewIdentifier($2.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition($2)) + comments.AddComments(identifier, $2.Comments()) + + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition($2)) + comments.AddComments(variable, $1.Comments()) + + use := expr.NewClusureUse(variable, true) + positions.AddPosition(use, positionBuilder.NewTokensPosition($1, $2)) + comments.AddComments(use, $1.Comments()) + + $$ = []node.Node{use} + } +; + +function_call: + namespace_name function_call_parameter_list + { + name := name.NewName($1) + positions.AddPosition(name, positionBuilder.NewNodeListPosition($1)) + comments.AddComments(name, ListGetFirstNodeComments($1)) + + $$ = expr.NewFunctionCall(name, $2.nodes) + positions.AddPosition($$, positionBuilder.NewNodeTokenPosition(name, $2.endToken)) + comments.AddComments($$, comments[name]) + } + | T_NAMESPACE T_NS_SEPARATOR namespace_name function_call_parameter_list + { + funcName := name.NewRelative($3) + positions.AddPosition(funcName, positionBuilder.NewTokenNodeListPosition($1, $3)) + comments.AddComments(funcName, $1.Comments()) + + $$ = expr.NewFunctionCall(funcName, $4.nodes) + positions.AddPosition($$, positionBuilder.NewNodeTokenPosition(funcName, $4.endToken)) + comments.AddComments($$, comments[funcName]) + } + | T_NS_SEPARATOR namespace_name function_call_parameter_list + { + funcName := name.NewFullyQualified($2) + positions.AddPosition(funcName, positionBuilder.NewTokenNodeListPosition($1, $2)) + comments.AddComments(funcName, $1.Comments()) + + $$ = expr.NewFunctionCall(funcName, $3.nodes) + positions.AddPosition($$, positionBuilder.NewNodeTokenPosition(funcName, $3.endToken)) + comments.AddComments($$, comments[funcName]) + } + | class_name T_PAAMAYIM_NEKUDOTAYIM variable_name function_call_parameter_list + { + $$ = expr.NewStaticCall($1, $3, $4.nodes) + positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $4.endToken)) + comments.AddComments($$, comments[$1]) + } + | class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects function_call_parameter_list + { + $$ = expr.NewStaticCall($1, $3, $4.nodes) + positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $4.endToken)) + comments.AddComments($$, comments[$1]) + } + | variable_class_name T_PAAMAYIM_NEKUDOTAYIM variable_name function_call_parameter_list + { + $$ = expr.NewStaticCall($1, $3, $4.nodes) + positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $4.endToken)) + comments.AddComments($$, comments[$1]) + } + | variable_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects function_call_parameter_list + { + $$ = expr.NewStaticCall($1, $3, $4.nodes) + positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $4.endToken)) + comments.AddComments($$, comments[$1]) + } + | variable_without_objects function_call_parameter_list + { + $$ = expr.NewFunctionCall($1, $2.nodes) + positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $2.endToken)) + comments.AddComments($$, comments[$1]) + } +; + +class_name: + T_STATIC + { + $$ = node.NewIdentifier($1.Value) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } + | namespace_name + { + $$ = name.NewName($1) + positions.AddPosition($$, positionBuilder.NewNodeListPosition($1)) + comments.AddComments($$, ListGetFirstNodeComments($1)) + } + | T_NAMESPACE T_NS_SEPARATOR namespace_name + { + $$ = name.NewRelative($3) + positions.AddPosition($$, positionBuilder.NewTokenNodeListPosition($1, $3)) + comments.AddComments($$, $1.Comments()) + } + | T_NS_SEPARATOR namespace_name + { + $$ = name.NewFullyQualified($2) + positions.AddPosition($$, positionBuilder.NewTokenNodeListPosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } +; + +fully_qualified_class_name: + namespace_name + { + $$ = name.NewName($1) + positions.AddPosition($$, positionBuilder.NewNodeListPosition($1)) + comments.AddComments($$, ListGetFirstNodeComments($1)) + } + | T_NAMESPACE T_NS_SEPARATOR namespace_name + { + $$ = name.NewRelative($3) + positions.AddPosition($$, positionBuilder.NewTokenNodeListPosition($1, $3)) + comments.AddComments($$, $1.Comments()) + } + | T_NS_SEPARATOR namespace_name + { + $$ = name.NewFullyQualified($2) + positions.AddPosition($$, positionBuilder.NewTokenNodeListPosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } +; + +class_name_reference: + class_name + { $$ = $1 } + | dynamic_class_name_reference + { $$ = $1 } +; + +dynamic_class_name_reference: + base_variable T_OBJECT_OPERATOR object_property dynamic_class_name_variable_properties + { + $$ = $1 + + for _, n := range($3) { + switch nn := n.(type) { + case *expr.ArrayDimFetch: + nn.Variable = $$ + positions.AddPosition($$, positionBuilder.NewNodesPosition($$, nn)) + comments.AddComments(nn, comments[$1]) + $$ = nn + + case *expr.PropertyFetch: + nn.Variable = $$ + positions.AddPosition($$, positionBuilder.NewNodesPosition($$, nn)) + comments.AddComments(nn, comments[$1]) + $$ = nn + + case *expr.MethodCall: + nn.Variable = $$ + positions.AddPosition($$, positionBuilder.NewNodesPosition($$, nn)) + comments.AddComments(nn, comments[$1]) + $$ = nn + } + } + + for _, n := range($4) { + switch nn := n.(type) { + case *expr.ArrayDimFetch: + nn.Variable = $$ + positions.AddPosition($$, positionBuilder.NewNodesPosition($$, nn)) + comments.AddComments(nn, comments[$1]) + $$ = nn + + case *expr.PropertyFetch: + nn.Variable = $$ + positions.AddPosition($$, positionBuilder.NewNodesPosition($$, nn)) + comments.AddComments(nn, comments[$1]) + $$ = nn + + case *expr.MethodCall: + nn.Variable = $$ + positions.AddPosition($$, positionBuilder.NewNodesPosition($$, nn)) + comments.AddComments(nn, comments[$1]) + $$ = nn + } + } + } + | base_variable + { $$ = $1 } +; + + +dynamic_class_name_variable_properties: + dynamic_class_name_variable_properties dynamic_class_name_variable_property + { $$ = append($1, $2...) } + | /* empty */ + { $$ = []node.Node{} } +; + + +dynamic_class_name_variable_property: + T_OBJECT_OPERATOR object_property + { $$ = $2 } +; + +exit_expr: + /* empty */ + { $$ = nil } + | '(' ')' + { $$ = nil } + | parenthesis_expr + { $$ = $1 } +; + +backticks_expr: + /* empty */ + { $$ = []node.Node{} } + | T_ENCAPSED_AND_WHITESPACE + { $$ = []node.Node{scalar.NewEncapsedStringPart($1.Value)} } + | encaps_list + { $$ = $1; } +; + +ctor_arguments: + /* empty */ + { $$ = nil } + | function_call_parameter_list + { $$ = $1 } +; + +common_scalar: + T_LNUMBER + { + $$ = scalar.NewLnumber($1.Value) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } + | T_DNUMBER + { + $$ = scalar.NewDnumber($1.Value) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } + | T_CONSTANT_ENCAPSED_STRING + { + $$ = scalar.NewString($1.Value) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } + | T_LINE + { + $$ = scalar.NewMagicConstant($1.Value) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } + | T_FILE + { + $$ = scalar.NewMagicConstant($1.Value) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } + | T_DIR + { + $$ = scalar.NewMagicConstant($1.Value) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } + | T_TRAIT_C + { + $$ = scalar.NewMagicConstant($1.Value) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } + | T_METHOD_C + { + $$ = scalar.NewMagicConstant($1.Value) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } + | T_FUNC_C + { + $$ = scalar.NewMagicConstant($1.Value) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } + | T_NS_C + { + $$ = scalar.NewMagicConstant($1.Value) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } + | T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC + { + $$ = scalar.NewString($2.Value) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3))/* TODO: mark as Heredoc*/ + comments.AddComments($$, $1.Comments()) + } + | T_START_HEREDOC T_END_HEREDOC + { + $$ = scalar.NewEncapsed(nil) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } +; + +static_class_constant: + class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING + { + target := node.NewIdentifier($3.Value) + positions.AddPosition(target, positionBuilder.NewTokenPosition($3)) + $$ = expr.NewClassConstFetch($1, target) + positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $3)) + + comments.AddComments(target, $3.Comments()) + comments.AddComments($$, comments[$1]) + } +; + +static_scalar: + static_scalar_value + { $$ = $1 } +; + +static_scalar_value: + common_scalar + { $$ = $1 } + | static_class_name_scalar + { $$ = $1 } + | namespace_name + { + $$ = name.NewName($1) + positions.AddPosition($$, positionBuilder.NewNodeListPosition($1)) + comments.AddComments($$, ListGetFirstNodeComments($1)) + } + | T_NAMESPACE T_NS_SEPARATOR namespace_name + { + $$ = name.NewRelative($3) + positions.AddPosition($$, positionBuilder.NewTokenNodeListPosition($1, $3)) + comments.AddComments($$, $1.Comments()) + } + | T_NS_SEPARATOR namespace_name + { + $$ = name.NewFullyQualified($2) + positions.AddPosition($$, positionBuilder.NewTokenNodeListPosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | T_ARRAY '(' static_array_pair_list ')' + { + $$ = expr.NewArray($3) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) + comments.AddComments($$, $1.Comments()) + } + | '[' static_array_pair_list ']' + { + $$ = expr.NewShortArray($2) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) + comments.AddComments($$, $1.Comments()) + } + | static_class_constant + { $$ = $1 } + | T_CLASS_C + { + $$ = scalar.NewMagicConstant($1.Value) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } + | static_operation + { $$ = $1 } +; + +static_operation: + static_scalar_value '[' static_scalar_value ']' + { + $$ = expr.NewArrayDimFetch($1, $3) + positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $4)) + comments.AddComments($$, comments[$1]) + } + | static_scalar_value '+' static_scalar_value + { + $$ = binary_op.NewPlus($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | static_scalar_value '-' static_scalar_value + { + $$ = binary_op.NewMinus($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | static_scalar_value '*' static_scalar_value + { + $$ = binary_op.NewMul($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | static_scalar_value T_POW static_scalar_value + { + $$ = binary_op.NewPow($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | static_scalar_value '/' static_scalar_value + { + $$ = binary_op.NewDiv($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | static_scalar_value '%' static_scalar_value + { + $$ = binary_op.NewMod($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | '!' static_scalar_value + { + $$ = expr.NewBooleanNot($2) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | '~' static_scalar_value + { + $$ = expr.NewBitwiseNot($2) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | static_scalar_value '|' static_scalar_value + { + $$ = binary_op.NewBitwiseOr($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | static_scalar_value '&' static_scalar_value + { + $$ = binary_op.NewBitwiseAnd($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | static_scalar_value '^' static_scalar_value + { + $$ = binary_op.NewBitwiseXor($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | static_scalar_value T_SL static_scalar_value + { + $$ = binary_op.NewShiftLeft($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | static_scalar_value T_SR static_scalar_value + { + $$ = binary_op.NewShiftRight($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | static_scalar_value '.' static_scalar_value + { + $$ = binary_op.NewConcat($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | static_scalar_value T_LOGICAL_XOR static_scalar_value + { + $$ = binary_op.NewLogicalXor($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | static_scalar_value T_LOGICAL_AND static_scalar_value + { + $$ = binary_op.NewLogicalAnd($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | static_scalar_value T_LOGICAL_OR static_scalar_value + { + $$ = binary_op.NewLogicalOr($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | static_scalar_value T_BOOLEAN_AND static_scalar_value + { + $$ = binary_op.NewBooleanAnd($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | static_scalar_value T_BOOLEAN_OR static_scalar_value + { + $$ = binary_op.NewBooleanOr($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | static_scalar_value T_IS_IDENTICAL static_scalar_value + { + $$ = binary_op.NewIdentical($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | static_scalar_value T_IS_NOT_IDENTICAL static_scalar_value + { + $$ = binary_op.NewNotIdentical($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | static_scalar_value T_IS_EQUAL static_scalar_value + { + $$ = binary_op.NewEqual($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | static_scalar_value T_IS_NOT_EQUAL static_scalar_value + { + $$ = binary_op.NewNotEqual($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | static_scalar_value '<' static_scalar_value + { + $$ = binary_op.NewSmaller($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | static_scalar_value '>' static_scalar_value + { + $$ = binary_op.NewGreater($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | static_scalar_value T_IS_SMALLER_OR_EQUAL static_scalar_value + { + $$ = binary_op.NewSmallerOrEqual($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | static_scalar_value T_IS_GREATER_OR_EQUAL static_scalar_value + { + $$ = binary_op.NewGreaterOrEqual($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | static_scalar_value '?' ':' static_scalar_value + { + $$ = expr.NewTernary($1, nil, $4) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $4)) + comments.AddComments($$, comments[$1]) + } + | static_scalar_value '?' static_scalar_value ':' static_scalar_value + { + $$ = expr.NewTernary($1, $3, $5) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $5)) + comments.AddComments($$, comments[$1]) + } + | '+' static_scalar_value + { + $$ = expr.NewUnaryPlus($2) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | '-' static_scalar_value + { + $$ = expr.NewUnaryMinus($2) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | '(' static_scalar_value ')' + { $$ = $2 } +; + +general_constant: + class_constant + { $$ = $1 } + | namespace_name + { + $$ = name.NewName($1) + positions.AddPosition($$, positionBuilder.NewNodeListPosition($1)) + comments.AddComments($$, ListGetFirstNodeComments($1)) + } + | T_NAMESPACE T_NS_SEPARATOR namespace_name + { + $$ = name.NewRelative($3) + positions.AddPosition($$, positionBuilder.NewTokenNodeListPosition($1, $3)) + comments.AddComments($$, $1.Comments()) + } + | T_NS_SEPARATOR namespace_name + { + $$ = name.NewFullyQualified($2) + positions.AddPosition($$, positionBuilder.NewTokenNodeListPosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } +; + +scalar: + T_STRING_VARNAME + { + name := node.NewIdentifier($1.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition($1)) + $$ = expr.NewVariable(name) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + + comments.AddComments(name, $1.Comments()) + comments.AddComments($$, $1.Comments()) + } + | general_constant + { $$ = $1 } + | class_name_scalar + { $$ = $1 } + | common_scalar + { $$ = $1 } + | '"' encaps_list '"' + { + $$ = scalar.NewEncapsed($2) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) + comments.AddComments($$, $1.Comments()) + } + | T_START_HEREDOC encaps_list T_END_HEREDOC + { + $$ = scalar.NewEncapsed($2) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) + comments.AddComments($$, $1.Comments()) + } + | T_CLASS_C + { + $$ = scalar.NewMagicConstant($1.Value) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } +; + +static_array_pair_list: + /* empty */ + { $$ = nil } + | non_empty_static_array_pair_list possible_comma + { $$ = $1 } +; + +possible_comma: + /* empty */ + | ',' +; + +non_empty_static_array_pair_list: + non_empty_static_array_pair_list ',' static_scalar_value T_DOUBLE_ARROW static_scalar_value + { + arrayItem := expr.NewArrayItem($3, $5, false) + positions.AddPosition(arrayItem, positionBuilder.NewNodesPosition($3, $5)) + comments.AddComments(arrayItem, comments[$3]) + + $$ = append($1, arrayItem) + } + | non_empty_static_array_pair_list ',' static_scalar_value + { + arrayItem := expr.NewArrayItem(nil, $3, false) + positions.AddPosition(arrayItem, positionBuilder.NewNodePosition($3)) + comments.AddComments(arrayItem, comments[$3]) + + $$ = append($1, arrayItem) + } + | static_scalar_value T_DOUBLE_ARROW static_scalar_value + { + arrayItem := expr.NewArrayItem($1, $3, false) + positions.AddPosition(arrayItem, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments(arrayItem, comments[$1]) + + $$ = []node.Node{arrayItem} + } + | static_scalar_value + { + arrayItem := expr.NewArrayItem(nil, $1, false) + positions.AddPosition(arrayItem, positionBuilder.NewNodePosition($1)) + comments.AddComments(arrayItem, comments[$1]) + + $$ = []node.Node{arrayItem} + } +; + +expr: + r_variable + { $$ = $1 } + | expr_without_variable + { $$ = $1 } +; + +parenthesis_expr: + '(' expr ')' + { $$ = $2 } + | '(' yield_expr ')' + { $$ = $2 } +; + + +r_variable: + variable + { $$ = $1 } +; + + +w_variable: + variable + { $$ = $1 } +; + +rw_variable: + variable + { $$ = $1 } +; + +variable: + base_variable_with_function_calls T_OBJECT_OPERATOR object_property method_or_not variable_properties + { + $$ = $1 + + if $4 != nil { + $4[0].(*expr.MethodCall).Method = $3[len($3)-1].(*expr.PropertyFetch).Property + $3 = append($3[:len($3)-1], $4...) + } + + for _, n := range($3) { + switch nn := n.(type) { + case *expr.ArrayDimFetch: + nn.Variable = $$ + positions.AddPosition($$, positionBuilder.NewNodesPosition($$, nn)) + comments.AddComments(nn, comments[$1]) + $$ = nn + + case *expr.PropertyFetch: + nn.Variable = $$ + positions.AddPosition($$, positionBuilder.NewNodesPosition($$, nn)) + comments.AddComments(nn, comments[$1]) + $$ = nn + + case *expr.MethodCall: + nn.Variable = $$ + positions.AddPosition($$, positionBuilder.NewNodesPosition($$, nn)) + comments.AddComments(nn, comments[$1]) + $$ = nn + } + } + + for _, n := range($5) { + switch nn := n.(type) { + case *expr.ArrayDimFetch: + nn.Variable = $$ + positions.AddPosition($$, positionBuilder.NewNodesPosition($$, nn)) + comments.AddComments(nn, comments[$1]) + $$ = nn + + case *expr.PropertyFetch: + nn.Variable = $$ + positions.AddPosition($$, positionBuilder.NewNodesPosition($$, nn)) + comments.AddComments(nn, comments[$1]) + $$ = nn + + case *expr.MethodCall: + nn.Variable = $$ + positions.AddPosition($$, positionBuilder.NewNodesPosition($$, nn)) + comments.AddComments(nn, comments[$1]) + $$ = nn + } + } + } + | base_variable_with_function_calls + { $$ = $1 } +; + +variable_properties: + variable_properties variable_property + { $$ = append($1, $2...) } + | /* empty */ + { $$ = []node.Node{} } +; + + +variable_property: + T_OBJECT_OPERATOR object_property method_or_not + { + if $3 != nil { + $3[0].(*expr.MethodCall).Method = $2[len($2)-1].(*expr.PropertyFetch).Property + $2 = append($2[:len($2)-1], $3...) + } + + $$ = $2 + } +; + +array_method_dereference: + array_method_dereference '[' dim_offset ']' + { + fetch := expr.NewArrayDimFetch(nil, $3) + positions.AddPosition(fetch, positionBuilder.NewNodePosition($3)) + + $$ = append($1, fetch) + } + | method '[' dim_offset ']' + { + fetch := expr.NewArrayDimFetch(nil, $3) + positions.AddPosition(fetch, positionBuilder.NewNodePosition($3)) + + $$ = []node.Node{$1, fetch} + } +; + +method: + function_call_parameter_list + { + $$ = expr.NewMethodCall(nil, nil, $1.nodes) + positions.AddPosition($$, positionBuilder.NewNodeListTokenPosition($1.nodes, $1.endToken)) + } +; + +method_or_not: + method + { $$ = []node.Node{$1} } + | array_method_dereference + { $$ = $1 } + | /* empty */ + { $$ = nil } +; + +variable_without_objects: + reference_variable + { $$ = $1 } + | simple_indirect_reference reference_variable + { + $1.last.SetVarName($2) + + for _, n := range($1.all) { + positions[n] = positionBuilder.NewNodesPosition(n, $2) + } + + $$ = $1.all[0] + } +; + +static_member: + class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects + { + $$ = expr.NewStaticPropertyFetch($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + | variable_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects + { + $$ = expr.NewStaticPropertyFetch($1, $3) + positions.AddPosition($$, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments($$, comments[$1]) + } + +; + +variable_class_name: + reference_variable + { $$ = $1 } +; + +array_function_dereference: + array_function_dereference '[' dim_offset ']' + { + $$ = expr.NewArrayDimFetch($1, $3) + positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $4)) + comments.AddComments($$, comments[$1]) + } + | function_call '[' dim_offset ']' + { + $$ = expr.NewArrayDimFetch($1, $3) + positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $4)) + comments.AddComments($$, comments[$1]) + } +; + +base_variable_with_function_calls: + base_variable { $$ = $1 } + | array_function_dereference { $$ = $1 } + | function_call { $$ = $1 } +; + + +base_variable: + reference_variable + { $$ = $1 } + | simple_indirect_reference reference_variable + { + $1.last.SetVarName($2) + + for _, n := range($1.all) { + positions[n] = positionBuilder.NewNodesPosition(n, $2) + } + + $$ = $1.all[0] + } + | static_member + { $$ = $1 } +; + +reference_variable: + reference_variable '[' dim_offset ']' + { + $$ = expr.NewArrayDimFetch($1, $3) + positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $4)) + comments.AddComments($$, comments[$1]) + } + | reference_variable '{' expr '}' + { + $$ = expr.NewArrayDimFetch($1, $3) + positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $4)) + comments.AddComments($$, comments[$1]) + } + | compound_variable + { $$ = $1 } +; + + +compound_variable: + T_VARIABLE + { + name := node.NewIdentifier($1.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition($1)) + $$ = expr.NewVariable(name) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + + comments.AddComments(name, $1.Comments()) + comments.AddComments($$, $1.Comments()) + } + | '$' '{' expr '}' + { + $$ = expr.NewVariable($3) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) + comments.AddComments($$, $1.Comments()) + } +; + +dim_offset: + /* empty */ + { $$ = nil } + | expr + { $$ = $1 } +; + + +object_property: + object_dim_list + { $$ = $1 } + | variable_without_objects + { + fetch := expr.NewPropertyFetch(nil, $1) + positions.AddPosition(fetch, positionBuilder.NewNodePosition($1)) + + $$ = []node.Node{fetch} + } +; + +object_dim_list: + object_dim_list '[' dim_offset ']' + { + fetch := expr.NewArrayDimFetch(nil, $3) + positions.AddPosition(fetch, positionBuilder.NewNodePosition($3)) + + $$ = append($1, fetch) + } + | object_dim_list '{' expr '}' + { + fetch := expr.NewArrayDimFetch(nil, $3) + positions.AddPosition(fetch, positionBuilder.NewNodePosition($3)) + + $$ = append($1, fetch) + } + | variable_name + { + fetch := expr.NewPropertyFetch(nil, $1) + positions.AddPosition(fetch, positionBuilder.NewNodePosition($1)) + + $$ = []node.Node{fetch} + } +; + +variable_name: + T_STRING + { + $$ = node.NewIdentifier($1.Value) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } + | '{' expr '}' + { $$ = $2 } +; + +simple_indirect_reference: + '$' + { + n := expr.NewVariable(nil) + positions.AddPosition(n, positionBuilder.NewTokenPosition($1)) + comments.AddComments(n, $1.Comments()) + + $$ = simpleIndirectReference{[]*expr.Variable{n}, n} + } + | simple_indirect_reference '$' + { + n := expr.NewVariable(nil) + positions.AddPosition(n, positionBuilder.NewTokenPosition($2)) + comments.AddComments(n, $2.Comments()) + + $1.last.SetVarName(n) + + $1.all = append($1.all, n) + $1.last = n + $$ = $1 + } +; + +assignment_list: + assignment_list ',' assignment_list_element + { $$ = append($1, $3) } + | assignment_list_element + { $$ = []node.Node{$1} } +; + + +assignment_list_element: + variable + { $$ = $1 } + | T_LIST '(' assignment_list ')' + { + $$ = expr.NewList($3) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) + comments.AddComments($$, $1.Comments()) + } + | /* empty */ + { $$ = nil } +; + + +array_pair_list: + /* empty */ + { $$ = nil } + | non_empty_array_pair_list possible_comma + { $$ = $1 } +; + +non_empty_array_pair_list: + non_empty_array_pair_list ',' expr T_DOUBLE_ARROW expr + { + arrayItem := expr.NewArrayItem($3, $5, false) + positions.AddPosition(arrayItem, positionBuilder.NewNodesPosition($3, $5)) + comments.AddComments(arrayItem, comments[$3]) + + $$ = append($1, arrayItem) + } + | non_empty_array_pair_list ',' expr + { + arrayItem := expr.NewArrayItem(nil, $3, false) + positions.AddPosition(arrayItem, positionBuilder.NewNodePosition($3)) + comments.AddComments(arrayItem, comments[$3]) + + $$ = append($1, arrayItem) + } + | expr T_DOUBLE_ARROW expr + { + arrayItem := expr.NewArrayItem($1, $3, false) + positions.AddPosition(arrayItem, positionBuilder.NewNodesPosition($1, $3)) + comments.AddComments(arrayItem, comments[$1]) + + $$ = []node.Node{arrayItem} + } + | expr + { + arrayItem := expr.NewArrayItem(nil, $1, false) + positions.AddPosition(arrayItem, positionBuilder.NewNodePosition($1)) + comments.AddComments(arrayItem, comments[$1]) + + $$ = []node.Node{arrayItem} + } + | non_empty_array_pair_list ',' expr T_DOUBLE_ARROW '&' w_variable + { + arrayItem := expr.NewArrayItem($3, $6, true) + positions.AddPosition(arrayItem, positionBuilder.NewNodesPosition($3, $6)) + comments.AddComments(arrayItem, comments[$3]) + + $$ = append($1, arrayItem) + } + | non_empty_array_pair_list ',' '&' w_variable + { + arrayItem := expr.NewArrayItem(nil, $4, true) + positions.AddPosition(arrayItem, positionBuilder.NewTokenNodePosition($3, $4)) + comments.AddComments(arrayItem, $3.Comments()) + + $$ = append($1, arrayItem) + } + | expr T_DOUBLE_ARROW '&' w_variable + { + arrayItem := expr.NewArrayItem($1, $4, true) + positions.AddPosition(arrayItem, positionBuilder.NewNodesPosition($1, $4)) + comments.AddComments(arrayItem, comments[$1]) + + $$ = []node.Node{arrayItem} + } + | '&' w_variable + { + arrayItem := expr.NewArrayItem(nil, $2, true) + positions.AddPosition(arrayItem, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments(arrayItem, $1.Comments()) + + $$ = []node.Node{arrayItem} + } +; + +encaps_list: + encaps_list encaps_var + { $$ = append($1, $2) } + | encaps_list T_ENCAPSED_AND_WHITESPACE + { + encapsed := scalar.NewEncapsedStringPart($2.Value) + positions.AddPosition(encapsed, positionBuilder.NewTokenPosition($2)) + $$ = append($1, encapsed) + comments.AddComments(encapsed, $2.Comments()) + } + | encaps_var + { $$ = []node.Node{$1} } + | T_ENCAPSED_AND_WHITESPACE encaps_var + { + encapsed := scalar.NewEncapsedStringPart($1.Value) + positions.AddPosition(encapsed, positionBuilder.NewTokenPosition($1)) + $$ = []node.Node{encapsed, $2} + comments.AddComments(encapsed, $1.Comments()) + } +; + +encaps_var: + T_VARIABLE + { + name := node.NewIdentifier($1.Value) + positions.AddPosition(name, positionBuilder.NewTokenPosition($1)) + $$ = expr.NewVariable(name) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + + comments.AddComments(name, $1.Comments()) + comments.AddComments($$, $1.Comments()) + } + | T_VARIABLE '[' encaps_var_offset ']' + { + identifier := node.NewIdentifier($1.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition($1)) + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition($1)) + $$ = expr.NewArrayDimFetch(variable, $3) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) + + comments.AddComments(identifier, $1.Comments()) + comments.AddComments(variable, $1.Comments()) + comments.AddComments($$, $1.Comments()) + } + | T_VARIABLE T_OBJECT_OPERATOR T_STRING + { + identifier := node.NewIdentifier($1.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition($1)) + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition($1)) + fetch := node.NewIdentifier($3.Value) + positions.AddPosition(fetch, positionBuilder.NewTokenPosition($3)) + $$ = expr.NewPropertyFetch(variable, fetch) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) + + comments.AddComments(identifier, $1.Comments()) + comments.AddComments(variable, $1.Comments()) + comments.AddComments(fetch, $3.Comments()) + comments.AddComments($$, $1.Comments()) + } + | T_DOLLAR_OPEN_CURLY_BRACES expr '}' + { + $$ = expr.NewVariable($2) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $3)) + comments.AddComments($$, $1.Comments()) + } + | T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' expr ']' '}' + { + identifier := node.NewIdentifier($2.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition($2)) + variable := expr.NewVariable(identifier) + positions.AddPosition(variable, positionBuilder.NewTokenPosition($2)) + $$ = expr.NewArrayDimFetch(variable, $4) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $6)) + + + comments.AddComments(identifier, $2.Comments()) + comments.AddComments(variable, $1.Comments()) + comments.AddComments($$, $1.Comments()) + } + | T_CURLY_OPEN variable '}' + { $$ = $2; } +; + +encaps_var_offset: + T_STRING + { + $$ = scalar.NewString($1.Value) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + comments.AddComments($$, $1.Comments()) + } + | T_NUM_STRING + { + // TODO: add option to handle 64 bit integer + if _, err := strconv.Atoi($1.Value); err == nil { + $$ = scalar.NewLnumber($1.Value) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + } else { + $$ = scalar.NewString($1.Value) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + } + comments.AddComments($$, $1.Comments()) + } + | T_VARIABLE + { + identifier := node.NewIdentifier($1.Value) + positions.AddPosition(identifier, positionBuilder.NewTokenPosition($1)) + $$ = expr.NewVariable(identifier) + positions.AddPosition($$, positionBuilder.NewTokenPosition($1)) + + comments.AddComments(identifier, $1.Comments()) + comments.AddComments($$, $1.Comments()) + } +; + +internal_functions_in_yacc: + T_ISSET '(' isset_variables ')' + { + $$ = expr.NewIsset($3) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) + comments.AddComments($$, $1.Comments()) + } + | T_EMPTY '(' variable ')' + { + $$ = expr.NewEmpty($3) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) + comments.AddComments($$, $1.Comments()) + } + | T_EMPTY '(' expr_without_variable ')' + { + $$ = expr.NewEmpty($3) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) + comments.AddComments($$, $1.Comments()) + } + | T_INCLUDE expr + { + $$ = expr.NewInclude($2) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | T_INCLUDE_ONCE expr + { + $$ = expr.NewIncludeOnce($2) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | T_EVAL '(' expr ')' + { + $$ = expr.NewEval($3) + positions.AddPosition($$, positionBuilder.NewTokensPosition($1, $4)) + comments.AddComments($$, $1.Comments()) + } + | T_REQUIRE expr + { + $$ = expr.NewRequire($2) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } + | T_REQUIRE_ONCE expr + { + $$ = expr.NewRequireOnce($2) + positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) + comments.AddComments($$, $1.Comments()) + } +; + +isset_variables: + isset_variable + { $$ = []node.Node{$1} } + | isset_variables ',' isset_variable + { $$ = append($1, $3) } +; + +isset_variable: + variable + { $$ = $1 } + | expr_without_variable + { $$ = $1 } +; + +class_constant: + class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING + { + target := node.NewIdentifier($3.Value) + positions.AddPosition(target, positionBuilder.NewTokenPosition($3)) + $$ = expr.NewClassConstFetch($1, target) + positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $3)) + + comments.AddComments(target, $3.Comments()) + comments.AddComments($$, comments[$1]) + } + | variable_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING + { + target := node.NewIdentifier($3.Value) + positions.AddPosition(target, positionBuilder.NewTokenPosition($3)) + $$ = expr.NewClassConstFetch($1, target) + positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $3)) + + comments.AddComments(target, $3.Comments()) + comments.AddComments($$, comments[$1]) + } +; + +static_class_name_scalar: + class_name T_PAAMAYIM_NEKUDOTAYIM T_CLASS + { + target := node.NewIdentifier($3.Value) + positions.AddPosition(target, positionBuilder.NewTokenPosition($3)) + $$ = expr.NewClassConstFetch($1, target) + positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $3)) + + comments.AddComments(target, $3.Comments()) + comments.AddComments($$, comments[$1]) + } +; + +class_name_scalar: + class_name T_PAAMAYIM_NEKUDOTAYIM T_CLASS + { + target := node.NewIdentifier($3.Value) + positions.AddPosition(target, positionBuilder.NewTokenPosition($3)) + $$ = expr.NewClassConstFetch($1, target) + positions.AddPosition($$, positionBuilder.NewNodeTokenPosition($1, $3)) + + comments.AddComments(target, $3.Comments()) + comments.AddComments($$, comments[$1]) + } +; + +%% \ No newline at end of file diff --git a/php7/lexer.go b/php7/lexer.go new file mode 100644 index 0000000..02dfd5f --- /dev/null +++ b/php7/lexer.go @@ -0,0 +1,41 @@ +package php7 + +import ( + "bufio" + goToken "go/token" + "io" + + "github.com/cznic/golex/lex" + + "github.com/z7zmey/php-parser/scanner" + "github.com/z7zmey/php-parser/token" +) + +type lexer struct { + scanner.Lexer +} + +func (l *lexer) Lex(lval *yySymType) int { + return l.Lexer.Lex(lval) +} + +func (lval *yySymType) Token(t token.Token) { + lval.token = t +} + +func newLexer(src io.Reader, fName string) *lexer { + file := goToken.NewFileSet().AddFile(fName, -1, 1<<31-1) + lx, err := lex.New(file, bufio.NewReader(src), lex.RuneClass(scanner.Rune2Class)) + if err != nil { + panic(err) + } + + return &lexer{ + scanner.Lexer{ + Lexer: lx, + StateStack: []int{0}, + PhpDocComment: "", + Comments: nil, + }, + } +} diff --git a/php7/parser.go b/php7/parser.go new file mode 100644 index 0000000..ec04bb5 --- /dev/null +++ b/php7/parser.go @@ -0,0 +1,52 @@ +package php7 + +import ( + "io" + + "github.com/z7zmey/php-parser/comment" + "github.com/z7zmey/php-parser/node" + "github.com/z7zmey/php-parser/node/stmt" + "github.com/z7zmey/php-parser/position" + "github.com/z7zmey/php-parser/token" +) + +var rootnode node.Node +var comments comment.Comments +var positions position.Positions +var positionBuilder position.Builder + +func Parse(src io.Reader, fName string) (node.Node, comment.Comments, position.Positions) { + yyDebug = 0 + yyErrorVerbose = true + rootnode = stmt.NewStmtList([]node.Node{}) //reset + comments = comment.Comments{} + positions = position.Positions{} + positionBuilder = position.Builder{&positions} + yyParse(newLexer(src, fName)) + return rootnode, comments, positions +} + +func ListGetFirstNodeComments(list []node.Node) []comment.Comment { + if len(list) == 0 { + return nil + } + + node := list[0] + + return comments[node] +} + +type foreachVariable struct { + node node.Node + byRef bool +} + +type nodesWithEndToken struct { + nodes []node.Node + endToken token.Token +} + +type boolWithToken struct { + value bool + token *token.Token +} \ No newline at end of file diff --git a/parser/php7.go b/php7/php7.go similarity index 70% rename from parser/php7.go rename to php7/php7.go index fe97e6d..a825022 100644 --- a/parser/php7.go +++ b/php7/php7.go @@ -1,11 +1,13 @@ -//line parser/php7.y:2 -package parser +//line php7/php7.y:2 +package php7 import __yyfmt__ "fmt" -//line parser/php7.y:2 +//line php7/php7.y:2 import ( - "github.com/z7zmey/php-parser/comment" + "strconv" + "strings" + "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node/expr" "github.com/z7zmey/php-parser/node/expr/assign_op" @@ -14,55 +16,10 @@ import ( "github.com/z7zmey/php-parser/node/name" "github.com/z7zmey/php-parser/node/scalar" "github.com/z7zmey/php-parser/node/stmt" - "github.com/z7zmey/php-parser/position" "github.com/z7zmey/php-parser/token" - "io" - "strconv" - "strings" ) -var rootnode node.Node -var comments comment.Comments -var positions position.Positions -var positionBuilder position.Builder - -func ParsePhp7(src io.Reader, fName string) (node.Node, comment.Comments, position.Positions) { - yyDebug = 0 - yyErrorVerbose = true - rootnode = stmt.NewStmtList([]node.Node{}) //reset - comments = comment.Comments{} - positions = position.Positions{} - positionBuilder = position.Builder{&positions} - yyParse(newLexer(src, fName)) - return rootnode, comments, positions -} - -func ListGetFirstNodeComments(list []node.Node) []comment.Comment { - if len(list) == 0 { - return nil - } - - node := list[0] - - return comments[node] -} - -type foreachVariable struct { - node node.Node - byRef bool -} - -type nodesWithEndToken struct { - nodes []node.Node - endToken token.Token -} - -type boolWithToken struct { - value bool - token *token.Token -} - -//line parser/php7.y:64 +//line php7/php7.y:21 type yySymType struct { yys int node node.Node @@ -76,140 +33,140 @@ type yySymType struct { const T_INCLUDE = 57346 const T_INCLUDE_ONCE = 57347 -const T_EVAL = 57348 -const T_REQUIRE = 57349 -const T_REQUIRE_ONCE = 57350 -const T_LOGICAL_OR = 57351 -const T_LOGICAL_XOR = 57352 -const T_LOGICAL_AND = 57353 -const T_PRINT = 57354 -const T_YIELD = 57355 -const T_DOUBLE_ARROW = 57356 -const T_YIELD_FROM = 57357 -const T_PLUS_EQUAL = 57358 -const T_MINUS_EQUAL = 57359 -const T_MUL_EQUAL = 57360 -const T_DIV_EQUAL = 57361 -const T_CONCAT_EQUAL = 57362 -const T_MOD_EQUAL = 57363 -const T_AND_EQUAL = 57364 -const T_OR_EQUAL = 57365 -const T_XOR_EQUAL = 57366 -const T_SL_EQUAL = 57367 -const T_SR_EQUAL = 57368 -const T_POW_EQUAL = 57369 -const T_COALESCE = 57370 -const T_BOOLEAN_OR = 57371 -const T_BOOLEAN_AND = 57372 -const T_IS_EQUAL = 57373 -const T_IS_NOT_EQUAL = 57374 -const T_IS_IDENTICAL = 57375 -const T_IS_NOT_IDENTICAL = 57376 -const T_SPACESHIP = 57377 -const T_IS_SMALLER_OR_EQUAL = 57378 -const T_IS_GREATER_OR_EQUAL = 57379 -const T_SL = 57380 -const T_SR = 57381 -const T_INSTANCEOF = 57382 -const T_INC = 57383 -const T_DEC = 57384 -const T_INT_CAST = 57385 -const T_DOUBLE_CAST = 57386 -const T_STRING_CAST = 57387 -const T_ARRAY_CAST = 57388 -const T_OBJECT_CAST = 57389 -const T_BOOL_CAST = 57390 -const T_UNSET_CAST = 57391 -const T_POW = 57392 -const T_NEW = 57393 -const T_CLONE = 57394 -const T_NOELSE = 57395 -const T_ELSEIF = 57396 -const T_ELSE = 57397 -const T_ENDIF = 57398 -const T_STATIC = 57399 -const T_ABSTRACT = 57400 -const T_FINAL = 57401 -const T_PRIVATE = 57402 -const T_PROTECTED = 57403 -const T_PUBLIC = 57404 -const T_EXIT = 57405 -const T_IF = 57406 -const T_LNUMBER = 57407 -const T_DNUMBER = 57408 -const T_STRING = 57409 -const T_STRING_VARNAME = 57410 -const T_VARIABLE = 57411 -const T_NUM_STRING = 57412 -const T_INLINE_HTML = 57413 -const T_CHARACTER = 57414 -const T_BAD_CHARACTER = 57415 -const T_ENCAPSED_AND_WHITESPACE = 57416 -const T_CONSTANT_ENCAPSED_STRING = 57417 -const T_ECHO = 57418 -const T_DO = 57419 -const T_WHILE = 57420 -const T_ENDWHILE = 57421 -const T_FOR = 57422 -const T_ENDFOR = 57423 -const T_FOREACH = 57424 -const T_ENDFOREACH = 57425 -const T_DECLARE = 57426 -const T_ENDDECLARE = 57427 -const T_AS = 57428 -const T_SWITCH = 57429 -const T_ENDSWITCH = 57430 -const T_CASE = 57431 -const T_DEFAULT = 57432 -const T_BREAK = 57433 -const T_CONTINUE = 57434 -const T_GOTO = 57435 -const T_FUNCTION = 57436 -const T_CONST = 57437 -const T_RETURN = 57438 -const T_TRY = 57439 -const T_CATCH = 57440 -const T_FINALLY = 57441 -const T_THROW = 57442 -const T_USE = 57443 -const T_INSTEADOF = 57444 -const T_GLOBAL = 57445 -const T_VAR = 57446 -const T_UNSET = 57447 -const T_ISSET = 57448 -const T_EMPTY = 57449 -const T_HALT_COMPILER = 57450 -const T_CLASS = 57451 -const T_TRAIT = 57452 -const T_INTERFACE = 57453 -const T_EXTENDS = 57454 -const T_IMPLEMENTS = 57455 -const T_OBJECT_OPERATOR = 57456 -const T_LIST = 57457 -const T_ARRAY = 57458 -const T_CALLABLE = 57459 -const T_CLASS_C = 57460 -const T_TRAIT_C = 57461 -const T_METHOD_C = 57462 -const T_FUNC_C = 57463 -const T_LINE = 57464 -const T_FILE = 57465 -const T_COMMENT = 57466 -const T_DOC_COMMENT = 57467 -const T_OPEN_TAG = 57468 -const T_OPEN_TAG_WITH_ECHO = 57469 -const T_CLOSE_TAG = 57470 -const T_WHITESPACE = 57471 -const T_START_HEREDOC = 57472 -const T_END_HEREDOC = 57473 -const T_DOLLAR_OPEN_CURLY_BRACES = 57474 -const T_CURLY_OPEN = 57475 -const T_PAAMAYIM_NEKUDOTAYIM = 57476 -const T_NAMESPACE = 57477 -const T_NS_C = 57478 -const T_DIR = 57479 -const T_NS_SEPARATOR = 57480 -const T_ELLIPSIS = 57481 +const T_EXIT = 57348 +const T_IF = 57349 +const T_LNUMBER = 57350 +const T_DNUMBER = 57351 +const T_STRING = 57352 +const T_STRING_VARNAME = 57353 +const T_VARIABLE = 57354 +const T_NUM_STRING = 57355 +const T_INLINE_HTML = 57356 +const T_CHARACTER = 57357 +const T_BAD_CHARACTER = 57358 +const T_ENCAPSED_AND_WHITESPACE = 57359 +const T_CONSTANT_ENCAPSED_STRING = 57360 +const T_ECHO = 57361 +const T_DO = 57362 +const T_WHILE = 57363 +const T_ENDWHILE = 57364 +const T_FOR = 57365 +const T_ENDFOR = 57366 +const T_FOREACH = 57367 +const T_ENDFOREACH = 57368 +const T_DECLARE = 57369 +const T_ENDDECLARE = 57370 +const T_AS = 57371 +const T_SWITCH = 57372 +const T_ENDSWITCH = 57373 +const T_CASE = 57374 +const T_DEFAULT = 57375 +const T_BREAK = 57376 +const T_CONTINUE = 57377 +const T_GOTO = 57378 +const T_FUNCTION = 57379 +const T_CONST = 57380 +const T_RETURN = 57381 +const T_TRY = 57382 +const T_CATCH = 57383 +const T_FINALLY = 57384 +const T_THROW = 57385 +const T_USE = 57386 +const T_INSTEADOF = 57387 +const T_GLOBAL = 57388 +const T_VAR = 57389 +const T_UNSET = 57390 +const T_ISSET = 57391 +const T_EMPTY = 57392 +const T_HALT_COMPILER = 57393 +const T_CLASS = 57394 +const T_TRAIT = 57395 +const T_INTERFACE = 57396 +const T_EXTENDS = 57397 +const T_IMPLEMENTS = 57398 +const T_OBJECT_OPERATOR = 57399 +const T_DOUBLE_ARROW = 57400 +const T_LIST = 57401 +const T_ARRAY = 57402 +const T_CALLABLE = 57403 +const T_CLASS_C = 57404 +const T_TRAIT_C = 57405 +const T_METHOD_C = 57406 +const T_FUNC_C = 57407 +const T_LINE = 57408 +const T_FILE = 57409 +const T_COMMENT = 57410 +const T_DOC_COMMENT = 57411 +const T_OPEN_TAG = 57412 +const T_OPEN_TAG_WITH_ECHO = 57413 +const T_CLOSE_TAG = 57414 +const T_WHITESPACE = 57415 +const T_START_HEREDOC = 57416 +const T_END_HEREDOC = 57417 +const T_DOLLAR_OPEN_CURLY_BRACES = 57418 +const T_CURLY_OPEN = 57419 +const T_PAAMAYIM_NEKUDOTAYIM = 57420 +const T_NAMESPACE = 57421 +const T_NS_C = 57422 +const T_DIR = 57423 +const T_NS_SEPARATOR = 57424 +const T_ELLIPSIS = 57425 +const T_EVAL = 57426 +const T_REQUIRE = 57427 +const T_REQUIRE_ONCE = 57428 +const T_LOGICAL_OR = 57429 +const T_LOGICAL_XOR = 57430 +const T_LOGICAL_AND = 57431 +const T_INSTANCEOF = 57432 +const T_NEW = 57433 +const T_CLONE = 57434 +const T_ELSEIF = 57435 +const T_ELSE = 57436 +const T_ENDIF = 57437 +const T_PRINT = 57438 +const T_YIELD = 57439 +const T_STATIC = 57440 +const T_ABSTRACT = 57441 +const T_FINAL = 57442 +const T_PRIVATE = 57443 +const T_PROTECTED = 57444 +const T_PUBLIC = 57445 +const T_INC = 57446 +const T_DEC = 57447 +const T_YIELD_FROM = 57448 +const T_INT_CAST = 57449 +const T_DOUBLE_CAST = 57450 +const T_STRING_CAST = 57451 +const T_ARRAY_CAST = 57452 +const T_OBJECT_CAST = 57453 +const T_BOOL_CAST = 57454 +const T_UNSET_CAST = 57455 +const T_COALESCE = 57456 +const T_SPACESHIP = 57457 +const T_NOELSE = 57458 +const T_PLUS_EQUAL = 57459 +const T_MINUS_EQUAL = 57460 +const T_MUL_EQUAL = 57461 +const T_DIV_EQUAL = 57462 +const T_CONCAT_EQUAL = 57463 +const T_MOD_EQUAL = 57464 +const T_AND_EQUAL = 57465 +const T_OR_EQUAL = 57466 +const T_XOR_EQUAL = 57467 +const T_SL_EQUAL = 57468 +const T_SR_EQUAL = 57469 +const T_POW_EQUAL = 57470 +const T_BOOLEAN_OR = 57471 +const T_BOOLEAN_AND = 57472 +const T_IS_EQUAL = 57473 +const T_IS_NOT_EQUAL = 57474 +const T_IS_IDENTICAL = 57475 +const T_IS_NOT_IDENTICAL = 57476 +const T_IS_SMALLER_OR_EQUAL = 57477 +const T_IS_GREATER_OR_EQUAL = 57478 +const T_SL = 57479 +const T_SR = 57480 +const T_POW = 57481 var yyToknames = [...]string{ "$end", @@ -217,82 +174,6 @@ var yyToknames = [...]string{ "$unk", "T_INCLUDE", "T_INCLUDE_ONCE", - "T_EVAL", - "T_REQUIRE", - "T_REQUIRE_ONCE", - "','", - "T_LOGICAL_OR", - "T_LOGICAL_XOR", - "T_LOGICAL_AND", - "T_PRINT", - "T_YIELD", - "T_DOUBLE_ARROW", - "T_YIELD_FROM", - "'='", - "T_PLUS_EQUAL", - "T_MINUS_EQUAL", - "T_MUL_EQUAL", - "T_DIV_EQUAL", - "T_CONCAT_EQUAL", - "T_MOD_EQUAL", - "T_AND_EQUAL", - "T_OR_EQUAL", - "T_XOR_EQUAL", - "T_SL_EQUAL", - "T_SR_EQUAL", - "T_POW_EQUAL", - "'?'", - "':'", - "T_COALESCE", - "T_BOOLEAN_OR", - "T_BOOLEAN_AND", - "'|'", - "'^'", - "'&'", - "T_IS_EQUAL", - "T_IS_NOT_EQUAL", - "T_IS_IDENTICAL", - "T_IS_NOT_IDENTICAL", - "T_SPACESHIP", - "'<'", - "T_IS_SMALLER_OR_EQUAL", - "'>'", - "T_IS_GREATER_OR_EQUAL", - "T_SL", - "T_SR", - "'+'", - "'-'", - "'.'", - "'*'", - "'/'", - "'%'", - "'!'", - "T_INSTANCEOF", - "'~'", - "T_INC", - "T_DEC", - "T_INT_CAST", - "T_DOUBLE_CAST", - "T_STRING_CAST", - "T_ARRAY_CAST", - "T_OBJECT_CAST", - "T_BOOL_CAST", - "T_UNSET_CAST", - "'@'", - "T_POW", - "'['", - "T_NEW", - "T_CLONE", - "T_NOELSE", - "T_ELSEIF", - "T_ELSE", - "T_ENDIF", - "T_STATIC", - "T_ABSTRACT", - "T_FINAL", - "T_PRIVATE", - "T_PROTECTED", - "T_PUBLIC", "T_EXIT", "T_IF", "T_LNUMBER", @@ -345,6 +226,7 @@ var yyToknames = [...]string{ "T_EXTENDS", "T_IMPLEMENTS", "T_OBJECT_OPERATOR", + "T_DOUBLE_ARROW", "T_LIST", "T_ARRAY", "T_CALLABLE", @@ -370,15 +252,90 @@ var yyToknames = [...]string{ "T_DIR", "T_NS_SEPARATOR", "T_ELLIPSIS", + "T_EVAL", + "T_REQUIRE", + "T_REQUIRE_ONCE", + "T_LOGICAL_OR", + "T_LOGICAL_XOR", + "T_LOGICAL_AND", + "T_INSTANCEOF", + "T_NEW", + "T_CLONE", + "T_ELSEIF", + "T_ELSE", + "T_ENDIF", + "T_PRINT", + "T_YIELD", + "T_STATIC", + "T_ABSTRACT", + "T_FINAL", + "T_PRIVATE", + "T_PROTECTED", + "T_PUBLIC", + "T_INC", + "T_DEC", + "T_YIELD_FROM", + "T_INT_CAST", + "T_DOUBLE_CAST", + "T_STRING_CAST", + "T_ARRAY_CAST", + "T_OBJECT_CAST", + "T_BOOL_CAST", + "T_UNSET_CAST", + "T_COALESCE", + "T_SPACESHIP", + "T_NOELSE", "'\"'", "'`'", "'{'", "'}'", "';'", + "':'", "'('", "')'", + "'['", "']'", + "'?'", + "'&'", + "'-'", + "'+'", + "'!'", + "'~'", + "'@'", "'$'", + "','", + "'='", + "T_PLUS_EQUAL", + "T_MINUS_EQUAL", + "T_MUL_EQUAL", + "T_DIV_EQUAL", + "T_CONCAT_EQUAL", + "T_MOD_EQUAL", + "T_AND_EQUAL", + "T_OR_EQUAL", + "T_XOR_EQUAL", + "T_SL_EQUAL", + "T_SR_EQUAL", + "T_POW_EQUAL", + "T_BOOLEAN_OR", + "T_BOOLEAN_AND", + "'|'", + "'^'", + "T_IS_EQUAL", + "T_IS_NOT_EQUAL", + "T_IS_IDENTICAL", + "T_IS_NOT_IDENTICAL", + "'<'", + "T_IS_SMALLER_OR_EQUAL", + "'>'", + "T_IS_GREATER_OR_EQUAL", + "T_SL", + "T_SR", + "'.'", + "'*'", + "'/'", + "'%'", + "T_POW", } var yyStatenames = [...]string{} @@ -386,7 +343,7 @@ const yyEofCode = 1 const yyErrCode = 2 const yyInitialStackSize = 16 -//line parser/php7.y:2627 +//line php7/php7.y:2587 //line yacctab:1 var yyExca = [...]int{ @@ -394,169 +351,169 @@ var yyExca = [...]int{ 1, -1, -2, 0, -1, 43, - 69, 420, - 133, 420, - 153, 420, - 161, 420, + 57, 420, + 78, 420, + 119, 420, + 125, 420, -2, 415, -1, 47, - 164, 423, + 123, 423, -2, 432, -1, 83, - 69, 422, - 133, 422, - 153, 422, - 161, 422, - 164, 425, + 57, 422, + 78, 422, + 119, 422, + 123, 425, + 125, 422, -2, 410, -1, 106, - 153, 383, + 78, 383, -2, 412, -1, 228, - 69, 420, - 133, 420, - 153, 420, - 161, 420, + 57, 420, + 78, 420, + 119, 420, + 125, 420, -2, 311, -1, 231, - 164, 425, + 123, 425, -2, 422, -1, 234, - 69, 420, - 133, 420, - 153, 420, - 161, 420, + 57, 420, + 78, 420, + 119, 420, + 125, 420, -2, 313, -1, 352, - 38, 0, - 39, 0, - 40, 0, - 41, 0, - 42, 0, + 115, 0, + 153, 0, + 154, 0, + 155, 0, + 156, 0, -2, 335, -1, 353, - 38, 0, - 39, 0, - 40, 0, - 41, 0, - 42, 0, + 115, 0, + 153, 0, + 154, 0, + 155, 0, + 156, 0, -2, 336, -1, 354, - 38, 0, - 39, 0, - 40, 0, - 41, 0, - 42, 0, + 115, 0, + 153, 0, + 154, 0, + 155, 0, + 156, 0, -2, 337, -1, 355, - 38, 0, - 39, 0, - 40, 0, - 41, 0, - 42, 0, + 115, 0, + 153, 0, + 154, 0, + 155, 0, + 156, 0, -2, 338, -1, 356, - 43, 0, - 44, 0, - 45, 0, - 46, 0, + 157, 0, + 158, 0, + 159, 0, + 160, 0, -2, 339, -1, 357, - 43, 0, - 44, 0, - 45, 0, - 46, 0, + 157, 0, + 158, 0, + 159, 0, + 160, 0, -2, 340, -1, 358, - 43, 0, - 44, 0, - 45, 0, - 46, 0, + 157, 0, + 158, 0, + 159, 0, + 160, 0, -2, 341, -1, 359, - 43, 0, - 44, 0, - 45, 0, - 46, 0, + 157, 0, + 158, 0, + 159, 0, + 160, 0, -2, 342, -1, 360, - 38, 0, - 39, 0, - 40, 0, - 41, 0, - 42, 0, + 115, 0, + 153, 0, + 154, 0, + 155, 0, + 156, 0, -2, 343, -1, 367, - 9, 161, - 165, 161, + 124, 161, + 135, 161, -2, 420, -1, 411, - 9, 460, - 165, 460, - 166, 460, + 124, 460, + 126, 460, + 135, 460, -2, 420, -1, 415, - 69, 421, - 133, 421, - 153, 421, - 161, 421, - 164, 424, + 57, 421, + 78, 421, + 119, 421, + 123, 424, + 125, 421, -2, 345, -1, 429, - 164, 446, + 123, 446, -2, 413, -1, 430, - 164, 448, + 123, 448, -2, 438, -1, 509, - 164, 446, + 123, 446, -2, 414, -1, 510, - 164, 448, + 123, 448, -2, 439, -1, 569, - 165, 211, + 124, 211, -2, 216, -1, 594, - 164, 424, + 123, 424, -2, 421, -1, 646, - 165, 211, + 124, 211, -2, 216, -1, 651, - 165, 181, + 124, 181, -2, 420, -1, 659, - 165, 211, + 124, 211, -2, 216, -1, 684, - 9, 459, - 165, 459, - 166, 459, + 124, 459, + 126, 459, + 135, 459, -2, 420, -1, 717, - 165, 182, + 124, 182, -2, 420, -1, 737, - 88, 263, + 12, 263, -2, 266, -1, 776, - 165, 181, + 124, 181, -2, 420, -1, 778, - 165, 184, + 124, 184, -2, 394, -1, 880, - 105, 76, + 29, 76, -2, 80, -1, 912, - 165, 211, + 124, 211, -2, 216, } const yyPrivate = 57344 -const yyLast = 7467 +const yyLast = 7209 var yyAct = [...]int{ @@ -568,858 +525,832 @@ var yyAct = [...]int{ 136, 188, 224, 227, 146, 149, 235, 236, 237, 238, 239, 127, 142, 240, 241, 242, 243, 244, 245, 246, 125, 249, 139, 140, 257, 258, 259, 124, 2, 253, - 313, 312, 511, 6, 5, 428, 126, 778, 272, 273, - 891, 275, 276, 691, 687, 263, 268, 229, 229, 608, - 81, 595, 743, 744, 745, 742, 741, 740, 583, 408, - 924, 886, 104, 818, 817, 807, 799, 782, 771, 725, - 307, 110, 715, 696, 694, 686, 675, 648, 636, 626, - 596, 317, 114, 120, 587, 322, 323, 290, 928, 912, - 927, 83, 867, 826, 284, 286, 736, 831, 780, 738, - 718, 104, 685, 335, 336, 337, 338, 339, 340, 341, + 313, 312, 511, 6, 5, 428, 126, 164, 272, 273, + 868, 275, 276, 852, 890, 263, 268, 229, 229, 840, + 81, 839, 178, 866, 862, 891, 404, 682, 104, 833, + 830, 588, 566, 539, 333, 675, 329, 867, 189, 332, + 327, 110, 308, 307, 831, 306, 300, 301, 334, 104, + 330, 317, 114, 120, 328, 322, 323, 675, 757, 307, + 301, 83, 702, 726, 284, 286, 624, 860, 619, 564, + 554, 409, 178, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, - 352, 353, 354, 355, 356, 357, 358, 359, 360, 659, - 362, 364, 646, 368, 319, 265, 370, 404, 881, 104, - 268, 105, 305, 810, 294, 231, 231, 331, 285, 78, + 352, 353, 354, 355, 356, 357, 358, 359, 360, 164, + 362, 364, 104, 368, 319, 265, 370, 728, 924, 778, + 268, 691, 305, 687, 294, 231, 231, 331, 608, 78, 378, 386, 388, 389, 390, 391, 392, 393, 394, 395, - 396, 397, 398, 399, 569, 552, 400, 137, 402, 233, - 224, 382, 550, 143, 282, 229, 232, 766, 767, 301, - 105, 413, 412, 289, 224, 291, 116, 43, 104, 383, - 298, 288, 381, 304, 109, 293, 890, 292, 334, 137, - 743, 744, 745, 742, 741, 740, 423, 287, 330, 407, - 514, 137, 405, 328, 274, 429, 509, 401, 105, 229, - 369, 521, 522, 414, 361, 523, 566, 232, 840, 265, - 839, 812, 307, 527, 269, 108, 531, 116, 224, 104, - 301, 228, 234, 271, 736, 270, 866, 738, 248, 416, - 229, 830, 766, 767, 133, 283, 219, 111, 215, 549, - 183, 427, 182, 181, 230, 135, 232, 105, 134, 4, - 130, 112, 918, 231, 516, 811, 116, 533, 104, 267, - 901, 418, 419, 559, 900, 150, 863, 605, 558, 885, - 8, 7, 848, 819, 517, 813, 806, 763, 508, 750, - 518, 714, 515, 712, 842, 133, 765, 418, 111, 419, - 419, 418, 710, 708, 562, 705, 553, 231, 105, 548, - 305, 538, 536, 535, 384, 6, 5, 372, 269, 542, - 568, 326, 578, 539, 579, 557, 575, 580, 581, 573, - 560, 556, 577, 325, 133, 324, 295, 111, 231, 805, - 802, 645, 333, 666, 800, 759, 586, 105, 606, 907, - 224, 590, 329, 224, 570, 787, 884, 327, 406, 367, - 857, 541, 534, 544, 116, 855, 216, 607, 801, 254, - 604, 534, 610, 788, 420, 534, 306, 534, 781, 731, - 674, 585, 113, 574, 300, 154, 156, 155, 184, 417, - 288, 904, 593, 303, 513, 303, 262, 589, 116, 116, - 261, 430, 510, 411, 116, 179, 609, 180, 152, 153, - 157, 159, 158, 171, 172, 169, 170, 177, 173, 174, - 175, 176, 167, 168, 161, 162, 160, 163, 165, 166, - 218, 178, 255, 256, 425, 113, 116, 700, 116, 115, - 526, 116, 377, 164, 902, 288, 634, 629, 667, 668, - 628, 572, 545, 667, 668, 137, 614, 380, 217, 743, - 744, 745, 742, 741, 740, 122, 123, 133, 143, 543, - 111, 644, 133, 625, 303, 111, 652, 784, 145, 618, - 254, 903, 303, 303, 318, 420, 611, 861, 254, 623, - 722, 723, 147, 640, 322, 642, 635, 617, 615, 254, - 421, 4, 647, 736, 133, 613, 738, 111, 654, 121, - 76, 77, 299, 688, 254, 232, 638, 145, 671, 277, - 672, 669, 8, 7, 577, 116, 547, 104, 892, 683, - 641, 656, 119, 109, 540, 302, 794, 793, 860, 252, - 649, 754, 525, 255, 256, 829, 689, 679, 229, 229, - 524, 255, 256, 792, 305, 670, 632, 6, 5, 853, - 521, 190, 255, 256, 422, 531, 743, 744, 745, 742, - 741, 740, 827, 653, 108, 229, 278, 255, 256, 147, - 116, 706, 602, 128, 743, 744, 745, 742, 741, 740, - 701, 713, 116, 133, 260, 224, 111, 697, 669, 720, - 695, 546, 693, 230, 724, 544, 105, 544, 704, 534, - 736, 669, 852, 738, 711, 375, 373, 730, 669, 122, - 123, 194, 751, 752, 600, 193, 224, 747, 736, 192, - 254, 738, 746, 186, 719, 420, 229, 164, 729, 699, - 755, 748, 279, 280, 703, 632, 231, 231, 189, 322, - 728, 297, 797, 612, 195, 196, 406, 616, 756, 224, - 598, 254, 601, 599, 761, 753, 281, 814, 766, 767, - 732, 758, 760, 231, 769, 766, 767, 824, 669, 768, - 773, 770, 775, 45, 795, 764, 796, 785, 577, 789, - 544, 798, 254, 255, 256, 544, 544, 251, 777, 749, - 229, 743, 744, 745, 742, 741, 740, 808, 197, 199, - 198, 699, 385, 632, 187, 178, 816, 868, 804, 862, - 682, 191, 833, 822, 255, 256, 825, 164, 588, 332, - 815, 308, 821, 716, 231, 633, 163, 165, 166, 832, - 178, 675, 367, 651, 757, 702, 828, 118, 726, 624, - 619, 847, 164, 564, 554, 255, 256, 409, 849, 841, - 1, 37, 544, 737, 544, 846, 734, 735, 803, 684, - 379, 661, 844, 851, 865, 529, 669, 221, 519, 856, - 858, 869, 773, 365, 878, 864, 837, 882, 883, 871, - 144, 790, 877, 141, 321, 148, 834, 888, 231, 889, - 658, 820, 250, 893, 838, 887, 643, 926, 223, 896, - 42, 41, 894, 15, 14, 878, 897, 597, 266, 544, - 895, 48, 899, 877, 47, 107, 906, 49, 82, 80, - 717, 71, 247, 61, 264, 60, 876, 910, 875, 874, - 873, 733, 44, 911, 663, 721, 655, 843, 917, 920, - 913, 637, 916, 915, 577, 309, 117, 921, 296, 3, - 922, 433, 786, 727, 669, 0, 0, 925, 0, 0, - 929, 87, 88, 89, 90, 91, 0, 0, 0, 0, - 73, 74, 0, 75, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 776, 173, 174, 175, 176, 167, - 168, 161, 162, 160, 163, 165, 166, 0, 178, 0, - 0, 0, 0, 0, 0, 0, 55, 56, 0, 0, - 164, 0, 57, 0, 58, 53, 54, 62, 63, 64, - 65, 66, 67, 68, 70, 0, 51, 84, 52, 0, - 0, 0, 0, 24, 76, 77, 0, 0, 0, 69, - 46, 92, 93, 35, 0, 104, 0, 26, 0, 0, - 0, 109, 25, 17, 16, 0, 18, 0, 29, 0, - 30, 0, 0, 19, 0, 0, 0, 20, 21, 34, - 36, 12, 22, 32, 0, 0, 33, 11, 0, 23, - 0, 28, 85, 86, 9, 38, 39, 40, 0, 0, - 0, 50, 108, 0, 101, 97, 98, 99, 94, 95, - 0, 0, 0, 0, 0, 0, 102, 0, 0, 0, - 0, 10, 100, 96, 111, 0, 103, 72, 13, 627, - 31, 59, 0, 0, 105, 87, 88, 89, 90, 91, - 0, 0, 0, 0, 73, 74, 179, 75, 180, 152, - 153, 157, 159, 158, 171, 172, 169, 170, 177, 173, - 174, 175, 176, 167, 168, 161, 162, 160, 163, 165, - 166, 0, 178, 0, 0, 0, 0, 0, 0, 0, - 55, 56, 0, 0, 164, 0, 57, 0, 58, 53, - 54, 62, 63, 64, 65, 66, 67, 68, 70, 0, - 51, 84, 52, 0, 0, 0, 0, 24, 76, 77, - 0, 0, 0, 69, 46, 92, 93, 35, 0, 104, - 0, 26, 0, 0, 0, 109, 25, 17, 16, 0, - 18, 0, 29, 0, 30, 0, 0, 19, 0, 0, - 0, 20, 21, 34, 36, 12, 22, 32, 0, 0, - 33, 11, 0, 23, 0, 28, 85, 86, 9, 38, - 39, 40, 0, 0, 0, 50, 108, 0, 101, 97, - 98, 99, 94, 95, 0, 0, 0, 0, 0, 0, - 102, 0, 0, 0, 0, 10, 100, 96, 111, 0, - 103, 72, 13, 537, 31, 59, 0, 0, 105, 87, - 88, 89, 90, 91, 0, 0, 0, 0, 73, 74, - 0, 75, 180, 152, 153, 157, 159, 158, 171, 172, - 169, 170, 177, 173, 174, 175, 176, 167, 168, 161, - 162, 160, 163, 165, 166, 0, 178, 0, 0, 0, - 0, 0, 0, 0, 55, 56, 0, 0, 164, 0, - 57, 0, 58, 53, 54, 62, 63, 64, 65, 66, - 67, 68, 70, 0, 51, 84, 52, 0, 0, 0, - 0, 24, 76, 77, 0, 0, 0, 69, 46, 92, - 93, 35, 0, 104, 0, 26, 0, 0, 0, 109, - 25, 17, 16, 0, 18, 0, 29, 0, 30, 0, - 0, 19, 0, 0, 0, 20, 21, 34, 36, 12, - 22, 32, 0, 0, 33, 11, 0, 23, 0, 28, - 85, 86, 9, 38, 39, 40, 0, 0, 0, 50, - 108, 0, 101, 97, 98, 99, 94, 95, 161, 162, - 160, 163, 165, 166, 102, 178, 0, 0, 0, 10, - 100, 96, 111, 0, 103, 72, 13, 164, 31, 59, - 0, 0, 105, 87, 88, 89, 90, 91, 0, 0, - 0, 0, 73, 74, 0, 75, 153, 157, 159, 158, - 171, 172, 169, 170, 177, 173, 174, 175, 176, 167, - 168, 161, 162, 160, 163, 165, 166, 0, 178, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 55, 56, - 164, 0, 0, 0, 57, 0, 58, 53, 54, 62, - 63, 64, 65, 66, 67, 68, 70, 0, 51, 84, - 52, 0, 0, 0, 0, 24, 76, 77, 0, 0, - 0, 69, 46, 92, 93, 35, 0, 104, 0, 26, - 0, 0, 0, 109, 25, 17, 16, 0, 18, 0, - 29, 0, 30, 0, 0, 19, 0, 0, 0, 20, - 21, 34, 36, 0, 22, 32, 0, 0, 33, 0, - 0, 23, 0, 28, 85, 86, 316, 38, 39, 40, - 0, 0, 0, 50, 108, 0, 101, 97, 98, 99, - 94, 95, 0, 0, 0, 0, 0, 0, 102, 0, - 0, 0, 0, 133, 100, 96, 111, 0, 103, 72, - 13, 930, 31, 59, 0, 0, 105, 87, 88, 89, - 90, 91, 0, 0, 0, 0, 73, 74, 0, 75, - 0, 157, 159, 158, 171, 172, 169, 170, 177, 173, - 174, 175, 176, 167, 168, 161, 162, 160, 163, 165, - 166, 0, 178, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 55, 56, 164, 0, 0, 0, 57, 0, - 58, 53, 54, 62, 63, 64, 65, 66, 67, 68, - 70, 0, 51, 84, 52, 0, 0, 0, 0, 24, - 76, 77, 0, 0, 0, 69, 46, 92, 93, 35, + 396, 397, 398, 399, 218, 405, 400, 137, 402, 604, + 224, 382, 422, 143, 605, 229, 163, 165, 166, 164, + 105, 413, 853, 289, 224, 291, 282, 43, 595, 516, + 298, 178, 583, 304, 598, 408, 601, 599, 260, 137, + 886, 105, 818, 817, 807, 799, 423, 782, 771, 407, + 517, 137, 725, 861, 715, 429, 509, 401, 696, 229, + 369, 521, 522, 414, 361, 523, 217, 694, 686, 265, + 162, 161, 216, 527, 269, 648, 531, 636, 224, 912, + 421, 228, 234, 626, 842, 596, 587, 290, 826, 416, + 229, 515, 811, 810, 105, 283, 780, 514, 718, 549, + 685, 427, 167, 168, 160, 163, 165, 166, 164, 4, + 659, 646, 644, 231, 285, 645, 178, 533, 569, 552, + 550, 418, 419, 559, 412, 150, 383, 381, 558, 287, + 8, 7, 274, 116, 288, 104, 271, 270, 508, 248, + 518, 109, 219, 215, 183, 182, 181, 418, 135, 419, + 419, 418, 134, 600, 562, 162, 161, 231, 130, 548, + 305, 116, 536, 104, 112, 6, 5, 824, 269, 542, + 568, 293, 578, 292, 579, 557, 575, 580, 581, 573, + 560, 556, 577, 108, 928, 749, 927, 918, 231, 160, + 163, 165, 166, 164, 385, 187, 586, 156, 155, 178, + 224, 590, 133, 224, 570, 111, 766, 767, 406, 367, + 901, 541, 900, 544, 766, 767, 885, 607, 848, 819, + 813, 232, 610, 180, 177, 806, 763, 750, 714, 712, + 133, 585, 116, 111, 710, 708, 179, 158, 162, 161, + 178, 705, 593, 553, 534, 538, 230, 589, 233, 232, + 535, 430, 510, 411, 384, 372, 609, 105, 152, 153, + 157, 159, 171, 172, 169, 170, 173, 174, 175, 176, + 167, 168, 160, 163, 165, 166, 164, 326, 325, 162, + 161, 324, 667, 668, 425, 105, 295, 805, 116, 802, + 104, 116, 800, 759, 812, 606, 907, 884, 857, 855, + 534, 133, 765, 801, 111, 137, 614, 173, 174, 175, + 176, 167, 168, 160, 163, 165, 166, 164, 143, 254, + 534, 534, 788, 625, 420, 781, 731, 674, 574, 618, + 267, 184, 119, 417, 195, 196, 611, 787, 190, 623, + 252, 303, 116, 640, 322, 642, 635, 617, 615, 666, + 116, 4, 647, 700, 116, 613, 113, 133, 288, 716, + 111, 116, 736, 113, 572, 738, 638, 904, 671, 513, + 672, 669, 8, 7, 577, 303, 232, 122, 123, 683, + 641, 656, 303, 255, 256, 76, 77, 116, 377, 104, + 649, 197, 199, 198, 288, 109, 689, 679, 229, 229, + 115, 262, 261, 380, 305, 670, 632, 6, 5, 634, + 521, 133, 105, 303, 111, 531, 743, 744, 745, 742, + 741, 740, 121, 902, 526, 229, 543, 303, 629, 628, + 545, 706, 784, 299, 145, 547, 653, 108, 881, 903, + 701, 713, 318, 279, 280, 224, 147, 697, 669, 720, + 695, 297, 693, 254, 724, 544, 133, 544, 704, 111, + 254, 669, 254, 45, 711, 420, 540, 730, 669, 722, + 723, 145, 751, 752, 688, 232, 224, 747, 892, 792, + 302, 827, 746, 147, 719, 116, 229, 116, 729, 699, + 755, 748, 633, 116, 703, 632, 231, 231, 602, 322, + 230, 191, 654, 612, 118, 652, 406, 616, 756, 224, + 128, 105, 122, 123, 761, 753, 524, 255, 256, 794, + 793, 758, 760, 231, 255, 256, 255, 256, 669, 768, + 773, 770, 775, 546, 795, 764, 796, 785, 577, 789, + 544, 798, 254, 667, 668, 544, 544, 420, 777, 534, + 229, 743, 744, 745, 742, 741, 740, 808, 814, 766, + 767, 699, 133, 632, 375, 111, 816, 373, 804, 769, + 766, 767, 194, 822, 193, 192, 825, 186, 1, 37, + 815, 254, 821, 737, 231, 734, 277, 735, 379, 832, + 661, 529, 367, 651, 221, 519, 828, 858, 365, 254, + 871, 847, 144, 790, 281, 525, 255, 256, 849, 841, + 141, 321, 544, 148, 544, 846, 834, 658, 803, 684, + 254, 820, 844, 851, 865, 251, 669, 250, 838, 856, + 643, 869, 773, 926, 878, 864, 837, 882, 883, 223, + 42, 41, 877, 15, 278, 255, 256, 888, 231, 889, + 14, 597, 266, 893, 48, 887, 47, 107, 49, 896, + 82, 80, 894, 255, 256, 878, 897, 71, 247, 544, + 895, 61, 899, 877, 264, 60, 906, 876, 875, 874, + 717, 873, 733, 44, 255, 256, 663, 910, 721, 655, + 843, 637, 309, 911, 117, 296, 3, 433, 917, 920, + 913, 786, 916, 915, 577, 727, 0, 921, 0, 0, + 922, 0, 0, 0, 669, 0, 0, 925, 0, 0, + 929, 0, 87, 88, 69, 46, 92, 93, 35, 0, + 104, 0, 26, 0, 0, 0, 109, 25, 17, 16, + 0, 18, 0, 29, 776, 30, 0, 0, 19, 0, + 0, 0, 20, 21, 34, 36, 12, 22, 32, 0, + 0, 33, 11, 0, 23, 0, 28, 85, 86, 9, + 38, 39, 40, 0, 0, 0, 0, 50, 108, 0, + 101, 97, 98, 99, 94, 95, 0, 0, 0, 0, + 0, 0, 102, 0, 0, 0, 0, 10, 100, 96, + 111, 0, 89, 90, 91, 0, 0, 0, 0, 84, + 52, 0, 0, 0, 73, 74, 24, 76, 77, 0, + 0, 0, 53, 54, 75, 62, 63, 64, 65, 66, + 67, 68, 0, 0, 0, 103, 72, 13, 627, 31, + 0, 59, 0, 51, 0, 0, 0, 56, 55, 57, + 58, 70, 105, 87, 88, 69, 46, 92, 93, 35, 0, 104, 0, 26, 0, 0, 0, 109, 25, 17, 16, 0, 18, 0, 29, 0, 30, 0, 0, 19, - 0, 0, 0, 20, 21, 34, 36, 0, 22, 32, - 0, 0, 33, 0, 0, 23, 0, 28, 85, 86, - 316, 38, 39, 40, 0, 0, 0, 50, 108, 0, - 101, 97, 98, 99, 94, 95, 0, 0, 0, 0, - 0, 0, 102, 0, 0, 0, 0, 133, 100, 96, - 111, 0, 103, 72, 13, 923, 31, 59, 0, 0, - 105, 87, 88, 89, 90, 91, 0, 0, 0, 0, - 73, 74, 0, 75, 0, 0, 159, 158, 171, 172, - 169, 170, 177, 173, 174, 175, 176, 167, 168, 161, - 162, 160, 163, 165, 166, 0, 178, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 55, 56, 164, 0, - 0, 0, 57, 0, 58, 53, 54, 62, 63, 64, - 65, 66, 67, 68, 70, 0, 51, 84, 52, 0, - 0, 0, 0, 24, 76, 77, 0, 0, 0, 69, - 46, 92, 93, 35, 0, 104, 0, 26, 0, 0, - 0, 109, 25, 17, 16, 0, 18, 0, 29, 0, - 30, 0, 0, 19, 0, 0, 0, 20, 21, 34, - 36, 0, 22, 32, 0, 0, 33, 0, 0, 23, - 0, 28, 85, 86, 316, 38, 39, 40, 0, 0, - 0, 50, 108, 0, 101, 97, 98, 99, 94, 95, - 0, 0, 0, 0, 0, 0, 102, 0, 0, 0, - 0, 133, 100, 96, 111, 0, 103, 72, 13, 919, - 31, 59, 0, 0, 105, 87, 88, 89, 90, 91, - 0, 0, 0, 0, 73, 74, 0, 75, 158, 171, - 172, 169, 170, 177, 173, 174, 175, 176, 167, 168, - 161, 162, 160, 163, 165, 166, 0, 178, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 164, - 55, 56, 0, 0, 0, 0, 57, 0, 58, 53, - 54, 62, 63, 64, 65, 66, 67, 68, 70, 0, - 51, 84, 52, 0, 0, 0, 0, 24, 76, 77, - 0, 0, 0, 69, 46, 92, 93, 35, 0, 104, - 0, 26, 0, 0, 0, 109, 25, 17, 16, 0, - 18, 0, 29, 0, 30, 0, 0, 19, 0, 0, - 0, 20, 21, 34, 36, 0, 22, 32, 0, 0, - 33, 0, 0, 23, 0, 28, 85, 86, 316, 38, - 39, 40, 0, 0, 0, 50, 108, 0, 101, 97, - 98, 99, 94, 95, 0, 0, 0, 0, 0, 0, - 102, 0, 0, 0, 0, 133, 100, 96, 111, 0, - 103, 72, 13, 909, 31, 59, 0, 0, 105, 87, - 88, 89, 90, 91, 0, 0, 0, 0, 73, 74, - 0, 75, 171, 172, 169, 170, 177, 173, 174, 175, - 176, 167, 168, 161, 162, 160, 163, 165, 166, 0, - 178, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 164, 0, 55, 56, 0, 0, 0, 0, - 57, 0, 58, 53, 54, 62, 63, 64, 65, 66, - 67, 68, 70, 0, 51, 84, 52, 0, 0, 0, - 0, 24, 76, 77, 0, 0, 0, 69, 46, 92, + 0, 0, 0, 20, 21, 34, 36, 12, 22, 32, + 0, 0, 33, 11, 0, 23, 0, 28, 85, 86, + 9, 38, 39, 40, 0, 0, 0, 0, 50, 108, + 0, 101, 97, 98, 99, 94, 95, 0, 0, 0, + 0, 0, 0, 102, 0, 0, 0, 0, 10, 100, + 96, 111, 0, 89, 90, 91, 0, 0, 0, 0, + 84, 52, 0, 0, 0, 73, 74, 24, 76, 77, + 0, 0, 0, 53, 54, 75, 62, 63, 64, 65, + 66, 67, 68, 0, 0, 0, 103, 72, 13, 537, + 31, 0, 59, 0, 51, 0, 0, 0, 56, 55, + 57, 58, 70, 105, 87, 88, 69, 46, 92, 93, + 35, 0, 104, 0, 26, 0, 0, 0, 109, 25, + 17, 16, 0, 18, 0, 29, 0, 30, 0, 0, + 19, 0, 0, 0, 20, 21, 34, 36, 12, 22, + 32, 0, 0, 33, 11, 0, 23, 0, 28, 85, + 86, 9, 38, 39, 40, 0, 0, 0, 0, 50, + 108, 0, 101, 97, 98, 99, 94, 95, 0, 0, + 0, 0, 0, 0, 102, 0, 0, 0, 0, 10, + 100, 96, 111, 0, 89, 90, 91, 0, 0, 0, + 0, 84, 52, 0, 0, 0, 73, 74, 24, 76, + 77, 0, 0, 0, 53, 54, 75, 62, 63, 64, + 65, 66, 67, 68, 0, 0, 0, 103, 72, 13, + 0, 31, 0, 59, 0, 51, 0, 0, 0, 56, + 55, 57, 58, 70, 105, 87, 88, 69, 46, 92, 93, 35, 0, 104, 0, 26, 0, 0, 0, 109, 25, 17, 16, 0, 18, 0, 29, 0, 30, 0, 0, 19, 0, 0, 0, 20, 21, 34, 36, 0, 22, 32, 0, 0, 33, 0, 0, 23, 0, 28, - 85, 86, 316, 38, 39, 40, 0, 0, 0, 50, - 108, 0, 101, 97, 98, 99, 94, 95, 0, 0, - 0, 0, 0, 0, 102, 0, 0, 0, 0, 133, - 100, 96, 111, 0, 103, 72, 13, 908, 31, 59, - 0, 0, 105, 87, 88, 89, 90, 91, 0, 0, - 0, 0, 73, 74, 0, 75, 167, 168, 161, 162, - 160, 163, 165, 166, 0, 178, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 164, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 55, 56, - 0, 0, 0, 0, 57, 0, 58, 53, 54, 62, - 63, 64, 65, 66, 67, 68, 70, 0, 51, 84, - 52, 0, 0, 0, 0, 24, 76, 77, 0, 0, - 0, 69, 46, 92, 93, 35, 0, 104, 0, 26, - 0, 0, 0, 109, 25, 17, 16, 0, 18, 905, - 29, 0, 30, 0, 0, 19, 0, 0, 0, 20, - 21, 34, 36, 0, 22, 32, 0, 0, 33, 0, - 0, 23, 0, 28, 85, 86, 316, 38, 39, 40, - 0, 0, 0, 50, 108, 0, 101, 97, 98, 99, - 94, 95, 0, 0, 0, 0, 0, 0, 102, 0, - 0, 0, 0, 133, 100, 96, 111, 0, 103, 72, - 13, 0, 31, 59, 0, 0, 105, 87, 88, 89, - 90, 91, 0, 0, 0, 0, 73, 74, 0, 75, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 200, 201, 202, 203, 205, 206, - 207, 208, 209, 210, 211, 212, 204, 0, 0, 0, - 0, 0, 55, 56, 0, 0, 0, 0, 57, 0, - 58, 53, 54, 62, 63, 64, 65, 66, 67, 68, - 70, 0, 51, 84, 52, 213, 214, 0, 0, 24, - 76, 77, 0, 0, 0, 69, 46, 92, 93, 35, - 0, 104, 0, 26, 0, 0, 0, 109, 25, 17, - 16, 0, 18, 0, 29, 0, 30, 0, 0, 19, - 0, 0, 0, 20, 21, 34, 36, 0, 22, 32, - 0, 0, 33, 0, 0, 23, 0, 28, 85, 86, - 316, 38, 39, 40, 0, 0, 0, 50, 108, 0, - 101, 97, 98, 99, 94, 95, 0, 0, 0, 0, - 0, 0, 102, 0, 0, 0, 0, 133, 100, 96, - 111, 0, 103, 72, 13, 854, 31, 59, 0, 0, - 105, 87, 88, 89, 90, 91, 0, 0, 0, 0, - 73, 74, 0, 75, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 55, 56, 0, 0, - 0, 0, 57, 0, 58, 53, 54, 62, 63, 64, - 65, 66, 67, 68, 70, 0, 51, 84, 52, 0, - 0, 0, 0, 24, 76, 77, 0, 0, 0, 69, - 46, 92, 93, 35, 0, 104, 0, 26, 0, 0, - 0, 109, 25, 17, 16, 0, 18, 0, 29, 850, - 30, 0, 0, 19, 0, 0, 0, 20, 21, 34, - 36, 0, 22, 32, 0, 0, 33, 0, 0, 23, - 0, 28, 85, 86, 316, 38, 39, 40, 0, 0, + 85, 86, 316, 38, 39, 40, 0, 0, 0, 0, + 50, 108, 0, 101, 97, 98, 99, 94, 95, 0, + 0, 0, 0, 0, 0, 102, 0, 0, 0, 0, + 133, 100, 96, 111, 0, 89, 90, 91, 0, 0, + 0, 0, 84, 52, 0, 0, 0, 73, 74, 24, + 76, 77, 0, 0, 0, 53, 54, 75, 62, 63, + 64, 65, 66, 67, 68, 0, 0, 0, 103, 72, + 13, 930, 31, 0, 59, 0, 51, 0, 0, 0, + 56, 55, 57, 58, 70, 105, 87, 88, 69, 46, + 92, 93, 35, 0, 104, 0, 26, 0, 0, 0, + 109, 25, 17, 16, 0, 18, 0, 29, 0, 30, + 0, 0, 19, 0, 0, 0, 20, 21, 34, 36, + 0, 22, 32, 0, 0, 33, 0, 0, 23, 0, + 28, 85, 86, 316, 38, 39, 40, 0, 0, 0, 0, 50, 108, 0, 101, 97, 98, 99, 94, 95, 0, 0, 0, 0, 0, 0, 102, 0, 0, 0, - 0, 133, 100, 96, 111, 0, 103, 72, 13, 0, - 31, 59, 0, 0, 105, 87, 88, 89, 90, 91, - 0, 0, 0, 0, 73, 74, 0, 75, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 55, 56, 0, 0, 0, 0, 57, 0, 58, 53, - 54, 62, 63, 64, 65, 66, 67, 68, 70, 0, - 51, 84, 52, 0, 0, 0, 0, 24, 76, 77, - 0, 0, 0, 69, 46, 92, 93, 35, 0, 104, - 0, 26, 0, 0, 0, 109, 25, 17, 16, 0, - 18, 0, 29, 0, 30, 779, 0, 19, 0, 0, - 0, 20, 21, 34, 36, 0, 22, 32, 0, 0, - 33, 0, 0, 23, 0, 28, 85, 86, 316, 38, - 39, 40, 0, 0, 0, 50, 108, 0, 101, 97, - 98, 99, 94, 95, 0, 0, 0, 0, 0, 0, - 102, 0, 0, 0, 0, 133, 100, 96, 111, 0, - 103, 72, 13, 0, 31, 59, 0, 0, 105, 87, - 88, 89, 90, 91, 0, 0, 0, 0, 73, 74, - 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 55, 56, 0, 0, 0, 0, - 57, 0, 58, 53, 54, 62, 63, 64, 65, 66, - 67, 68, 70, 0, 51, 84, 52, 0, 0, 0, - 0, 24, 76, 77, 0, 0, 0, 69, 46, 92, - 93, 35, 0, 104, 0, 26, 0, 0, 0, 109, - 25, 17, 16, 762, 18, 0, 29, 0, 30, 0, - 0, 19, 0, 0, 0, 20, 21, 34, 36, 0, - 22, 32, 0, 0, 33, 0, 0, 23, 0, 28, - 85, 86, 316, 38, 39, 40, 0, 0, 0, 50, - 108, 0, 101, 97, 98, 99, 94, 95, 0, 0, - 0, 0, 0, 0, 102, 0, 0, 0, 0, 133, - 100, 96, 111, 0, 103, 72, 13, 0, 31, 59, - 0, 0, 105, 87, 88, 89, 90, 91, 0, 0, - 0, 0, 73, 74, 0, 75, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 55, 56, - 0, 0, 0, 0, 57, 0, 58, 53, 54, 62, - 63, 64, 65, 66, 67, 68, 70, 0, 51, 84, - 52, 0, 0, 0, 678, 24, 76, 77, 0, 0, - 0, 69, 46, 92, 93, 35, 0, 104, 0, 26, - 0, 0, 0, 109, 25, 17, 16, 0, 18, 0, - 29, 0, 30, 0, 0, 19, 0, 0, 0, 20, - 21, 34, 36, 0, 22, 32, 0, 0, 33, 0, - 0, 23, 0, 28, 85, 86, 316, 38, 39, 40, - 0, 0, 0, 50, 108, 0, 101, 97, 98, 99, - 94, 95, 0, 0, 0, 0, 0, 0, 102, 0, - 0, 0, 0, 133, 100, 96, 111, 0, 103, 72, - 13, 0, 31, 59, 0, 0, 105, 87, 88, 89, - 90, 91, 0, 0, 0, 0, 73, 74, 0, 75, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 55, 56, 0, 0, 0, 0, 57, 0, - 58, 53, 54, 62, 63, 64, 65, 66, 67, 68, - 70, 0, 51, 84, 52, 0, 0, 0, 0, 24, - 76, 77, 0, 0, 0, 69, 46, 92, 93, 35, - 0, 104, 0, 26, 0, 0, 0, 109, 25, 17, - 16, 0, 18, 0, 29, 0, 30, 0, 0, 19, - 0, 0, 0, 20, 21, 34, 36, 0, 22, 32, - 0, 0, 33, 0, 0, 23, 0, 28, 85, 86, - 316, 38, 39, 40, 0, 0, 0, 50, 108, 0, - 101, 97, 98, 99, 94, 95, 0, 0, 0, 0, - 0, 0, 102, 0, 0, 0, 0, 133, 100, 96, - 111, 0, 103, 72, 13, 567, 31, 59, 0, 0, - 105, 87, 88, 89, 90, 91, 0, 0, 0, 0, - 73, 74, 0, 75, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 55, 56, 0, 0, - 0, 0, 57, 0, 58, 53, 54, 62, 63, 64, - 65, 66, 67, 68, 70, 0, 51, 84, 52, 0, - 0, 0, 0, 24, 76, 77, 0, 0, 0, 69, + 0, 133, 100, 96, 111, 0, 89, 90, 91, 0, + 0, 0, 0, 84, 52, 0, 0, 0, 73, 74, + 24, 76, 77, 0, 0, 0, 53, 54, 75, 62, + 63, 64, 65, 66, 67, 68, 0, 0, 0, 103, + 72, 13, 923, 31, 0, 59, 0, 51, 0, 0, + 0, 56, 55, 57, 58, 70, 105, 87, 88, 69, 46, 92, 93, 35, 0, 104, 0, 26, 0, 0, 0, 109, 25, 17, 16, 0, 18, 0, 29, 0, 30, 0, 0, 19, 0, 0, 0, 20, 21, 34, 36, 0, 22, 32, 0, 0, 33, 0, 0, 23, 0, 28, 85, 86, 316, 38, 39, 40, 0, 0, - 0, 50, 108, 0, 101, 97, 98, 99, 94, 95, - 0, 0, 0, 0, 0, 0, 102, 0, 0, 0, - 0, 133, 100, 96, 111, 0, 103, 72, 13, 310, - 31, 59, 0, 0, 105, 87, 88, 89, 90, 91, - 0, 0, 0, 0, 73, 74, 0, 75, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 55, 56, 0, 0, 0, 0, 57, 0, 58, 53, - 54, 62, 63, 64, 65, 66, 67, 68, 70, 0, - 51, 84, 52, 0, 0, 0, 0, 24, 76, 77, - 0, 0, 0, 69, 46, 92, 93, 35, 0, 104, + 0, 0, 50, 108, 0, 101, 97, 98, 99, 94, + 95, 0, 0, 0, 0, 0, 0, 102, 0, 0, + 0, 0, 133, 100, 96, 111, 0, 89, 90, 91, + 0, 0, 0, 0, 84, 52, 0, 0, 0, 73, + 74, 24, 76, 77, 0, 0, 0, 53, 54, 75, + 62, 63, 64, 65, 66, 67, 68, 0, 0, 0, + 103, 72, 13, 919, 31, 0, 59, 0, 51, 0, + 0, 0, 56, 55, 57, 58, 70, 105, 87, 88, + 69, 46, 92, 93, 35, 0, 104, 0, 26, 0, + 0, 0, 109, 25, 17, 16, 0, 18, 0, 29, + 0, 30, 0, 0, 19, 0, 0, 0, 20, 21, + 34, 36, 0, 22, 32, 0, 0, 33, 0, 0, + 23, 0, 28, 85, 86, 316, 38, 39, 40, 0, + 0, 0, 0, 50, 108, 0, 101, 97, 98, 99, + 94, 95, 0, 0, 0, 0, 0, 0, 102, 0, + 0, 0, 0, 133, 100, 96, 111, 0, 89, 90, + 91, 0, 0, 0, 0, 84, 52, 0, 0, 0, + 73, 74, 24, 76, 77, 0, 0, 0, 53, 54, + 75, 62, 63, 64, 65, 66, 67, 68, 0, 0, + 0, 103, 72, 13, 909, 31, 0, 59, 0, 51, + 0, 0, 0, 56, 55, 57, 58, 70, 105, 87, + 88, 69, 46, 92, 93, 35, 0, 104, 0, 26, + 0, 0, 0, 109, 25, 17, 16, 0, 18, 0, + 29, 0, 30, 0, 0, 19, 0, 0, 0, 20, + 21, 34, 36, 0, 22, 32, 0, 0, 33, 0, + 0, 23, 0, 28, 85, 86, 316, 38, 39, 40, + 0, 0, 0, 0, 50, 108, 0, 101, 97, 98, + 99, 94, 95, 0, 0, 0, 0, 0, 0, 102, + 0, 0, 0, 0, 133, 100, 96, 111, 0, 89, + 90, 91, 0, 0, 0, 0, 84, 52, 0, 0, + 0, 73, 74, 24, 76, 77, 0, 0, 0, 53, + 54, 75, 62, 63, 64, 65, 66, 67, 68, 0, + 0, 0, 103, 72, 13, 908, 31, 0, 59, 0, + 51, 0, 0, 0, 56, 55, 57, 58, 70, 105, + 87, 88, 69, 46, 92, 93, 35, 0, 104, 0, + 26, 0, 0, 0, 109, 25, 17, 16, 0, 18, + 905, 29, 0, 30, 0, 0, 19, 0, 0, 0, + 20, 21, 34, 36, 0, 22, 32, 0, 0, 33, + 0, 0, 23, 0, 28, 85, 86, 316, 38, 39, + 40, 0, 0, 0, 0, 50, 108, 0, 101, 97, + 98, 99, 94, 95, 0, 0, 0, 0, 0, 0, + 102, 0, 0, 0, 0, 133, 100, 96, 111, 0, + 89, 90, 91, 0, 0, 0, 0, 84, 52, 0, + 0, 0, 73, 74, 24, 76, 77, 0, 0, 0, + 53, 54, 75, 62, 63, 64, 65, 66, 67, 68, + 0, 0, 0, 103, 72, 13, 0, 31, 0, 59, + 0, 51, 0, 0, 0, 56, 55, 57, 58, 70, + 105, 87, 88, 69, 46, 92, 93, 35, 0, 104, 0, 26, 0, 0, 0, 109, 25, 17, 16, 0, 18, 0, 29, 0, 30, 0, 0, 19, 0, 0, 0, 20, 21, 34, 36, 0, 22, 32, 0, 0, 33, 0, 0, 23, 0, 28, 85, 86, 316, 38, - 39, 40, 0, 0, 0, 50, 108, 0, 101, 97, - 98, 99, 94, 95, 0, 0, 0, 0, 0, 0, - 102, 0, 0, 0, 0, 133, 100, 96, 111, 0, - 103, 72, 13, 0, 31, 59, 156, 155, 105, 441, - 442, 443, 444, 445, 0, 446, 447, 448, 484, 485, - 0, 0, 0, 0, 0, 179, 0, 180, 152, 153, - 157, 159, 158, 171, 172, 169, 170, 177, 173, 174, - 175, 176, 167, 168, 161, 162, 160, 163, 165, 166, - 0, 178, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 449, 0, 164, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 450, 451, 0, 454, 455, - 456, 435, 436, 437, 438, 439, 440, 452, 453, 0, - 0, 432, 0, 104, 0, 0, 0, 0, 0, 0, - 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, - 467, 487, 488, 489, 490, 491, 479, 480, 481, 482, - 483, 468, 469, 470, 471, 472, 473, 474, 475, 476, - 477, 478, 0, 499, 497, 498, 494, 495, 0, 486, - 492, 493, 500, 501, 503, 502, 504, 505, 0, 0, - 0, 0, 0, 87, 88, 89, 90, 91, 0, 496, - 507, 506, 73, 74, 0, 75, 431, 0, 0, 0, - 0, 0, 105, 0, 0, 0, 0, 0, 0, 0, - 774, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 55, 56, - 0, 0, 0, 0, 57, 0, 58, 53, 54, 62, - 63, 64, 65, 66, 67, 68, 70, 0, 51, 84, - 52, 0, 0, 0, 0, 24, 0, 0, 0, 0, - 0, 69, 46, 92, 93, 35, 0, 104, 0, 26, - 0, 0, 0, 109, 25, 17, 16, 0, 18, 0, - 29, 0, 30, 0, 0, 19, 0, 0, 0, 20, - 21, 34, 132, 0, 22, 32, 0, 0, 33, 0, - 0, 23, 0, 28, 85, 86, 0, 0, 0, 0, - 0, 0, 0, 50, 108, 0, 101, 97, 98, 99, - 94, 95, 0, 0, 0, 0, 0, 0, 102, 0, - 0, 0, 0, 133, 100, 96, 111, 0, 103, 72, - 13, 0, 31, 59, 0, 0, 105, 87, 88, 89, - 90, 91, 0, 0, 0, 0, 73, 74, 0, 75, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 845, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 55, 56, 0, 0, 0, 0, 57, 0, - 58, 53, 54, 62, 63, 64, 65, 66, 67, 68, - 70, 0, 51, 84, 52, 0, 0, 0, 0, 24, - 0, 0, 0, 0, 0, 69, 46, 92, 93, 35, - 0, 104, 0, 26, 0, 0, 0, 109, 25, 17, - 16, 0, 18, 0, 29, 0, 30, 0, 0, 19, - 0, 0, 0, 20, 21, 34, 132, 0, 22, 32, - 0, 0, 33, 0, 0, 23, 0, 28, 85, 86, - 0, 0, 0, 0, 0, 0, 0, 50, 108, 0, + 39, 40, 0, 0, 0, 0, 50, 108, 0, 101, + 97, 98, 99, 94, 95, 0, 0, 0, 0, 0, + 0, 102, 0, 0, 0, 0, 133, 100, 96, 111, + 0, 89, 90, 91, 0, 0, 0, 0, 84, 52, + 0, 0, 0, 73, 74, 24, 76, 77, 0, 0, + 0, 53, 54, 75, 62, 63, 64, 65, 66, 67, + 68, 0, 0, 0, 103, 72, 13, 854, 31, 0, + 59, 0, 51, 0, 0, 0, 56, 55, 57, 58, + 70, 105, 87, 88, 69, 46, 92, 93, 35, 0, + 104, 0, 26, 0, 0, 0, 109, 25, 17, 16, + 0, 18, 0, 29, 850, 30, 0, 0, 19, 0, + 0, 0, 20, 21, 34, 36, 0, 22, 32, 0, + 0, 33, 0, 0, 23, 0, 28, 85, 86, 316, + 38, 39, 40, 0, 0, 0, 0, 50, 108, 0, 101, 97, 98, 99, 94, 95, 0, 0, 0, 0, 0, 0, 102, 0, 0, 0, 0, 133, 100, 96, - 111, 0, 103, 72, 13, 0, 31, 59, 0, 0, - 105, 87, 88, 89, 90, 91, 0, 0, 0, 0, - 73, 74, 0, 75, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 680, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 55, 56, 0, 0, - 0, 0, 57, 0, 58, 53, 54, 62, 63, 64, - 65, 66, 67, 68, 70, 0, 51, 84, 52, 0, - 0, 0, 0, 24, 0, 0, 0, 0, 0, 69, - 46, 92, 93, 35, 0, 104, 0, 26, 0, 0, - 0, 109, 25, 17, 16, 0, 18, 0, 29, 0, - 30, 0, 0, 19, 0, 0, 0, 20, 21, 34, - 132, 0, 22, 32, 0, 0, 33, 0, 0, 23, - 0, 28, 85, 86, 0, 0, 0, 0, 0, 0, - 0, 50, 108, 0, 101, 97, 98, 99, 94, 95, - 0, 0, 0, 0, 0, 0, 102, 0, 0, 0, - 0, 133, 100, 96, 111, 0, 103, 72, 13, 0, - 31, 59, 0, 0, 105, 87, 88, 89, 90, 91, - 0, 0, 0, 0, 73, 74, 0, 75, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 657, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 55, 56, 0, 0, 0, 0, 57, 0, 58, 53, - 54, 62, 63, 64, 65, 66, 67, 68, 70, 0, - 51, 84, 52, 0, 0, 0, 0, 24, 0, 0, - 0, 0, 0, 69, 46, 92, 93, 35, 0, 104, - 0, 26, 0, 0, 0, 109, 25, 17, 16, 0, - 18, 0, 29, 0, 30, 0, 0, 19, 0, 0, - 0, 20, 21, 34, 132, 0, 22, 32, 0, 0, - 33, 0, 0, 23, 0, 28, 85, 86, 0, 0, - 0, 0, 0, 0, 0, 50, 108, 0, 101, 97, - 98, 99, 94, 95, 0, 0, 0, 0, 0, 0, - 102, 0, 0, 0, 0, 133, 100, 96, 111, 0, - 103, 72, 13, 0, 31, 59, 0, 0, 105, 87, - 88, 89, 90, 91, 0, 0, 0, 0, 73, 74, - 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 639, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 55, 56, 0, 0, 0, 0, - 57, 0, 58, 53, 54, 62, 63, 64, 65, 66, - 67, 68, 70, 0, 51, 84, 52, 0, 0, 0, - 0, 24, 0, 0, 0, 0, 0, 69, 46, 92, + 111, 0, 89, 90, 91, 0, 0, 0, 0, 84, + 52, 0, 0, 0, 73, 74, 24, 76, 77, 0, + 0, 0, 53, 54, 75, 62, 63, 64, 65, 66, + 67, 68, 0, 0, 0, 103, 72, 13, 0, 31, + 0, 59, 0, 51, 0, 0, 0, 56, 55, 57, + 58, 70, 105, 87, 88, 69, 46, 92, 93, 35, + 0, 104, 0, 26, 0, 0, 0, 109, 25, 17, + 16, 0, 18, 0, 29, 0, 30, 779, 0, 19, + 0, 0, 0, 20, 21, 34, 36, 0, 22, 32, + 0, 0, 33, 0, 0, 23, 0, 28, 85, 86, + 316, 38, 39, 40, 0, 0, 0, 0, 50, 108, + 0, 101, 97, 98, 99, 94, 95, 0, 0, 0, + 0, 0, 0, 102, 0, 0, 0, 0, 133, 100, + 96, 111, 0, 89, 90, 91, 0, 0, 0, 0, + 84, 52, 0, 0, 0, 73, 74, 24, 76, 77, + 0, 0, 0, 53, 54, 75, 62, 63, 64, 65, + 66, 67, 68, 0, 0, 0, 103, 72, 13, 0, + 31, 0, 59, 0, 51, 0, 0, 0, 56, 55, + 57, 58, 70, 105, 87, 88, 69, 46, 92, 93, + 35, 0, 104, 0, 26, 0, 0, 0, 109, 25, + 17, 16, 762, 18, 0, 29, 0, 30, 0, 0, + 19, 0, 0, 0, 20, 21, 34, 36, 0, 22, + 32, 0, 0, 33, 0, 0, 23, 0, 28, 85, + 86, 316, 38, 39, 40, 0, 0, 0, 0, 50, + 108, 0, 101, 97, 98, 99, 94, 95, 0, 0, + 0, 0, 0, 0, 102, 0, 0, 0, 0, 133, + 100, 96, 111, 0, 89, 90, 91, 0, 0, 0, + 0, 84, 52, 0, 0, 0, 73, 74, 24, 76, + 77, 0, 0, 0, 53, 54, 75, 62, 63, 64, + 65, 66, 67, 68, 0, 0, 0, 103, 72, 13, + 0, 31, 0, 59, 0, 51, 0, 0, 0, 56, + 55, 57, 58, 70, 105, 87, 88, 69, 46, 92, 93, 35, 0, 104, 0, 26, 0, 0, 0, 109, 25, 17, 16, 0, 18, 0, 29, 0, 30, 0, - 0, 19, 0, 0, 0, 20, 21, 34, 132, 0, + 0, 19, 0, 0, 0, 20, 21, 34, 36, 0, 22, 32, 0, 0, 33, 0, 0, 23, 0, 28, - 85, 86, 0, 0, 0, 0, 0, 0, 0, 50, - 108, 0, 101, 97, 98, 99, 94, 95, 0, 0, - 0, 0, 0, 0, 102, 0, 0, 0, 0, 133, - 100, 96, 111, 0, 103, 72, 13, 155, 31, 59, - 0, 0, 105, 441, 442, 443, 444, 445, 0, 446, - 447, 448, 484, 485, 0, 179, 0, 180, 152, 153, - 157, 159, 158, 171, 172, 169, 170, 177, 173, 174, - 175, 176, 167, 168, 161, 162, 160, 163, 165, 166, - 0, 178, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 164, 0, 449, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 450, - 451, 0, 454, 455, 456, 435, 436, 437, 438, 439, - 440, 452, 453, 0, 0, 880, 0, 0, 0, 0, + 85, 86, 316, 38, 39, 40, 0, 0, 0, 0, + 50, 108, 0, 101, 97, 98, 99, 94, 95, 0, + 0, 0, 0, 0, 0, 102, 0, 0, 0, 0, + 133, 100, 96, 111, 0, 89, 90, 91, 0, 0, + 0, 0, 84, 52, 0, 0, 678, 73, 74, 24, + 76, 77, 0, 0, 0, 53, 54, 75, 62, 63, + 64, 65, 66, 67, 68, 0, 0, 0, 103, 72, + 13, 0, 31, 0, 59, 0, 51, 0, 0, 0, + 56, 55, 57, 58, 70, 105, 87, 88, 69, 46, + 92, 93, 35, 0, 104, 0, 26, 0, 0, 0, + 109, 25, 17, 16, 0, 18, 0, 29, 0, 30, + 0, 0, 19, 0, 0, 0, 20, 21, 34, 36, + 0, 22, 32, 0, 0, 33, 0, 0, 23, 0, + 28, 85, 86, 316, 38, 39, 40, 0, 0, 0, + 0, 50, 108, 0, 101, 97, 98, 99, 94, 95, + 0, 0, 0, 0, 0, 0, 102, 0, 0, 0, + 0, 133, 100, 96, 111, 0, 89, 90, 91, 0, + 0, 0, 0, 84, 52, 0, 0, 0, 73, 74, + 24, 76, 77, 0, 0, 0, 53, 54, 75, 62, + 63, 64, 65, 66, 67, 68, 0, 0, 0, 103, + 72, 13, 567, 31, 0, 59, 0, 51, 0, 0, + 0, 56, 55, 57, 58, 70, 105, 87, 88, 69, + 46, 92, 93, 35, 0, 104, 0, 26, 0, 0, + 0, 109, 25, 17, 16, 0, 18, 0, 29, 0, + 30, 0, 0, 19, 0, 0, 0, 20, 21, 34, + 36, 0, 22, 32, 0, 0, 33, 0, 0, 23, + 0, 28, 85, 86, 316, 38, 39, 40, 0, 0, + 0, 0, 50, 108, 0, 101, 97, 98, 99, 94, + 95, 0, 0, 0, 0, 0, 0, 102, 0, 0, + 0, 0, 133, 100, 96, 111, 0, 89, 90, 91, + 0, 0, 0, 0, 84, 52, 0, 0, 0, 73, + 74, 24, 76, 77, 0, 0, 0, 53, 54, 75, + 62, 63, 64, 65, 66, 67, 68, 0, 0, 0, + 103, 72, 13, 310, 31, 0, 59, 0, 51, 0, + 0, 0, 56, 55, 57, 58, 70, 105, 87, 88, + 69, 46, 92, 93, 35, 0, 104, 0, 26, 0, + 0, 0, 109, 25, 17, 16, 0, 18, 0, 29, + 0, 30, 0, 0, 19, 0, 0, 0, 20, 21, + 34, 36, 0, 22, 32, 0, 0, 33, 0, 0, + 23, 0, 28, 85, 86, 316, 38, 39, 40, 0, + 0, 0, 0, 50, 108, 0, 101, 97, 98, 99, + 94, 95, 0, 0, 0, 0, 0, 0, 102, 0, + 0, 0, 0, 133, 100, 96, 111, 0, 89, 90, + 91, 0, 0, 0, 0, 84, 52, 0, 0, 0, + 73, 74, 24, 76, 77, 0, 0, 0, 53, 54, + 75, 62, 63, 64, 65, 66, 67, 68, 0, 0, + 0, 103, 72, 13, 0, 31, 0, 59, 0, 51, + 0, 0, 0, 56, 55, 57, 58, 70, 105, 441, + 442, 452, 453, 0, 0, 432, 0, 104, 0, 0, 0, 0, 0, 0, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 487, 488, 489, 490, 491, 479, 480, 481, 482, 483, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 0, 499, 497, 498, - 494, 495, 0, 486, 492, 493, 500, 501, 503, 502, - 504, 505, 441, 442, 443, 444, 445, 426, 446, 447, - 448, 484, 485, 879, 507, 506, 111, 0, 0, 0, - 0, 898, 179, 0, 180, 152, 153, 157, 159, 158, - 171, 172, 169, 170, 177, 173, 174, 175, 176, 167, - 168, 161, 162, 160, 163, 165, 166, 0, 178, 0, - 0, 0, 0, 0, 449, 0, 0, 0, 0, 0, - 164, 0, 0, 0, 0, 0, 0, 0, 450, 451, - 0, 454, 455, 456, 435, 436, 437, 438, 439, 440, - 452, 453, 0, 0, 880, 0, 0, 0, 0, 0, - 0, 0, 0, 457, 458, 459, 460, 461, 462, 463, - 464, 465, 466, 467, 487, 488, 489, 490, 491, 479, - 480, 481, 482, 483, 468, 469, 470, 471, 472, 473, - 474, 475, 476, 477, 478, 0, 499, 497, 498, 494, - 495, 0, 486, 492, 493, 500, 501, 503, 502, 504, - 505, 154, 156, 155, 0, 0, 0, 87, 88, 89, - 90, 91, 879, 507, 506, 111, 73, 74, 0, 75, - 870, 179, 0, 180, 152, 153, 157, 159, 158, 171, - 172, 169, 170, 177, 173, 174, 175, 176, 167, 168, - 161, 162, 160, 163, 165, 166, 0, 178, 0, 0, - 0, 0, 55, 56, 0, 0, 0, 0, 57, 164, - 58, 53, 54, 62, 63, 64, 65, 66, 67, 68, - 70, 0, 51, 84, 52, 0, 0, 0, 0, 24, - 0, 0, 0, 0, 0, 69, 46, 92, 93, 35, + 494, 495, 0, 0, 486, 492, 493, 500, 501, 503, + 502, 504, 505, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 496, 507, 506, 0, 0, 443, + 444, 445, 446, 447, 448, 449, 450, 451, 454, 455, + 456, 484, 485, 435, 436, 437, 438, 439, 440, 0, + 0, 87, 88, 69, 46, 92, 93, 35, 0, 104, + 0, 26, 0, 0, 431, 109, 25, 17, 16, 0, + 18, 0, 29, 0, 30, 0, 0, 19, 0, 105, + 0, 20, 21, 34, 132, 0, 22, 32, 0, 0, + 33, 0, 0, 23, 0, 28, 85, 86, 0, 0, + 0, 0, 0, 0, 0, 0, 50, 108, 0, 101, + 97, 98, 99, 94, 95, 0, 0, 0, 0, 0, + 0, 102, 0, 0, 0, 0, 133, 100, 96, 111, + 0, 89, 90, 91, 0, 0, 0, 0, 84, 52, + 0, 0, 0, 73, 74, 24, 0, 0, 0, 0, + 0, 53, 54, 75, 62, 63, 64, 65, 66, 67, + 68, 0, 0, 0, 103, 72, 13, 0, 31, 774, + 59, 0, 51, 0, 0, 0, 56, 55, 57, 58, + 70, 105, 87, 88, 69, 46, 92, 93, 35, 0, + 104, 0, 26, 0, 0, 0, 109, 25, 17, 16, + 0, 18, 0, 29, 0, 30, 0, 0, 19, 0, + 0, 0, 20, 21, 34, 132, 0, 22, 32, 0, + 0, 33, 0, 0, 23, 0, 28, 85, 86, 0, + 0, 0, 0, 0, 0, 0, 0, 50, 108, 0, + 101, 97, 98, 99, 94, 95, 0, 0, 0, 0, + 0, 0, 102, 0, 0, 0, 0, 133, 100, 96, + 111, 0, 89, 90, 91, 0, 0, 0, 0, 84, + 52, 0, 0, 0, 73, 74, 24, 0, 0, 0, + 0, 0, 53, 54, 75, 62, 63, 64, 65, 66, + 67, 68, 0, 0, 0, 103, 72, 13, 0, 31, + 845, 59, 0, 51, 0, 0, 0, 56, 55, 57, + 58, 70, 105, 87, 88, 69, 46, 92, 93, 35, 0, 104, 0, 26, 0, 0, 0, 109, 25, 17, 16, 0, 18, 0, 29, 0, 30, 0, 0, 19, 0, 0, 0, 20, 21, 34, 132, 0, 22, 32, 0, 0, 33, 0, 0, 23, 0, 28, 85, 86, - 0, 0, 0, 0, 0, 0, 0, 50, 108, 0, - 101, 97, 98, 99, 94, 95, 0, 0, 0, 0, - 0, 0, 102, 0, 0, 0, 707, 133, 100, 96, - 111, 0, 103, 72, 13, 0, 31, 59, 0, 0, - 105, 441, 442, 443, 444, 445, 0, 446, 447, 448, - 484, 485, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 50, 108, + 0, 101, 97, 98, 99, 94, 95, 0, 0, 0, + 0, 0, 0, 102, 0, 0, 0, 0, 133, 100, + 96, 111, 0, 89, 90, 91, 0, 0, 0, 0, + 84, 52, 0, 0, 0, 73, 74, 24, 0, 0, + 0, 0, 0, 53, 54, 75, 62, 63, 64, 65, + 66, 67, 68, 0, 0, 0, 103, 72, 13, 0, + 31, 680, 59, 0, 51, 0, 0, 0, 56, 55, + 57, 58, 70, 105, 87, 88, 69, 46, 92, 93, + 35, 0, 104, 0, 26, 0, 0, 0, 109, 25, + 17, 16, 0, 18, 0, 29, 0, 30, 0, 0, + 19, 0, 0, 0, 20, 21, 34, 132, 0, 22, + 32, 0, 0, 33, 0, 0, 23, 0, 28, 85, + 86, 0, 0, 0, 0, 0, 0, 0, 0, 50, + 108, 0, 101, 97, 98, 99, 94, 95, 0, 0, + 0, 0, 0, 0, 102, 0, 0, 0, 0, 133, + 100, 96, 111, 0, 89, 90, 91, 0, 0, 0, + 0, 84, 52, 0, 0, 0, 73, 74, 24, 0, + 0, 0, 0, 0, 53, 54, 75, 62, 63, 64, + 65, 66, 67, 68, 0, 0, 0, 103, 72, 13, + 0, 31, 657, 59, 0, 51, 0, 0, 0, 56, + 55, 57, 58, 70, 105, 87, 88, 69, 46, 92, + 93, 35, 0, 104, 0, 26, 0, 0, 0, 109, + 25, 17, 16, 0, 18, 0, 29, 0, 30, 0, + 0, 19, 0, 0, 0, 20, 21, 34, 132, 0, + 22, 32, 0, 0, 33, 0, 0, 23, 0, 28, + 85, 86, 0, 0, 0, 0, 0, 0, 0, 0, + 50, 108, 0, 101, 97, 98, 99, 94, 95, 0, + 0, 0, 0, 0, 0, 102, 0, 0, 0, 0, + 133, 100, 96, 111, 0, 89, 90, 91, 0, 0, + 0, 0, 84, 52, 0, 0, 0, 73, 74, 24, + 0, 0, 0, 0, 0, 53, 54, 75, 62, 63, + 64, 65, 66, 67, 68, 0, 0, 0, 103, 72, + 13, 0, 31, 639, 59, 0, 51, 0, 0, 0, + 56, 55, 57, 58, 70, 105, 87, 88, 69, 46, + 92, 93, 35, 0, 104, 0, 26, 0, 0, 0, + 109, 25, 17, 16, 0, 18, 0, 29, 0, 30, + 0, 0, 19, 0, 0, 0, 20, 21, 34, 132, + 0, 22, 32, 0, 0, 33, 0, 0, 23, 0, + 28, 85, 86, 0, 0, 0, 0, 0, 0, 0, + 0, 50, 108, 0, 101, 97, 98, 99, 94, 95, + 0, 0, 0, 0, 0, 0, 102, 0, 178, 0, + 0, 133, 100, 96, 111, 0, 89, 90, 91, 0, + 0, 0, 0, 84, 52, 0, 0, 0, 73, 74, + 24, 0, 0, 177, 0, 0, 53, 54, 75, 62, + 63, 64, 65, 66, 67, 68, 158, 162, 161, 103, + 72, 13, 0, 31, 0, 59, 0, 51, 0, 0, + 0, 56, 55, 57, 58, 70, 105, 154, 156, 155, + 178, 171, 172, 169, 170, 173, 174, 175, 176, 167, + 168, 160, 163, 165, 166, 164, 0, 0, 0, 0, + 0, 0, 0, 0, 180, 177, 736, 0, 0, 738, + 0, 811, 810, 0, 0, 0, 0, 179, 158, 162, + 161, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 154, 156, 155, 178, 0, 0, 0, 0, 152, + 153, 157, 159, 171, 172, 169, 170, 173, 174, 175, + 176, 167, 168, 160, 163, 165, 166, 164, 180, 177, + 743, 744, 745, 742, 741, 740, 0, 0, 0, 0, + 754, 179, 158, 162, 161, 0, 0, 0, 0, 0, + 0, 0, 863, 0, 0, 154, 156, 155, 178, 0, + 0, 0, 0, 152, 153, 157, 159, 171, 172, 169, + 170, 173, 174, 175, 176, 167, 168, 160, 163, 165, + 166, 164, 180, 177, 0, 0, 0, 0, 0, 0, + 0, 0, 707, 0, 0, 179, 158, 162, 161, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 154, + 156, 155, 178, 0, 0, 0, 0, 152, 153, 157, + 159, 171, 172, 169, 170, 173, 174, 175, 176, 167, + 168, 160, 163, 165, 166, 164, 180, 177, 0, 0, + 0, 0, 692, 0, 0, 0, 0, 0, 0, 179, + 158, 162, 161, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 154, 156, 155, 178, 0, 0, 0, + 0, 152, 153, 157, 159, 171, 172, 169, 170, 173, + 174, 175, 176, 167, 168, 160, 163, 165, 166, 164, + 180, 177, 0, 0, 0, 0, 690, 0, 0, 0, + 0, 0, 0, 179, 158, 162, 161, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 154, 156, 155, + 178, 0, 0, 0, 0, 152, 153, 157, 159, 171, + 172, 169, 170, 173, 174, 175, 176, 167, 168, 160, + 163, 165, 166, 164, 180, 177, 736, 0, 0, 738, + 681, 0, 0, 0, 0, 0, 0, 179, 158, 162, + 161, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 154, 156, 155, 178, 0, 0, 0, 0, 152, + 153, 157, 159, 171, 172, 169, 170, 173, 174, 175, + 176, 167, 168, 160, 163, 165, 166, 164, 180, 177, + 743, 744, 745, 742, 741, 740, 0, 0, 677, 0, + 0, 179, 158, 162, 161, 0, 0, 0, 0, 0, + 0, 0, 829, 0, 0, 154, 156, 155, 178, 0, + 0, 0, 0, 152, 153, 157, 159, 171, 172, 169, + 170, 173, 174, 175, 176, 167, 168, 160, 163, 165, + 166, 164, 180, 177, 0, 0, 0, 0, 0, 0, + 0, 0, 676, 0, 0, 179, 158, 162, 161, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 154, + 156, 155, 178, 0, 0, 0, 0, 152, 153, 157, + 159, 171, 172, 169, 170, 173, 174, 175, 176, 167, + 168, 160, 163, 165, 166, 164, 180, 177, 736, 0, + 0, 738, 622, 0, 0, 0, 0, 0, 0, 179, + 158, 162, 161, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 154, 156, 155, 178, 0, 0, 0, + 0, 152, 153, 157, 159, 171, 172, 169, 170, 173, + 174, 175, 176, 167, 168, 160, 163, 165, 166, 164, + 180, 177, 743, 744, 745, 742, 741, 740, 0, 0, + 621, 0, 0, 179, 158, 162, 161, 0, 0, 0, + 0, 0, 0, 0, 797, 0, 0, 154, 156, 155, + 178, 0, 0, 0, 0, 152, 153, 157, 159, 171, + 172, 169, 170, 173, 174, 175, 176, 167, 168, 160, + 163, 165, 166, 164, 180, 177, 0, 0, 0, 0, + 0, 0, 0, 0, 620, 0, 0, 179, 158, 162, + 161, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 154, 156, 155, 178, 0, 0, 0, 0, 152, + 153, 157, 159, 171, 172, 169, 170, 173, 174, 175, + 176, 167, 168, 160, 163, 165, 166, 164, 180, 177, + 736, 0, 0, 738, 603, 0, 0, 0, 0, 0, + 0, 179, 158, 162, 161, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 154, 156, 155, 178, 0, + 0, 0, 0, 152, 153, 157, 159, 171, 172, 169, + 170, 173, 174, 175, 176, 167, 168, 160, 163, 165, + 166, 164, 180, 177, 743, 744, 745, 742, 741, 740, + 0, 0, 594, 0, 0, 179, 158, 162, 161, 0, + 0, 0, 0, 0, 0, 0, 732, 0, 0, 154, + 156, 155, 178, 0, 0, 0, 0, 152, 153, 157, + 159, 171, 172, 169, 170, 173, 174, 175, 176, 167, + 168, 160, 163, 165, 166, 164, 180, 177, 0, 0, + 0, 0, 584, 0, 0, 0, 0, 0, 0, 179, + 158, 162, 161, 0, 0, 0, 0, 0, 0, 565, + 0, 0, 0, 154, 156, 155, 178, 0, 0, 0, + 0, 152, 153, 157, 159, 171, 172, 169, 170, 173, + 174, 175, 176, 167, 168, 160, 163, 165, 166, 164, + 180, 177, 0, 0, 0, 0, 0, 0, 0, 0, + 582, 0, 0, 179, 158, 162, 161, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 154, 156, 155, + 178, 0, 0, 0, 0, 152, 153, 157, 159, 171, + 172, 169, 170, 173, 174, 175, 176, 167, 168, 160, + 163, 165, 166, 164, 180, 177, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 179, 158, 162, + 161, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 154, 156, 155, 178, 0, 0, 0, 0, 152, + 153, 157, 159, 171, 172, 169, 170, 173, 174, 175, + 176, 167, 168, 160, 163, 165, 166, 164, 180, 177, + 0, 0, 0, 0, 0, 0, 561, 0, 0, 0, + 0, 179, 158, 162, 161, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 154, 156, 155, 178, 0, + 0, 0, 0, 152, 153, 157, 159, 171, 172, 169, + 170, 173, 174, 175, 176, 167, 168, 160, 163, 165, + 166, 164, 180, 177, 0, 0, 0, 0, 0, 0, + 0, 0, 555, 0, 0, 179, 158, 162, 161, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 154, + 156, 155, 178, 0, 0, 0, 0, 152, 153, 157, + 159, 171, 172, 169, 170, 173, 174, 175, 176, 167, + 168, 160, 163, 165, 166, 164, 180, 177, 0, 0, + 0, 0, 0, 0, 0, 0, 551, 0, 0, 179, + 158, 162, 161, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 154, 156, 155, 178, 0, 0, 0, + 0, 152, 153, 157, 159, 171, 172, 169, 170, 173, + 174, 175, 176, 167, 168, 160, 163, 165, 166, 164, + 180, 177, 410, 0, 0, 0, 0, 0, 0, 0, + 415, 0, 0, 179, 158, 162, 161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 154, 156, 155, 178, 152, 153, 157, 159, 171, + 172, 169, 170, 173, 174, 175, 176, 167, 168, 160, + 163, 165, 166, 164, 0, 0, 0, 0, 180, 177, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 179, 158, 162, 161, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 154, 156, 155, 178, 0, + 0, 0, 0, 152, 153, 157, 159, 171, 172, 169, + 170, 173, 174, 175, 176, 167, 168, 160, 163, 165, + 166, 164, 180, 177, 0, 0, 0, 0, 0, 371, + 0, 0, 0, 0, 0, 179, 158, 162, 161, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 154, + 156, 155, 178, 0, 0, 0, 0, 152, 153, 157, + 159, 171, 172, 169, 170, 173, 174, 175, 176, 167, + 168, 160, 163, 165, 166, 164, 180, 177, 0, 0, + 0, 0, 0, 151, 0, 0, 0, 0, 0, 179, + 158, 162, 161, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 154, 156, 155, 178, 0, 0, 0, + 0, 152, 153, 157, 159, 171, 172, 169, 170, 173, + 174, 175, 176, 167, 168, 160, 163, 165, 166, 164, + 180, 177, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 179, 158, 162, 161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 449, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 450, 451, 0, - 454, 455, 456, 435, 436, 437, 438, 439, 440, 452, - 453, 0, 0, 432, 0, 0, 0, 0, 0, 0, - 0, 0, 457, 458, 459, 460, 461, 462, 463, 464, - 465, 466, 467, 487, 488, 489, 490, 491, 479, 480, - 481, 482, 483, 468, 469, 470, 471, 472, 473, 474, - 475, 476, 477, 478, 0, 499, 497, 498, 494, 495, - 0, 486, 492, 493, 500, 501, 503, 502, 504, 505, - 441, 442, 443, 444, 445, 0, 446, 447, 448, 484, - 485, 496, 507, 506, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 449, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 450, 451, 0, 454, - 455, 456, 743, 744, 745, 742, 741, 740, 452, 453, - 0, 0, 914, 0, 0, 0, 0, 0, 0, 0, - 0, 457, 458, 459, 460, 461, 462, 463, 464, 465, + 0, 0, 0, 0, 0, 152, 153, 157, 159, 171, + 172, 169, 170, 173, 174, 175, 176, 167, 168, 160, + 163, 165, 166, 164, 441, 442, 452, 453, 0, 0, + 880, 0, 0, 0, 0, 0, 0, 0, 0, 457, + 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, + 487, 488, 489, 490, 491, 479, 480, 481, 482, 483, + 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, + 478, 0, 499, 497, 498, 494, 495, 0, 0, 486, + 492, 493, 500, 501, 503, 502, 504, 505, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 879, + 507, 506, 111, 0, 443, 444, 445, 446, 447, 448, + 449, 450, 451, 454, 455, 456, 484, 485, 435, 436, + 437, 438, 439, 440, 0, 0, 441, 442, 452, 453, + 0, 0, 880, 0, 0, 0, 0, 0, 0, 0, + 898, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 487, 488, 489, 490, 491, 479, 480, 481, 482, 483, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 0, 499, 497, 498, 494, 495, 0, - 486, 492, 493, 500, 501, 503, 502, 504, 505, 0, - 0, 0, 0, 0, 87, 88, 89, 90, 91, 0, - 496, 507, 506, 73, 74, 0, 75, 0, 0, 0, + 0, 486, 492, 493, 500, 501, 503, 502, 504, 505, + 0, 0, 0, 0, 0, 0, 213, 214, 0, 0, + 0, 879, 507, 506, 111, 0, 443, 444, 445, 446, + 447, 448, 449, 450, 451, 454, 455, 456, 484, 485, + 435, 436, 437, 438, 439, 440, 155, 178, 200, 201, + 202, 203, 205, 206, 207, 208, 209, 210, 211, 212, + 204, 0, 870, 0, 0, 0, 0, 0, 0, 426, + 0, 180, 177, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 179, 158, 162, 161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 178, 0, 0, 0, 0, 152, 153, 157, 159, + 171, 172, 169, 170, 173, 174, 175, 176, 167, 168, + 160, 163, 165, 166, 164, 180, 177, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 179, 158, + 162, 161, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 178, 0, 0, 0, 0, + 152, 153, 157, 159, 171, 172, 169, 170, 173, 174, + 175, 176, 167, 168, 160, 163, 165, 166, 164, 180, + 177, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 179, 158, 162, 161, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 178, + 0, 0, 0, 0, 152, 153, 157, 159, 171, 172, + 169, 170, 173, 174, 175, 176, 167, 168, 160, 163, + 165, 166, 164, 180, 177, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 158, 162, 161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, - 56, 0, 0, 0, 0, 57, 0, 58, 53, 54, - 62, 63, 64, 65, 66, 67, 68, 70, 0, 51, - 84, 52, 0, 0, 0, 0, 138, 0, 0, 0, - 0, 0, 69, 0, 92, 93, 116, 0, 104, 0, - 0, 0, 0, 0, 109, 0, 0, 0, 0, 0, + 0, 0, 178, 0, 0, 0, 0, 0, 152, 153, + 157, 159, 171, 172, 169, 170, 173, 174, 175, 176, + 167, 168, 160, 163, 165, 166, 164, 177, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 132, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 85, 86, 0, 0, 0, - 0, 0, 0, 0, 50, 108, 0, 101, 97, 98, - 99, 94, 95, 0, 0, 0, 0, 0, 0, 102, - 0, 0, 0, 0, 133, 100, 96, 111, 532, 103, - 72, 0, 0, 0, 59, 528, 0, 105, 87, 88, - 89, 90, 91, 0, 0, 0, 0, 73, 74, 0, - 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 225, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 55, 56, 0, 0, 0, 0, 57, - 0, 58, 53, 54, 62, 63, 64, 65, 66, 67, - 68, 70, 0, 51, 84, 52, 0, 0, 0, 0, - 138, 0, 0, 0, 0, 0, 69, 0, 92, 93, + 158, 162, 161, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 178, 0, 0, 0, 0, + 0, 0, 153, 157, 159, 171, 172, 169, 170, 173, + 174, 175, 176, 167, 168, 160, 163, 165, 166, 164, + 177, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 158, 162, 161, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 178, 0, + 0, 0, 0, 0, 0, 0, 157, 159, 171, 172, + 169, 170, 173, 174, 175, 176, 167, 168, 160, 163, + 165, 166, 164, 177, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 158, 162, 161, 0, + 0, 0, 0, 87, 88, 69, 0, 92, 93, 116, + 0, 104, 0, 0, 0, 0, 0, 109, 0, 0, + 159, 171, 172, 169, 170, 173, 174, 175, 176, 167, + 168, 160, 163, 165, 166, 164, 132, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 85, 86, + 0, 0, 0, 0, 0, 0, 0, 0, 50, 108, + 0, 101, 97, 98, 99, 94, 95, 0, 0, 0, + 0, 0, 0, 102, 0, 0, 0, 0, 133, 100, + 96, 111, 532, 89, 90, 91, 0, 0, 0, 0, + 84, 52, 0, 0, 0, 73, 74, 138, 0, 0, + 0, 0, 0, 53, 54, 75, 62, 63, 64, 65, + 66, 67, 68, 0, 0, 0, 103, 72, 0, 0, + 0, 0, 59, 528, 51, 0, 0, 0, 56, 55, + 57, 58, 70, 105, 87, 88, 69, 0, 92, 93, 116, 0, 104, 0, 0, 0, 0, 0, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, 0, 0, - 0, 0, 0, 0, 87, 88, 89, 90, 91, 85, - 86, 0, 0, 73, 74, 0, 75, 0, 226, 108, - 0, 101, 97, 98, 99, 94, 95, 0, 0, 0, - 0, 0, 0, 102, 0, 0, 0, 0, 133, 100, - 96, 111, 0, 103, 72, 0, 0, 0, 59, 55, - 56, 105, 0, 0, 0, 57, 0, 58, 53, 54, - 62, 63, 64, 65, 66, 67, 68, 70, 0, 51, - 84, 52, 0, 0, 0, 0, 138, 0, 0, 0, - 0, 0, 69, 0, 92, 93, 116, 0, 104, 0, - 0, 0, 0, 0, 109, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 85, + 86, 0, 0, 0, 0, 0, 0, 0, 0, 226, + 108, 0, 101, 97, 98, 99, 94, 95, 0, 0, + 0, 0, 0, 0, 102, 0, 0, 0, 0, 133, + 100, 96, 111, 0, 89, 90, 91, 0, 0, 0, + 0, 84, 52, 0, 0, 0, 73, 74, 138, 0, + 0, 0, 0, 0, 53, 54, 75, 62, 63, 64, + 65, 66, 67, 68, 0, 0, 0, 103, 72, 0, + 0, 0, 0, 59, 0, 51, 0, 0, 225, 56, + 55, 57, 58, 70, 105, 87, 88, 69, 0, 92, + 93, 116, 0, 104, 0, 0, 0, 0, 0, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 132, 0, 0, 0, 0, 0, 0, - 87, 88, 89, 90, 91, 85, 86, 0, 0, 73, - 74, 0, 75, 0, 50, 108, 0, 101, 97, 98, - 99, 94, 95, 0, 0, 0, 0, 0, 0, 102, - 0, 0, 0, 591, 133, 100, 96, 111, 532, 103, - 72, 0, 0, 0, 59, 55, 56, 105, 0, 0, - 0, 57, 0, 58, 53, 54, 62, 63, 64, 65, - 66, 67, 68, 70, 0, 51, 84, 52, 0, 0, - 0, 0, 138, 0, 0, 0, 0, 0, 69, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 132, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 85, 86, 0, 0, 0, 0, 0, 0, 0, 0, + 50, 108, 0, 101, 97, 98, 99, 94, 95, 0, + 0, 0, 0, 0, 0, 102, 0, 0, 0, 0, + 133, 100, 96, 111, 532, 89, 90, 91, 0, 0, + 0, 0, 84, 52, 0, 0, 0, 73, 74, 138, + 0, 0, 0, 0, 0, 53, 54, 75, 62, 63, + 64, 65, 66, 67, 68, 0, 0, 0, 103, 72, + 0, 0, 0, 0, 59, 0, 51, 0, 0, 0, + 56, 55, 57, 58, 70, 105, 87, 88, 69, 0, 92, 93, 116, 0, 104, 0, 0, 0, 0, 0, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, - 0, 0, 0, 0, 0, 0, 87, 88, 89, 90, - 91, 85, 86, 0, 0, 73, 74, 0, 75, 0, - 592, 108, 0, 101, 97, 98, 99, 94, 95, 0, - 0, 0, 0, 0, 0, 102, 0, 0, 0, 0, - 133, 100, 96, 111, 0, 103, 72, 0, 0, 0, - 59, 55, 56, 105, 0, 0, 0, 57, 0, 58, - 53, 54, 62, 63, 64, 65, 66, 67, 68, 70, - 0, 51, 84, 52, 0, 0, 0, 0, 138, 0, - 0, 0, 0, 0, 69, 0, 92, 93, 116, 424, - 104, 0, 0, 0, 0, 0, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 132, 0, 0, 0, 0, - 0, 0, 87, 88, 89, 90, 91, 85, 86, 0, - 0, 73, 74, 0, 75, 0, 50, 108, 0, 101, - 97, 98, 99, 94, 95, 0, 0, 0, 0, 0, - 0, 102, 0, 0, 0, 387, 133, 100, 96, 111, - 0, 103, 72, 0, 0, 0, 59, 55, 56, 105, - 0, 0, 0, 57, 0, 58, 53, 54, 62, 63, - 64, 65, 66, 67, 68, 70, 0, 51, 84, 52, - 0, 0, 0, 0, 138, 0, 0, 0, 0, 0, + 0, 85, 86, 0, 0, 0, 0, 0, 0, 0, + 0, 592, 108, 0, 101, 97, 98, 99, 94, 95, + 0, 0, 0, 0, 0, 0, 102, 0, 0, 0, + 0, 133, 100, 96, 111, 0, 89, 90, 91, 0, + 0, 0, 0, 84, 52, 0, 0, 0, 73, 74, + 138, 0, 0, 0, 0, 0, 53, 54, 75, 62, + 63, 64, 65, 66, 67, 68, 0, 0, 0, 103, + 72, 0, 0, 0, 0, 59, 0, 51, 0, 0, + 591, 56, 55, 57, 58, 70, 105, 87, 88, 69, + 0, 92, 93, 116, 424, 104, 0, 0, 0, 0, + 0, 109, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 132, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 85, 86, 0, 0, 0, 0, 0, 0, + 0, 0, 50, 108, 0, 101, 97, 98, 99, 94, + 95, 0, 0, 0, 0, 0, 0, 102, 0, 0, + 0, 0, 133, 100, 96, 111, 0, 89, 90, 91, + 0, 0, 0, 0, 84, 52, 0, 0, 0, 73, + 74, 138, 0, 0, 0, 0, 0, 53, 54, 75, + 62, 63, 64, 65, 66, 67, 68, 0, 0, 0, + 103, 72, 0, 0, 0, 0, 59, 0, 51, 0, + 0, 0, 56, 55, 57, 58, 70, 105, 87, 88, 69, 0, 92, 93, 116, 0, 104, 0, 0, 0, 0, 0, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 132, 0, 0, 0, 0, 0, 0, 87, 88, - 89, 90, 91, 85, 86, 0, 0, 73, 74, 0, - 75, 0, 50, 108, 0, 101, 97, 98, 99, 94, - 95, 0, 0, 0, 0, 363, 0, 102, 0, 0, - 0, 0, 133, 100, 96, 111, 0, 103, 72, 0, - 0, 0, 59, 55, 56, 105, 0, 0, 0, 57, - 0, 58, 53, 54, 62, 63, 64, 65, 66, 67, - 68, 70, 0, 51, 84, 52, 0, 0, 0, 0, - 138, 0, 0, 0, 0, 0, 69, 0, 92, 93, - 116, 0, 104, 0, 0, 0, 0, 0, 109, 0, + 0, 132, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 85, 86, 0, 0, 0, 0, 0, + 0, 0, 0, 50, 108, 0, 101, 97, 98, 99, + 94, 95, 0, 0, 0, 0, 0, 0, 102, 0, + 0, 0, 0, 133, 100, 96, 111, 0, 89, 90, + 91, 0, 0, 0, 0, 84, 52, 0, 0, 0, + 73, 74, 138, 0, 0, 0, 0, 0, 53, 54, + 75, 62, 63, 64, 65, 66, 67, 68, 0, 0, + 0, 103, 72, 0, 0, 0, 0, 59, 0, 51, + 0, 0, 387, 56, 55, 57, 58, 70, 105, 87, + 88, 69, 0, 92, 93, 116, 0, 104, 0, 0, + 0, 0, 0, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 132, 0, 0, - 0, 0, 0, 0, 87, 88, 89, 90, 91, 85, - 86, 0, 0, 73, 74, 0, 75, 0, 50, 108, - 0, 101, 97, 98, 99, 94, 95, 0, 0, 0, - 0, 0, 0, 102, 0, 0, 0, 0, 133, 100, - 96, 111, 0, 103, 72, 0, 0, 0, 59, 55, - 56, 105, 0, 0, 0, 57, 0, 58, 53, 54, - 62, 63, 64, 65, 66, 67, 68, 70, 0, 51, - 84, 52, 0, 0, 0, 0, 138, 0, 0, 0, - 0, 0, 69, 0, 92, 93, 116, 0, 104, 0, + 0, 0, 132, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 85, 86, 0, 0, 0, 0, + 0, 0, 0, 0, 50, 108, 0, 101, 97, 98, + 99, 94, 95, 0, 0, 0, 0, 0, 0, 102, + 0, 0, 0, 0, 133, 100, 96, 111, 0, 89, + 90, 91, 0, 0, 0, 0, 84, 52, 0, 0, + 0, 73, 74, 138, 0, 0, 0, 0, 0, 53, + 54, 75, 62, 63, 64, 65, 66, 67, 68, 0, + 0, 0, 103, 72, 0, 0, 0, 363, 59, 0, + 51, 0, 0, 0, 56, 55, 57, 58, 70, 105, + 87, 88, 69, 0, 92, 93, 116, 0, 104, 0, 0, 0, 0, 0, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85, 86, 0, 0, 0, - 0, 0, 0, 0, 50, 108, 0, 101, 97, 98, - 99, 94, 95, 0, 0, 0, 154, 156, 155, 102, - 0, 0, 0, 0, 133, 100, 96, 111, 0, 103, - 72, 0, 0, 0, 59, 0, 179, 105, 180, 152, - 153, 157, 159, 158, 171, 172, 169, 170, 177, 173, - 174, 175, 176, 167, 168, 161, 162, 160, 163, 165, - 166, 0, 178, 154, 156, 155, 0, 0, 0, 0, - 0, 0, 0, 0, 164, 0, 0, 0, 0, 0, - 0, 0, 0, 179, 0, 180, 152, 153, 157, 159, - 158, 171, 172, 169, 170, 177, 173, 174, 175, 176, - 167, 168, 161, 162, 160, 163, 165, 166, 0, 178, - 154, 156, 155, 0, 0, 0, 0, 0, 0, 0, - 0, 164, 0, 0, 0, 0, 0, 0, 0, 0, - 179, 0, 180, 152, 153, 157, 159, 158, 171, 172, - 169, 170, 177, 173, 174, 175, 176, 167, 168, 161, - 162, 160, 163, 165, 166, 0, 178, 154, 156, 155, - 0, 0, 0, 0, 0, 0, 0, 0, 164, 0, - 0, 677, 0, 0, 0, 0, 0, 179, 0, 180, - 152, 153, 157, 159, 158, 171, 172, 169, 170, 177, - 173, 174, 175, 176, 167, 168, 161, 162, 160, 163, - 165, 166, 0, 178, 154, 156, 155, 0, 0, 0, - 0, 0, 0, 0, 0, 164, 0, 0, 676, 0, - 0, 0, 0, 0, 179, 0, 180, 152, 153, 157, - 159, 158, 171, 172, 169, 170, 177, 173, 174, 175, - 176, 167, 168, 161, 162, 160, 163, 165, 166, 0, - 178, 154, 156, 155, 0, 0, 0, 0, 0, 0, - 0, 0, 164, 0, 0, 621, 0, 0, 0, 0, - 0, 179, 0, 180, 152, 153, 157, 159, 158, 171, - 172, 169, 170, 177, 173, 174, 175, 176, 167, 168, - 161, 162, 160, 163, 165, 166, 0, 178, 154, 156, - 155, 0, 0, 0, 0, 0, 0, 0, 0, 164, - 0, 0, 620, 0, 0, 0, 0, 0, 179, 0, - 180, 152, 153, 157, 159, 158, 171, 172, 169, 170, - 177, 173, 174, 175, 176, 167, 168, 161, 162, 160, - 163, 165, 166, 0, 178, 154, 156, 155, 0, 0, - 0, 0, 0, 0, 0, 0, 164, 0, 0, 594, - 0, 0, 0, 0, 0, 179, 0, 180, 152, 153, - 157, 159, 158, 171, 172, 169, 170, 177, 173, 174, - 175, 176, 167, 168, 161, 162, 160, 163, 165, 166, - 0, 178, 154, 156, 155, 0, 0, 0, 0, 0, - 0, 0, 0, 164, 0, 0, 582, 0, 0, 0, - 0, 0, 179, 0, 180, 152, 153, 157, 159, 158, - 171, 172, 169, 170, 177, 173, 174, 175, 176, 167, - 168, 161, 162, 160, 163, 165, 166, 0, 178, 154, - 156, 155, 0, 0, 0, 0, 0, 0, 0, 0, - 164, 0, 0, 555, 0, 0, 0, 0, 0, 179, - 810, 180, 152, 153, 157, 159, 158, 171, 172, 169, - 170, 177, 173, 174, 175, 176, 167, 168, 161, 162, - 160, 163, 165, 166, 0, 178, 154, 156, 155, 0, - 0, 0, 0, 0, 0, 0, 0, 164, 0, 0, - 551, 0, 0, 0, 0, 0, 179, 0, 180, 152, - 153, 157, 159, 158, 171, 172, 169, 170, 177, 173, - 174, 175, 176, 167, 168, 161, 162, 160, 163, 165, - 166, 0, 178, 154, 156, 155, 0, 0, 0, 0, - 0, 0, 0, 0, 164, 0, 0, 415, 0, 0, - 0, 0, 0, 179, 0, 180, 152, 153, 157, 159, - 158, 171, 172, 169, 170, 177, 173, 174, 175, 176, - 167, 168, 161, 162, 160, 163, 165, 166, 0, 178, - 154, 156, 155, 0, 0, 0, 0, 0, 0, 0, - 0, 164, 811, 0, 0, 0, 0, 0, 0, 0, - 179, 0, 180, 152, 153, 157, 159, 158, 171, 172, - 169, 170, 177, 173, 174, 175, 176, 167, 168, 161, - 162, 160, 163, 165, 166, 0, 178, 154, 156, 155, - 0, 0, 0, 0, 0, 0, 0, 0, 164, 371, - 0, 0, 0, 0, 0, 0, 0, 179, 0, 180, - 152, 153, 157, 159, 158, 171, 172, 169, 170, 177, - 173, 174, 175, 176, 167, 168, 161, 162, 160, 163, - 165, 166, 0, 178, 0, 154, 156, 155, 0, 0, - 0, 0, 0, 0, 0, 164, 151, 0, 0, 0, - 0, 0, 0, 0, 0, 179, 0, 180, 152, 153, - 157, 159, 158, 171, 172, 169, 170, 177, 173, 174, - 175, 176, 167, 168, 161, 162, 160, 163, 165, 166, - 0, 178, 154, 156, 155, 0, 0, 0, 0, 0, - 0, 0, 692, 164, 0, 0, 0, 0, 0, 0, - 0, 0, 179, 0, 180, 152, 153, 157, 159, 158, - 171, 172, 169, 170, 177, 173, 174, 175, 176, 167, - 168, 161, 162, 160, 163, 165, 166, 0, 178, 0, - 154, 156, 155, 0, 0, 0, 0, 0, 0, 690, - 164, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 179, 0, 180, 152, 153, 157, 159, 158, 171, 172, - 169, 170, 177, 173, 174, 175, 176, 167, 168, 161, - 162, 160, 163, 165, 166, 0, 178, 154, 156, 155, - 0, 0, 0, 0, 0, 0, 0, 681, 164, 0, - 0, 0, 0, 0, 0, 0, 0, 179, 0, 180, - 152, 153, 157, 159, 158, 171, 172, 169, 170, 177, - 173, 174, 175, 176, 167, 168, 161, 162, 160, 163, - 165, 166, 0, 178, 0, 154, 156, 155, 0, 0, - 0, 0, 0, 0, 622, 164, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 179, 0, 180, 152, 153, - 157, 159, 158, 171, 172, 169, 170, 177, 173, 174, - 175, 176, 167, 168, 161, 162, 160, 163, 165, 166, - 0, 178, 154, 156, 155, 0, 0, 0, 0, 0, - 0, 0, 603, 164, 0, 0, 0, 0, 0, 0, - 0, 0, 179, 561, 180, 152, 153, 157, 159, 158, - 171, 172, 169, 170, 177, 173, 174, 175, 176, 167, - 168, 161, 162, 160, 163, 165, 166, 0, 178, 0, - 565, 154, 156, 155, 0, 0, 410, 0, 0, 584, - 164, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 179, 0, 180, 152, 153, 157, 159, 158, 171, - 172, 169, 170, 177, 173, 174, 175, 176, 167, 168, - 161, 162, 160, 163, 165, 166, 0, 178, 154, 156, - 155, 0, 0, 0, 0, 0, 0, 0, 0, 164, - 0, 0, 0, 0, 0, 0, 0, 0, 179, 0, - 180, 152, 153, 157, 159, 158, 171, 172, 169, 170, - 177, 173, 174, 175, 176, 167, 168, 161, 162, 160, - 163, 165, 166, 0, 178, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 164, + 0, 0, 0, 0, 0, 50, 108, 0, 101, 97, + 98, 99, 94, 95, 0, 0, 0, 0, 0, 0, + 102, 178, 0, 0, 0, 133, 100, 96, 111, 0, + 89, 90, 91, 0, 0, 0, 0, 84, 52, 0, + 0, 0, 73, 74, 138, 0, 177, 0, 0, 0, + 53, 54, 75, 62, 63, 64, 65, 66, 67, 68, + 162, 161, 0, 103, 72, 0, 0, 0, 0, 59, + 0, 51, 0, 0, 0, 56, 55, 57, 58, 70, + 105, 0, 0, 0, 171, 172, 169, 170, 173, 174, + 175, 176, 167, 168, 160, 163, 165, 166, 164, 441, + 442, 452, 453, 0, 0, 432, 0, 0, 0, 0, + 0, 0, 0, 0, 457, 458, 459, 460, 461, 462, + 463, 464, 465, 466, 467, 487, 488, 489, 490, 491, + 479, 480, 481, 482, 483, 468, 469, 470, 471, 472, + 473, 474, 475, 476, 477, 478, 0, 499, 497, 498, + 494, 495, 0, 0, 486, 492, 493, 500, 501, 503, + 502, 504, 505, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 496, 507, 506, 0, 0, 443, + 444, 445, 446, 447, 448, 449, 450, 451, 454, 455, + 456, 484, 485, 435, 436, 437, 438, 439, 440, 441, + 442, 452, 453, 0, 0, 914, 0, 0, 0, 0, + 0, 0, 0, 0, 457, 458, 459, 460, 461, 462, + 463, 464, 465, 466, 467, 487, 488, 489, 490, 491, + 479, 480, 481, 482, 483, 468, 469, 470, 471, 472, + 473, 474, 475, 476, 477, 478, 0, 499, 497, 498, + 494, 495, 0, 0, 486, 492, 493, 500, 501, 503, + 502, 504, 505, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 496, 507, 506, 0, 0, 443, + 444, 445, 446, 447, 448, 449, 450, 451, 454, 455, + 456, 484, 485, 743, 744, 745, 742, 741, 740, } var yyPact = [...]int{ - -1000, -1000, 1255, -1000, -1000, -1000, -1000, -1000, -1000, 157, - 338, 412, 557, -1000, -1000, -1000, 156, 4963, 154, 151, - 6270, 6270, 6270, 24, 464, 6270, -1000, 6923, 149, 148, - 146, -1000, 287, 6270, 607, 743, 671, 493, 603, 599, - 595, 641, 695, 2417, -1000, -1000, 144, -1000, -1000, 357, - 142, 5574, 6270, 150, 150, 6270, 6270, 6270, 6270, 6270, - -1000, -1000, 6270, 6270, 6270, 6270, 6270, 6270, 6270, 134, - 6270, -1000, 664, 6270, 6270, 6270, -1000, -1000, -1000, 585, - -1000, 307, 303, -1000, 201, 131, 129, 6270, 6270, 100, - 6270, 6270, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, 486, 633, -1000, 63, 34, 34, 93, -1000, - 293, 554, -28, 554, 84, -1000, -1000, 233, 415, 281, - 438, 554, -1000, -1000, -1000, -1000, 273, -1000, 774, 3387, - 6270, 447, 671, 285, 6270, 6270, 232, 7398, 425, 230, - 218, 254, -1000, -1000, 249, 671, -1000, 772, 239, -1000, - 7398, -1000, 6270, 6270, 6270, 6270, 6270, 6270, 6270, 6270, - 6270, 6270, 6270, 6270, 6270, 6270, 6270, 6270, 6270, 6270, - 6270, 6270, 6270, 6270, 6270, 6270, 6270, 6270, 240, 6154, - 6270, 150, 6270, 557, -1000, 6876, 214, -1000, 590, -1000, - 589, -1000, 371, -1000, 386, 78, 4963, 75, 211, 741, - 6038, 6270, 6270, 6270, 6270, 6270, 6270, 6270, 6270, 6270, - 6270, 6270, 6270, -1000, -1000, 6270, 6270, 6270, 101, 5574, - -57, 808, -1000, -1000, 7351, 150, 68, -1000, -1000, 585, - 6270, -1000, -1000, 5574, -1000, 629, 629, 719, 629, 6782, - 629, 629, 629, 629, 629, 629, 629, -1000, 6270, 629, - 289, 471, 602, -1000, 491, 5922, 150, 1076, 4812, 1076, - 6270, 3715, 3715, 34, -1000, 301, 191, 34, -1000, -1000, - 6270, 6270, 7398, 7398, 6270, 7398, 7398, 460, -1000, 452, - 341, 471, 6270, -1000, -1000, 5410, -1000, 5574, 583, 293, - 210, 293, -1000, -1000, 1091, -1000, 208, 220, 437, 554, - -1000, 372, 351, 575, 429, -1000, -1000, 557, 6270, -1000, - -1000, -1000, -1000, -1000, -1000, -1000, 58, 6735, 51, -1000, - 203, 805, 7398, 6688, -1000, -1000, -1000, -1000, 24, -1000, - 551, -1000, 6270, -1000, 6270, 1402, 1566, 3705, 1076, 4665, - 1730, 2054, 1891, 744, 744, 744, 719, 629, 719, 719, - 1349, 1349, 912, 912, 912, 912, 2209, 2209, 2209, 2209, - 912, -1000, 7302, 6270, 1240, 804, -1000, -1000, 7255, 111, - 3223, -1000, -1000, -1000, 50, 371, 379, 410, 282, -1000, - 410, 6270, -1000, 6270, -1000, -1000, 1076, 6270, 1076, 1076, - 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, - 6641, -58, 7207, 34, -1000, 6270, -1000, -31, 771, 5574, - 5806, -1000, 5574, 6594, -65, -1000, -35, -1000, -1000, -1000, - -1000, 634, 556, 7160, 268, 246, 6270, -67, 34, -1000, - -1000, 6270, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, 1190, -1000, -1000, -1000, -1000, -1000, -1000, 251, + 491, 550, 710, -1000, -1000, -1000, 245, 3912, 239, 235, + 6856, 6856, 6856, 170, 644, 6856, -1000, 5152, 233, 232, + 231, -1000, 422, 6856, 777, 283, -10, 496, 775, 774, + 772, 451, 508, 5442, -1000, -1000, 230, -1000, -1000, 157, + 229, 6070, 6856, 333, 333, 6856, 6856, 6856, 6856, 6856, + -1000, -1000, 6856, 6856, 6856, 6856, 6856, 6856, 6856, 226, + 6856, -1000, 818, 6856, 6856, 6856, -1000, -1000, -1000, 123, + -1000, 534, 533, -1000, 488, 224, 223, 6856, 6856, 219, + 6856, 6856, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, 779, 797, -1000, 117, 201, 201, 216, -1000, + 486, 687, 173, 687, 262, -1000, -1000, 375, 561, 5, + 608, 687, -1000, -1000, -1000, -1000, 4, -1000, -14, 2893, + 6856, 631, -10, 484, 6856, 6856, 370, 5206, 607, 367, + 366, -1, -1000, -1000, -5, -10, -1000, -17, -7, -1000, + 5206, -1000, 6856, 6856, 6856, 6856, 6856, 6856, 6856, 6856, + 6856, 6856, 6856, 6856, 6856, 6856, 6856, 6856, 6856, 6856, + 6856, 6856, 6856, 6856, 6856, 6856, 6856, 6856, 361, 6725, + 6856, 333, 6856, 710, -1000, 5098, 344, -1000, 767, -1000, + 764, -1000, 543, -1000, 558, 214, 3912, 213, 343, 282, + 6594, 6856, 6856, 6856, 6856, 6856, 6856, 6856, 6856, 6856, + 6856, 6856, 6856, -1000, -1000, 6856, 6856, 6856, 96, 6070, + 119, 16, -1000, -1000, 5044, 333, 211, -1000, -1000, 123, + 6856, -1000, -1000, 6070, -1000, -80, -80, 12, -80, 4986, + -80, -80, -80, -80, -80, -80, -80, -1000, 6856, -80, + 425, 660, 658, -1000, 165, 6463, 333, 5595, 5541, 5595, + 6856, 3155, 3155, 201, -1000, 501, 182, 201, -1000, -1000, + 6856, 6856, 5206, 5206, 6856, 5206, 5206, 651, -1000, 740, + 517, 660, 6856, -1000, -1000, 5939, -1000, 6070, 749, 486, + 339, 486, -1000, -1000, 1059, -1000, 334, -8, 594, 687, + -1000, 554, 521, 733, 563, -1000, -1000, 710, 6856, -1000, + -1000, -1000, -1000, -1000, -1000, -1000, 207, 4932, 206, -1000, + 332, 15, 5206, 4878, -1000, -1000, -1000, -1000, 170, -1000, + 681, -1000, 6856, -1000, 6856, 5702, 5755, 319, 5595, 5487, + 5808, 6841, 3898, 62, 62, 62, 12, -80, 12, 12, + 236, 236, 360, 360, 360, 360, 151, 151, 151, 151, + 360, -1000, 4824, 6856, 5649, 14, -1000, -1000, 4770, -12, + 2762, -1000, -1000, -1000, 205, 543, 518, 542, 419, -1000, + 542, 6856, -1000, 6856, -1000, -1000, 5595, 6856, 5595, 5595, + 5595, 5595, 5595, 5595, 5595, 5595, 5595, 5595, 5595, 5595, + 4716, 116, 4662, 201, -1000, 6856, -1000, 172, -25, 6070, + 6332, -1000, 6070, 4608, 112, -1000, 171, -1000, -1000, -1000, + -1000, 234, 698, 4554, 99, 385, 6856, 72, 201, -1000, + -1000, 6856, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 34, -1000, - -1000, -1000, -1000, 24, 6270, 6270, 101, 24, 371, 801, - -1000, 7398, 6547, 6500, -1000, -1000, -1000, 7112, -1000, 800, - -1000, 7398, 6270, -36, -1000, -1000, 927, -1000, -1000, -1000, - 349, 350, -1000, 554, 348, 566, -1000, 345, -1000, 7398, - -37, 4515, 6270, 6270, 6270, 370, -1000, -1000, 18, 7398, - -1000, 6270, 1240, -38, 150, 499, 4351, -1000, 15, 373, - 379, -1000, 410, -1000, -1000, 279, 792, -1000, 6453, 6406, - 3059, 2054, 4187, -1000, -1000, -1000, 7065, 763, 6270, -1000, - 7398, 150, -12, -40, -1000, -1000, -1000, -72, -1000, -1000, - 484, -1000, -1000, -1000, -1000, 6270, -1000, 1076, -1000, -1000, - 7017, -1000, -1000, -73, 6970, -1000, -1000, 379, -41, 6270, - -1000, -1000, -1000, -42, 5690, 7398, -1000, -1000, 554, 336, - 796, -1000, -1000, 554, 566, -1000, 202, -1000, -1000, -1000, - 4951, 200, 7398, -1000, 199, 190, 373, 1240, 188, -1000, - -43, 778, 150, -14, 5574, -1000, -1000, -1000, 433, 373, - -46, 799, -1000, 673, -1000, -1000, 378, -1000, -1000, -1000, - -1000, 278, 792, 568, -1000, 410, 4963, 728, 186, -1000, - -1000, -1000, 6270, 1076, -1000, 5574, 763, -1000, -1000, 435, - -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 795, -1000, - 554, 243, 566, -1000, 796, -1000, 2895, 184, 6270, 194, - -1000, 627, -1000, -47, -1000, 3859, 499, -1000, 5574, -79, - 2731, -1000, -16, 277, -48, 417, 373, 257, -1000, -1000, - 272, -1000, -1000, -1000, 525, 483, 410, 685, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, -1000, 550, -1000, -1000, -1000, - -1000, 3551, 1076, -49, 242, 267, 238, 554, 795, -1000, - -1000, 237, 183, -1000, -50, -1000, 6270, 162, 119, 182, - 620, 417, -1000, -1000, -1000, -51, -1000, -52, -1000, 180, - 410, -1000, 706, 706, -21, -1000, 544, -1000, -1000, 443, - 138, -1000, 765, 5127, 671, 117, -1000, -1000, 3551, 763, - -1000, -1000, -1000, -1000, 192, -1000, -1000, 4023, 6829, -1000, - -1000, -1000, -1000, -1000, 179, 706, 2567, 3859, -1000, -1000, - 584, -1000, 2403, 264, 373, 259, 510, 762, 174, -1000, - -1000, 525, -1000, 6270, 133, -1000, 760, 5127, -1000, -1000, - 4818, 26, -1000, -1000, -1000, -1000, -1000, 3551, -1000, 255, - 176, -1000, -54, 410, -1000, -1000, -1000, -1000, 81, -1000, - -1000, 500, 6270, -1000, -1000, 7398, -1000, 5127, 6270, -1000, - -1000, 4679, -1000, 171, 167, 383, 436, 298, -1000, 285, - -1000, -1000, 2239, 3551, -1000, -1000, 248, -1000, 2075, 1911, - -1000, 510, -1000, 7398, -1000, -1000, 7398, -25, -1000, -1000, - -1000, -1000, 410, 5266, 5127, 159, 1747, -1000, -1000, -1000, - -1000, -1000, 373, 792, -1000, -1000, 5127, -1000, -1000, -1000, - 1583, -55, -1000, -1000, 706, -23, -1000, -1000, -1000, 1419, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 201, -1000, + -1000, -1000, -1000, 170, 6856, 6856, 96, 170, 543, 13, + -1000, 5206, 4500, 4446, -1000, -1000, -1000, 4392, -1000, 11, + -1000, 5206, 6856, 169, -1000, -1000, 928, -1000, -1000, -1000, + 520, 556, -1000, 687, 522, 685, -1000, 500, -1000, 5206, + 163, 3781, 6856, 6856, 6856, 203, -1000, -1000, 198, 5206, + -1000, 6856, 5649, 161, 333, 587, 3650, -1000, 197, 432, + 518, -1000, 542, -1000, -1000, 418, 2, -1000, 4338, 4284, + 2631, 6841, 3519, -1000, -1000, -1000, 4230, -29, 6856, -1000, + 5206, 333, 187, 154, -1000, -1000, -1000, 67, -1000, -1000, + 671, -1000, -1000, -1000, -1000, 6856, -1000, 5595, -1000, -1000, + 4176, -1000, -1000, 65, 4122, -1000, -1000, 518, 153, 6856, + -1000, -1000, -1000, 144, 6201, 5206, -1000, -1000, 687, 444, + 7, -1000, -1000, 687, 685, -1000, 330, -1000, -1000, -1000, + 4068, 324, 5206, -1000, 323, 318, 432, 5649, 317, -1000, + 140, 511, 333, 185, 6070, -1000, -1000, -1000, 638, 432, + 138, 8, -1000, 59, -1000, -1000, 693, -1000, -1000, -1000, + -1000, 417, 2, 4626, -1000, 542, 3912, 273, 316, -1000, + -1000, -1000, 6856, 5595, -1000, 6070, -29, -1000, -1000, 4014, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 3, -1000, + 687, 383, 685, -1000, 7, -1000, 2500, 315, 6856, 392, + -1000, 748, -1000, 134, -1000, 3257, 587, -1000, 6070, 63, + 2369, -1000, 183, 416, 133, 598, 432, 464, -1000, -1000, + 413, -1000, -1000, -1000, 677, 692, 542, 663, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, -1000, 4464, -1000, -1000, -1000, + -1000, 3024, 5595, 131, 382, 394, 379, 687, 3, -1000, + -1000, 377, 314, -1000, 130, -1000, 6856, 181, 384, 309, + 737, 598, -1000, -1000, -1000, 129, -1000, 128, -1000, 308, + 542, -1000, 255, 255, 175, -1000, 679, -1000, -1000, 4302, + -11, -1000, -27, 7005, -10, -20, -1000, -1000, 3024, -29, + -1000, -1000, -1000, -1000, 174, -1000, -1000, 3388, 3960, -1000, + -1000, -1000, -1000, -1000, 307, 255, 2238, 3257, -1000, -1000, + 81, -1000, 2107, 390, 432, 389, 135, -32, 4032, -1000, + -1000, 677, -1000, 6856, -18, -1000, -46, 7005, -1000, -1000, + 5472, 528, -1000, -1000, -1000, -1000, -1000, 3024, -1000, 388, + 305, -1000, 126, 542, -1000, -1000, -1000, -1000, -30, -1000, + -1000, 676, 6856, -1000, -1000, 5206, -1000, 7005, 6856, -1000, + -1000, 5370, -1000, 301, 299, 588, 620, 499, -1000, 484, + -1000, -1000, 1976, 3024, -1000, -1000, 387, -1000, 1845, 1714, + -1000, 135, -1000, 5206, -1000, -1000, 5206, 166, -1000, -1000, + -1000, -1000, 542, 7105, 7005, 276, 1583, -1000, -1000, -1000, + -1000, -1000, 432, 2, -1000, -1000, 7005, -1000, -1000, -1000, + 1452, 64, -1000, -1000, 255, 275, -1000, -1000, -1000, 1321, -1000, } var yyPgo = [...]int{ - 0, 923, 922, 51, 9, 921, 3, 919, 11, 24, - 81, 80, 46, 45, 918, 29, 916, 77, 70, 61, - 915, 0, 50, 911, 907, 15, 906, 905, 35, 237, - 38, 20, 904, 32, 902, 62, 54, 901, 10, 900, - 899, 898, 896, 13, 55, 895, 894, 100, 95, 199, - 893, 892, 891, 5, 889, 85, 41, 888, 141, 43, - 887, 885, 884, 881, 878, 79, 877, 874, 873, 871, - 12, 870, 868, 47, 40, 31, 2, 14, 743, 8, - 795, 25, 867, 866, 864, 37, 82, 599, 862, 121, - 861, 860, 856, 86, 855, 36, 854, 853, 30, 33, - 851, 850, 28, 849, 843, 592, 840, 18, 838, 837, - 39, 835, 78, 1, 4, 831, 17, 830, 44, 827, - 826, 823, 7, 821, 6, 820, 19, 16, + 0, 915, 911, 51, 9, 907, 3, 906, 11, 24, + 81, 80, 46, 45, 905, 29, 904, 77, 70, 61, + 902, 0, 50, 901, 900, 15, 899, 898, 35, 237, + 38, 20, 896, 32, 893, 62, 54, 892, 10, 891, + 889, 888, 887, 13, 55, 885, 884, 100, 95, 199, + 881, 878, 877, 5, 871, 85, 41, 870, 141, 43, + 868, 867, 866, 864, 862, 79, 861, 860, 853, 851, + 12, 850, 849, 47, 40, 31, 2, 14, 673, 8, + 702, 25, 843, 840, 838, 37, 82, 550, 837, 121, + 831, 827, 826, 86, 823, 36, 821, 820, 30, 33, + 813, 812, 28, 810, 808, 542, 807, 18, 805, 804, + 39, 801, 78, 1, 4, 800, 17, 798, 44, 797, + 795, 793, 7, 789, 6, 788, 19, 16, } var yyR1 = [...]int{ @@ -1527,100 +1458,100 @@ var yyR2 = [...]int{ } var yyChk = [...]int{ - -1000, -125, -112, -7, -9, -10, -11, -12, -13, 127, - 154, 120, 114, 161, -67, -68, 97, 96, 99, 106, - 110, 111, 115, 122, 76, 95, 90, -21, 124, 101, - 103, 163, 116, 119, 112, 86, 113, -123, 128, 129, - 130, -69, -71, -29, -34, -78, 83, -62, -63, -60, - 134, 69, 71, 58, 59, 49, 50, 55, 57, 164, - -45, -50, 60, 61, 62, 63, 64, 65, 66, 82, - 67, -52, 160, 13, 14, 16, 77, 78, -49, -59, - -54, -47, -57, -58, 70, 125, 126, 4, 5, 6, - 7, 8, 84, 85, 141, 142, 156, 138, 139, 140, - 155, 137, 149, 159, 88, 167, -8, -61, 135, 94, - -89, 157, 164, 157, -89, 161, 86, -16, -80, -105, - -89, 157, 113, 114, -17, -18, -93, -19, 86, -113, - 164, -9, 113, 154, 164, 164, -22, -21, 76, -22, - -22, -97, -35, -49, -101, 113, -36, 88, -94, -44, - -21, 163, 33, 34, 10, 12, 11, 35, 37, 36, - 51, 49, 50, 52, 68, 53, 54, 47, 48, 40, - 41, 38, 39, 43, 44, 45, 46, 42, 56, 30, - 32, 164, 164, 164, 161, -21, 86, 31, -3, 37, - 128, -78, 86, 86, 86, 73, 74, 73, 75, 74, - 17, 18, 19, 20, 29, 21, 22, 23, 24, 25, - 26, 27, 28, 58, 59, 164, 69, 161, 133, 164, - -110, -109, -73, -72, -21, 37, 134, -21, -29, -59, - 164, -58, 76, 69, -29, -21, -21, -21, -21, -21, - -21, -21, -21, -21, -21, -21, -21, -51, 164, -21, - -88, 93, -87, -65, 88, 151, 152, -21, -21, -21, - 69, 153, 153, -48, -46, -47, -64, 128, -8, -49, - 164, 164, -21, -21, 164, -21, -21, 93, 150, -87, - -87, 93, 161, -49, -85, 164, -85, 164, 157, -89, - 165, -89, 163, 161, -112, 163, -14, -105, -89, 157, - 163, 9, 157, 105, -89, -18, 163, 9, 17, -20, - 162, -9, -10, -11, -12, -13, 127, -21, 97, -3, - -95, -96, -21, -21, 163, 163, 163, 163, 9, 163, - 9, -3, 17, 163, 9, -21, -21, -21, -21, -21, + -1000, -125, -112, -7, -9, -10, -11, -12, -13, 51, + 79, 44, 38, 119, -67, -68, 21, 20, 23, 30, + 34, 35, 39, 46, 98, 19, 14, -21, 48, 25, + 27, 121, 40, 43, 36, 10, 37, -123, 52, 53, + 54, -69, -71, -29, -34, -78, 7, -62, -63, -60, + 59, 125, 92, 104, 105, 130, 129, 131, 132, 123, + -45, -50, 107, 108, 109, 110, 111, 112, 113, 6, + 133, -52, 118, 96, 97, 106, 99, 100, -49, -59, + -54, -47, -57, -58, 91, 49, 50, 4, 5, 84, + 85, 86, 8, 9, 66, 67, 81, 63, 64, 65, + 80, 62, 74, 117, 12, 134, -8, -61, 60, 18, + -89, 82, 123, 82, -89, 119, 10, -16, -80, -105, + -89, 82, 37, 38, -17, -18, -93, -19, 10, -113, + 123, -9, 37, 79, 123, 123, -22, -21, 98, -22, + -22, -97, -35, -49, -101, 37, -36, 12, -94, -44, + -21, 121, 149, 150, 87, 89, 88, 151, 128, 152, + 163, 130, 129, 164, 167, 165, 166, 161, 162, 155, + 156, 153, 154, 157, 158, 159, 160, 115, 90, 127, + 114, 123, 123, 123, 119, -21, 10, 122, -3, 128, + 52, -78, 10, 10, 10, 93, 94, 93, 95, 94, + 136, 137, 138, 139, 148, 140, 141, 142, 143, 144, + 145, 146, 147, 104, 105, 123, 125, 119, 57, 123, + -110, -109, -73, -72, -21, 128, 59, -21, -29, -59, + 123, -58, 98, 125, -29, -21, -21, -21, -21, -21, + -21, -21, -21, -21, -21, -21, -21, -51, 123, -21, + -88, 17, -87, -65, 12, 76, 77, -21, -21, -21, + 125, 78, 78, -48, -46, -47, -64, 52, -8, -49, + 123, 123, -21, -21, 123, -21, -21, 17, 75, -87, + -87, 17, 119, -49, -85, 123, -85, 123, 82, -89, + 124, -89, 121, 119, -112, 121, -14, -105, -89, 82, + 121, 135, 82, 29, -89, -18, 121, 135, 136, -20, + 120, -9, -10, -11, -12, -13, 51, -21, 21, -3, + -95, -96, -21, -21, 121, 121, 121, 121, 135, 121, + 135, -3, 136, 121, 135, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, - -21, -48, -21, 31, -21, -104, -28, -29, -21, -93, - -113, 163, 163, 86, -124, 86, -30, 131, -124, -117, - 131, 164, -9, 164, 163, 31, -21, 37, -21, -21, + -21, -48, -21, 122, -21, -104, -28, -29, -21, -93, + -113, 121, 121, 10, -124, 10, -30, 55, -124, -117, + 55, 123, -9, 123, 121, 122, -21, 128, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, - -21, -22, -21, -56, 86, 161, -49, -110, 166, 9, - 15, -29, 164, -21, -110, 165, -22, 160, -65, -65, - 93, 69, 133, -21, 87, -29, 15, -22, -55, -6, - -49, 161, 86, -5, -4, 76, 77, 78, 79, 80, - 81, 4, 5, 6, 7, 8, 10, 11, 12, 56, - 70, 71, 82, 83, 73, 74, 75, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 104, 105, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, 126, 111, - 112, 113, 114, 115, 13, 14, 134, 106, 107, 108, - 109, 110, 135, 136, 131, 132, 154, 129, 130, 128, - 137, 138, 140, 139, 141, 142, 156, 155, -55, -6, - -49, -86, -85, 153, 69, 161, 133, 153, -86, -108, - -74, -21, -21, -21, 150, 150, 159, -21, 165, -111, - -33, -21, 158, -110, 86, 163, -112, 162, 163, 163, - 157, -89, -17, 157, -89, 161, 86, 157, -19, -21, - 164, 165, 164, 163, 9, 165, -35, -36, -124, -21, - -44, 31, -21, -126, 9, 105, 165, 162, -124, 164, - -30, -118, 132, -8, 161, -124, -122, -8, -21, -21, - -113, -21, 165, 166, 162, -85, -21, 165, 17, -73, - -21, 37, 134, -110, 165, 166, 165, -66, 86, 89, - 50, 88, 86, 162, 162, 69, 162, -21, 166, -85, - -21, -85, -49, -22, -21, -56, -49, -30, -126, 9, - 165, 165, 162, -126, 9, -21, 165, 162, 161, 157, - -99, -15, -18, -80, 161, -124, 165, -23, -9, 31, - -21, -95, -21, -83, 161, 31, 164, -21, 165, -28, - -81, -29, 37, 134, 69, -26, -9, 31, -91, 164, - -114, -115, -31, -32, -77, -75, 30, 135, 136, -8, - -118, -124, -122, -116, 161, 9, 165, 165, 75, -9, - 31, 162, 17, -21, -29, 164, 165, 166, 89, -21, - 162, 166, 162, -118, 165, -74, 165, -33, -98, -18, - 161, -126, 9, -18, -99, 163, -113, 165, 163, -102, - 163, -102, 163, -114, 163, 165, 15, -29, 164, -110, - -113, -27, 117, 118, -114, 165, 9, -1, 37, -75, - -124, 161, 162, -37, -120, -119, 120, -121, 123, -79, - 81, 80, 79, 76, 77, 78, -116, -8, -9, 31, - 163, -113, -21, -110, 166, -124, -126, 9, -98, 162, - -15, -126, 98, 163, -95, 162, 108, 109, -102, 107, - -102, 165, -25, -9, 31, -81, -29, -110, 166, 104, - 164, 161, 165, -107, 120, -31, -2, 158, 161, -116, - -100, -43, 88, 114, 113, -122, -79, 162, -113, 165, - 162, 161, 162, -18, -126, 162, 163, 165, -21, -127, - 31, 163, 162, 163, 107, -107, -113, 165, 165, 163, - -90, -8, -113, -76, 31, -76, 164, 88, -116, 162, - 163, 9, -124, 17, -92, -70, -6, -3, -84, 163, - 161, -116, 162, -24, -9, 31, -127, -113, 163, -76, - 102, -25, 88, 35, 162, 161, -77, 161, -106, -53, - 88, 37, 17, 162, -43, -21, 163, 9, 17, -6, - 162, -103, -38, -39, -40, -41, -42, -8, -6, 154, - 86, 162, -113, -113, 161, 163, 165, -8, -113, -113, - 165, 9, 88, -21, -124, -70, -21, -124, 162, -38, - 163, 163, 121, 105, 153, 100, -113, 161, 162, 162, - -53, -124, 164, -122, 86, -4, -79, -6, 163, 162, - -113, -114, -6, 162, 165, -76, -82, 163, 161, -113, - 162, + -21, -22, -21, -56, 10, 119, -49, -110, 126, 135, + 58, -29, 123, -21, -110, 124, -22, 118, -65, -65, + 17, 125, 57, -21, 11, -29, 58, -22, -55, -6, + -49, 119, 10, -5, -4, 98, 99, 100, 101, 102, + 103, 4, 5, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 6, 7, 93, 94, 95, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 35, + 36, 37, 38, 39, 96, 97, 59, 30, 31, 32, + 33, 34, 60, 61, 55, 56, 79, 53, 54, 52, + 62, 63, 65, 64, 66, 67, 81, 80, -55, -6, + -49, -86, -85, 78, 125, 119, 57, 78, -86, -108, + -74, -21, -21, -21, 75, 75, 117, -21, 124, -111, + -33, -21, 83, -110, 10, 121, -112, 120, 121, 121, + 82, -89, -17, 82, -89, 119, 10, 82, -19, -21, + 123, 124, 123, 121, 135, 124, -35, -36, -124, -21, + -44, 122, -21, -126, 135, 29, 124, 120, -124, 123, + -30, -118, 56, -8, 119, -124, -122, -8, -21, -21, + -113, -21, 124, 126, 120, -85, -21, 124, 136, -73, + -21, 128, 59, -110, 124, 126, 124, -66, 10, 13, + 129, 12, 10, 120, 120, 125, 120, -21, 126, -85, + -21, -85, -49, -22, -21, -56, -49, -30, -126, 135, + 124, 124, 120, -126, 135, -21, 124, 120, 119, 82, + -99, -15, -18, -80, 119, -124, 124, -23, -9, 122, + -21, -95, -21, -83, 119, 122, 123, -21, 124, -28, + -81, -29, 128, 59, 125, -26, -9, 122, -91, 123, + -114, -115, -31, -32, -77, -75, 127, 60, 61, -8, + -118, -124, -122, -116, 119, 135, 124, 124, 95, -9, + 122, 120, 136, -21, -29, 123, 124, 126, 13, -21, + 120, 126, 120, -118, 124, -74, 124, -33, -98, -18, + 119, -126, 135, -18, -99, 121, -113, 124, 121, -102, + 121, -102, 121, -114, 121, 124, 58, -29, 123, -110, + -113, -27, 41, 42, -114, 124, 135, -1, 128, -75, + -124, 119, 120, -37, -120, -119, 44, -121, 47, -79, + 103, 102, 101, 98, 99, 100, -116, -8, -9, 122, + 121, -113, -21, -110, 126, -124, -126, 135, -98, 120, + -15, -126, 22, 121, -95, 120, 32, 33, -102, 31, + -102, 124, -25, -9, 122, -81, -29, -110, 126, 28, + 123, 119, 124, -107, 44, -31, -2, 83, 119, -116, + -100, -43, 12, 38, 37, -122, -79, 120, -113, 124, + 120, 119, 120, -18, -126, 120, 121, 124, -21, -127, + 122, 121, 120, 121, 31, -107, -113, 124, 124, 121, + -90, -8, -113, -76, 122, -76, 123, 12, -116, 120, + 121, 135, -124, 136, -92, -70, -6, -3, -84, 121, + 119, -116, 120, -24, -9, 122, -127, -113, 121, -76, + 26, -25, 12, 151, 120, 119, -77, 119, -106, -53, + 12, 128, 136, 120, -43, -21, 121, 135, 136, -6, + 120, -103, -38, -39, -40, -41, -42, -8, -6, 79, + 10, 120, -113, -113, 119, 121, 124, -8, -113, -113, + 124, 135, 12, -21, -124, -70, -21, -124, 120, -38, + 121, 121, 45, 29, 78, 24, -113, 119, 120, 120, + -53, -124, 123, -122, 10, -4, -79, -6, 121, 120, + -113, -114, -6, 120, 124, -76, -82, 121, 119, -113, + 120, } var yyDef = [...]int{ @@ -1724,33 +1655,33 @@ var yyTok1 = [...]int{ 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 55, 159, 3, 167, 54, 37, 3, - 164, 165, 52, 49, 9, 50, 51, 53, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 31, 163, - 43, 17, 45, 30, 67, 3, 3, 3, 3, 3, + 3, 3, 3, 131, 117, 3, 134, 166, 128, 3, + 123, 124, 164, 130, 135, 129, 163, 165, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 122, 121, + 157, 136, 159, 127, 133, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 69, 3, 166, 36, 3, 160, 3, 3, 3, + 3, 125, 3, 126, 152, 3, 118, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 161, 35, 162, 57, + 3, 3, 3, 119, 151, 120, 132, } var yyTok2 = [...]int{ - 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, - 13, 14, 15, 16, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 32, 33, 34, 38, - 39, 40, 41, 42, 44, 46, 47, 48, 56, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 68, 70, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 151, 152, 153, 154, 155, 156, 157, 158, + 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, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 153, + 154, 155, 156, 158, 160, 161, 162, 167, } var yyTok3 = [...]int{ 0, @@ -2095,482 +2026,482 @@ yydefault: case 1: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:294 + //line php7/php7.y:254 { rootnode = stmt.NewStmtList(yyDollar[1].list) positions.AddPosition(rootnode, positionBuilder.NewNodeListPosition(yyDollar[1].list)) } case 2: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:301 + //line php7/php7.y:261 { yyVAL.token = yyDollar[1].token } case 3: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:301 + //line php7/php7.y:261 { yyVAL.token = yyDollar[1].token } case 4: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:301 + //line php7/php7.y:261 { yyVAL.token = yyDollar[1].token } case 5: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:301 + //line php7/php7.y:261 { yyVAL.token = yyDollar[1].token } case 6: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:301 + //line php7/php7.y:261 { yyVAL.token = yyDollar[1].token } case 7: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:301 + //line php7/php7.y:261 { yyVAL.token = yyDollar[1].token } case 8: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:301 + //line php7/php7.y:261 { yyVAL.token = yyDollar[1].token } case 9: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:301 + //line php7/php7.y:261 { yyVAL.token = yyDollar[1].token } case 10: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:302 + //line php7/php7.y:262 { yyVAL.token = yyDollar[1].token } case 11: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:302 + //line php7/php7.y:262 { yyVAL.token = yyDollar[1].token } case 12: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:302 + //line php7/php7.y:262 { yyVAL.token = yyDollar[1].token } case 13: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:302 + //line php7/php7.y:262 { yyVAL.token = yyDollar[1].token } case 14: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:302 + //line php7/php7.y:262 { yyVAL.token = yyDollar[1].token } case 15: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:302 + //line php7/php7.y:262 { yyVAL.token = yyDollar[1].token } case 16: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:302 + //line php7/php7.y:262 { yyVAL.token = yyDollar[1].token } case 17: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:302 + //line php7/php7.y:262 { yyVAL.token = yyDollar[1].token } case 18: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:302 + //line php7/php7.y:262 { yyVAL.token = yyDollar[1].token } case 19: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:302 + //line php7/php7.y:262 { yyVAL.token = yyDollar[1].token } case 20: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:302 + //line php7/php7.y:262 { yyVAL.token = yyDollar[1].token } case 21: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:302 + //line php7/php7.y:262 { yyVAL.token = yyDollar[1].token } case 22: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:303 + //line php7/php7.y:263 { yyVAL.token = yyDollar[1].token } case 23: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:303 + //line php7/php7.y:263 { yyVAL.token = yyDollar[1].token } case 24: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:303 + //line php7/php7.y:263 { yyVAL.token = yyDollar[1].token } case 25: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:303 + //line php7/php7.y:263 { yyVAL.token = yyDollar[1].token } case 26: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:303 + //line php7/php7.y:263 { yyVAL.token = yyDollar[1].token } case 27: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:303 + //line php7/php7.y:263 { yyVAL.token = yyDollar[1].token } case 28: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:303 + //line php7/php7.y:263 { yyVAL.token = yyDollar[1].token } case 29: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:303 + //line php7/php7.y:263 { yyVAL.token = yyDollar[1].token } case 30: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:303 + //line php7/php7.y:263 { yyVAL.token = yyDollar[1].token } case 31: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:303 + //line php7/php7.y:263 { yyVAL.token = yyDollar[1].token } case 32: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:304 + //line php7/php7.y:264 { yyVAL.token = yyDollar[1].token } case 33: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:304 + //line php7/php7.y:264 { yyVAL.token = yyDollar[1].token } case 34: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:304 + //line php7/php7.y:264 { yyVAL.token = yyDollar[1].token } case 35: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:304 + //line php7/php7.y:264 { yyVAL.token = yyDollar[1].token } case 36: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:304 + //line php7/php7.y:264 { yyVAL.token = yyDollar[1].token } case 37: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:304 + //line php7/php7.y:264 { yyVAL.token = yyDollar[1].token } case 38: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:304 + //line php7/php7.y:264 { yyVAL.token = yyDollar[1].token } case 39: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:304 + //line php7/php7.y:264 { yyVAL.token = yyDollar[1].token } case 40: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:304 + //line php7/php7.y:264 { yyVAL.token = yyDollar[1].token } case 41: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:304 + //line php7/php7.y:264 { yyVAL.token = yyDollar[1].token } case 42: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:305 + //line php7/php7.y:265 { yyVAL.token = yyDollar[1].token } case 43: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:305 + //line php7/php7.y:265 { yyVAL.token = yyDollar[1].token } case 44: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:305 + //line php7/php7.y:265 { yyVAL.token = yyDollar[1].token } case 45: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:305 + //line php7/php7.y:265 { yyVAL.token = yyDollar[1].token } case 46: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:305 + //line php7/php7.y:265 { yyVAL.token = yyDollar[1].token } case 47: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:305 + //line php7/php7.y:265 { yyVAL.token = yyDollar[1].token } case 48: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:305 + //line php7/php7.y:265 { yyVAL.token = yyDollar[1].token } case 49: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:305 + //line php7/php7.y:265 { yyVAL.token = yyDollar[1].token } case 50: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:305 + //line php7/php7.y:265 { yyVAL.token = yyDollar[1].token } case 51: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:305 + //line php7/php7.y:265 { yyVAL.token = yyDollar[1].token } case 52: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:305 + //line php7/php7.y:265 { yyVAL.token = yyDollar[1].token } case 53: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:306 + //line php7/php7.y:266 { yyVAL.token = yyDollar[1].token } case 54: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:306 + //line php7/php7.y:266 { yyVAL.token = yyDollar[1].token } case 55: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:306 + //line php7/php7.y:266 { yyVAL.token = yyDollar[1].token } case 56: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:306 + //line php7/php7.y:266 { yyVAL.token = yyDollar[1].token } case 57: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:306 + //line php7/php7.y:266 { yyVAL.token = yyDollar[1].token } case 58: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:306 + //line php7/php7.y:266 { yyVAL.token = yyDollar[1].token } case 59: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:306 + //line php7/php7.y:266 { yyVAL.token = yyDollar[1].token } case 60: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:306 + //line php7/php7.y:266 { yyVAL.token = yyDollar[1].token } case 61: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:307 + //line php7/php7.y:267 { yyVAL.token = yyDollar[1].token } case 62: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:307 + //line php7/php7.y:267 { yyVAL.token = yyDollar[1].token } case 63: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:307 + //line php7/php7.y:267 { yyVAL.token = yyDollar[1].token } case 64: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:307 + //line php7/php7.y:267 { yyVAL.token = yyDollar[1].token } case 65: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:307 + //line php7/php7.y:267 { yyVAL.token = yyDollar[1].token } case 66: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:307 + //line php7/php7.y:267 { yyVAL.token = yyDollar[1].token } case 67: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:307 + //line php7/php7.y:267 { yyVAL.token = yyDollar[1].token } case 68: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:307 + //line php7/php7.y:267 { yyVAL.token = yyDollar[1].token } case 69: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:311 + //line php7/php7.y:271 { yyVAL.token = yyDollar[1].token } case 70: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:312 + //line php7/php7.y:272 { yyVAL.token = yyDollar[1].token } case 71: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:312 + //line php7/php7.y:272 { yyVAL.token = yyDollar[1].token } case 72: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:312 + //line php7/php7.y:272 { yyVAL.token = yyDollar[1].token } case 73: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:312 + //line php7/php7.y:272 { yyVAL.token = yyDollar[1].token } case 74: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:312 + //line php7/php7.y:272 { yyVAL.token = yyDollar[1].token } case 75: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:312 + //line php7/php7.y:272 { yyVAL.token = yyDollar[1].token } case 76: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:316 + //line php7/php7.y:276 { yyVAL.token = yyDollar[1].token } case 77: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:317 + //line php7/php7.y:277 { yyVAL.token = yyDollar[1].token } case 78: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:321 + //line php7/php7.y:281 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 79: yyDollar = yyS[yypt-0 : yypt+1] - //line parser/php7.y:322 + //line php7/php7.y:282 { yyVAL.list = []node.Node{} } case 80: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:327 + //line php7/php7.y:287 { namePart := name.NewNamePart(yyDollar[1].token.Value) positions.AddPosition(namePart, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -2579,7 +2510,7 @@ yydefault: } case 81: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:334 + //line php7/php7.y:294 { namePart := name.NewNamePart(yyDollar[3].token.Value) positions.AddPosition(namePart, positionBuilder.NewTokenPosition(yyDollar[3].token)) @@ -2588,7 +2519,7 @@ yydefault: } case 82: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:344 + //line php7/php7.y:304 { yyVAL.node = name.NewName(yyDollar[1].list) positions.AddPosition(yyVAL.node, positionBuilder.NewNodeListPosition(yyDollar[1].list)) @@ -2596,7 +2527,7 @@ yydefault: } case 83: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:350 + //line php7/php7.y:310 { yyVAL.node = name.NewRelative(yyDollar[3].list) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[3].list)) @@ -2604,7 +2535,7 @@ yydefault: } case 84: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:356 + //line php7/php7.y:316 { yyVAL.node = name.NewFullyQualified(yyDollar[2].list) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[2].list)) @@ -2612,43 +2543,43 @@ yydefault: } case 85: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:364 + //line php7/php7.y:324 { yyVAL.node = yyDollar[1].node } case 86: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:365 + //line php7/php7.y:325 { yyVAL.node = yyDollar[1].node } case 87: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:366 + //line php7/php7.y:326 { yyVAL.node = yyDollar[1].node } case 88: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:367 + //line php7/php7.y:327 { yyVAL.node = yyDollar[1].node } case 89: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:368 + //line php7/php7.y:328 { yyVAL.node = yyDollar[1].node } case 90: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:369 + //line php7/php7.y:329 { yyVAL.node = stmt.NewHaltCompiler() } case 91: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:371 + //line php7/php7.y:331 { name := name.NewName(yyDollar[2].list) positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[2].list)) @@ -2660,7 +2591,7 @@ yydefault: } case 92: yyDollar = yyS[yypt-5 : yypt+1] - //line parser/php7.y:381 + //line php7/php7.y:341 { name := name.NewName(yyDollar[2].list) positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[2].list)) @@ -2672,7 +2603,7 @@ yydefault: } case 93: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:391 + //line php7/php7.y:351 { yyVAL.node = stmt.NewNamespace(nil, yyDollar[3].list) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) @@ -2680,19 +2611,19 @@ yydefault: } case 94: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:396 + //line php7/php7.y:356 { yyVAL.node = yyDollar[2].node } case 95: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:397 + //line php7/php7.y:357 { yyVAL.node = yyDollar[3].node.(*stmt.GroupUse).SetUseType(yyDollar[2].node) } case 96: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:399 + //line php7/php7.y:359 { yyVAL.node = stmt.NewUseList(nil, yyDollar[2].list) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) @@ -2700,13 +2631,13 @@ yydefault: } case 97: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:404 + //line php7/php7.y:364 { yyVAL.node = stmt.NewUseList(yyDollar[2].node, yyDollar[3].list) } case 98: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:406 + //line php7/php7.y:366 { yyVAL.node = stmt.NewConstList(yyDollar[2].list) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) @@ -2714,7 +2645,7 @@ yydefault: } case 99: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:415 + //line php7/php7.y:375 { yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -2722,7 +2653,7 @@ yydefault: } case 100: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:421 + //line php7/php7.y:381 { yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -2730,7 +2661,7 @@ yydefault: } case 101: yyDollar = yyS[yypt-6 : yypt+1] - //line parser/php7.y:430 + //line php7/php7.y:390 { name := name.NewName(yyDollar[1].list) positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[1].list)) @@ -2742,7 +2673,7 @@ yydefault: } case 102: yyDollar = yyS[yypt-7 : yypt+1] - //line parser/php7.y:440 + //line php7/php7.y:400 { name := name.NewName(yyDollar[2].list) positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[2].list)) @@ -2754,7 +2685,7 @@ yydefault: } case 103: yyDollar = yyS[yypt-6 : yypt+1] - //line parser/php7.y:453 + //line php7/php7.y:413 { name := name.NewName(yyDollar[1].list) positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[1].list)) @@ -2766,7 +2697,7 @@ yydefault: } case 104: yyDollar = yyS[yypt-7 : yypt+1] - //line parser/php7.y:463 + //line php7/php7.y:423 { name := name.NewName(yyDollar[2].list) positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[2].list)) @@ -2778,55 +2709,55 @@ yydefault: } case 107: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:481 + //line php7/php7.y:441 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 108: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:482 + //line php7/php7.y:442 { yyVAL.list = []node.Node{yyDollar[1].node} } case 109: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:487 + //line php7/php7.y:447 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 110: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:488 + //line php7/php7.y:448 { yyVAL.list = []node.Node{yyDollar[1].node} } case 111: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:492 + //line php7/php7.y:452 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 112: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:493 + //line php7/php7.y:453 { yyVAL.list = []node.Node{yyDollar[1].node} } case 113: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:497 + //line php7/php7.y:457 { yyVAL.node = yyDollar[1].node } case 114: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:498 + //line php7/php7.y:458 { yyVAL.node = yyDollar[2].node.(*stmt.Use).SetUseType(yyDollar[1].node) } case 115: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:503 + //line php7/php7.y:463 { name := name.NewName(yyDollar[1].list) positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[1].list)) @@ -2838,7 +2769,7 @@ yydefault: } case 116: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:513 + //line php7/php7.y:473 { name := name.NewName(yyDollar[1].list) positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[1].list)) @@ -2853,73 +2784,73 @@ yydefault: } case 117: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:528 + //line php7/php7.y:488 { yyVAL.node = yyDollar[1].node } case 118: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:529 + //line php7/php7.y:489 { yyVAL.node = yyDollar[2].node } case 119: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:533 + //line php7/php7.y:493 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 120: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:534 + //line php7/php7.y:494 { yyVAL.list = []node.Node{yyDollar[1].node} } case 121: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:538 + //line php7/php7.y:498 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 122: yyDollar = yyS[yypt-0 : yypt+1] - //line parser/php7.y:539 + //line php7/php7.y:499 { yyVAL.list = []node.Node{} } case 123: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:543 + //line php7/php7.y:503 { yyVAL.node = yyDollar[1].node } case 124: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:544 + //line php7/php7.y:504 { yyVAL.node = yyDollar[1].node } case 125: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:545 + //line php7/php7.y:505 { yyVAL.node = yyDollar[1].node } case 126: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:546 + //line php7/php7.y:506 { yyVAL.node = yyDollar[1].node } case 127: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:547 + //line php7/php7.y:507 { yyVAL.node = yyDollar[1].node } case 128: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:549 + //line php7/php7.y:509 { yyVAL.node = stmt.NewHaltCompiler() positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) @@ -2927,7 +2858,7 @@ yydefault: } case 129: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:557 + //line php7/php7.y:517 { yyVAL.node = stmt.NewStmtList(yyDollar[2].list) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) @@ -2935,19 +2866,19 @@ yydefault: } case 130: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:562 + //line php7/php7.y:522 { yyVAL.node = yyDollar[1].node } case 131: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:563 + //line php7/php7.y:523 { yyVAL.node = yyDollar[1].node } case 132: yyDollar = yyS[yypt-5 : yypt+1] - //line parser/php7.y:565 + //line php7/php7.y:525 { yyVAL.node = stmt.NewWhile(yyDollar[1].token, yyDollar[3].node, yyDollar[5].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[5].node)) @@ -2955,7 +2886,7 @@ yydefault: } case 133: yyDollar = yyS[yypt-7 : yypt+1] - //line parser/php7.y:571 + //line php7/php7.y:531 { yyVAL.node = stmt.NewDo(yyDollar[2].node, yyDollar[5].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[7].token)) @@ -2963,7 +2894,7 @@ yydefault: } case 134: yyDollar = yyS[yypt-9 : yypt+1] - //line parser/php7.y:577 + //line php7/php7.y:537 { yyVAL.node = stmt.NewFor(yyDollar[3].list, yyDollar[5].list, yyDollar[7].list, yyDollar[9].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[9].node)) @@ -2971,7 +2902,7 @@ yydefault: } case 135: yyDollar = yyS[yypt-5 : yypt+1] - //line parser/php7.y:583 + //line php7/php7.y:543 { yyVAL.node = stmt.NewSwitch(yyDollar[1].token, yyDollar[3].node, yyDollar[5].nodesWithEndToken.nodes) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[5].nodesWithEndToken.endToken)) @@ -2979,7 +2910,7 @@ yydefault: } case 136: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:589 + //line php7/php7.y:549 { yyVAL.node = stmt.NewBreak(yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) @@ -2987,7 +2918,7 @@ yydefault: } case 137: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:595 + //line php7/php7.y:555 { yyVAL.node = stmt.NewContinue(yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) @@ -2995,7 +2926,7 @@ yydefault: } case 138: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:601 + //line php7/php7.y:561 { yyVAL.node = stmt.NewReturn(yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) @@ -3003,7 +2934,7 @@ yydefault: } case 139: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:607 + //line php7/php7.y:567 { yyVAL.node = stmt.NewGlobal(yyDollar[2].list) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) @@ -3011,7 +2942,7 @@ yydefault: } case 140: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:613 + //line php7/php7.y:573 { yyVAL.node = stmt.NewStatic(yyDollar[2].list) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) @@ -3019,7 +2950,7 @@ yydefault: } case 141: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:619 + //line php7/php7.y:579 { yyVAL.node = stmt.NewEcho(yyDollar[2].list) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) @@ -3027,7 +2958,7 @@ yydefault: } case 142: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:625 + //line php7/php7.y:585 { yyVAL.node = stmt.NewInlineHtml(yyDollar[1].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -3035,7 +2966,7 @@ yydefault: } case 143: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:631 + //line php7/php7.y:591 { yyVAL.node = stmt.NewExpression(yyDollar[1].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token)) @@ -3043,7 +2974,7 @@ yydefault: } case 144: yyDollar = yyS[yypt-6 : yypt+1] - //line parser/php7.y:637 + //line php7/php7.y:597 { yyVAL.node = stmt.NewUnset(yyDollar[3].list) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[6].token)) @@ -3051,7 +2982,7 @@ yydefault: } case 145: yyDollar = yyS[yypt-7 : yypt+1] - //line parser/php7.y:643 + //line php7/php7.y:603 { yyVAL.node = stmt.NewForeach(yyDollar[3].node, nil, yyDollar[5].foreachVariable.node, yyDollar[7].node, yyDollar[5].foreachVariable.byRef) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[7].node)) @@ -3059,7 +2990,7 @@ yydefault: } case 146: yyDollar = yyS[yypt-9 : yypt+1] - //line parser/php7.y:649 + //line php7/php7.y:609 { yyVAL.node = stmt.NewForeach(yyDollar[3].node, yyDollar[5].node, yyDollar[7].foreachVariable.node, yyDollar[9].node, yyDollar[7].foreachVariable.byRef) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[9].node)) @@ -3067,7 +2998,7 @@ yydefault: } case 147: yyDollar = yyS[yypt-5 : yypt+1] - //line parser/php7.y:655 + //line php7/php7.y:615 { yyVAL.node = stmt.NewDeclare(yyDollar[3].list, yyDollar[5].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[5].node)) @@ -3075,7 +3006,7 @@ yydefault: } case 148: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:661 + //line php7/php7.y:621 { yyVAL.node = stmt.NewNop() positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -3083,7 +3014,7 @@ yydefault: } case 149: yyDollar = yyS[yypt-6 : yypt+1] - //line parser/php7.y:667 + //line php7/php7.y:627 { if yyDollar[6].node == nil { yyVAL.node = stmt.NewTry(yyDollar[3].list, yyDollar[5].list, yyDollar[6].node) @@ -3097,7 +3028,7 @@ yydefault: } case 150: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:679 + //line php7/php7.y:639 { yyVAL.node = stmt.NewThrow(yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) @@ -3105,7 +3036,7 @@ yydefault: } case 151: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:685 + //line php7/php7.y:645 { label := node.NewIdentifier(yyDollar[2].token.Value) positions.AddPosition(label, positionBuilder.NewTokenPosition(yyDollar[2].token)) @@ -3117,7 +3048,7 @@ yydefault: } case 152: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:695 + //line php7/php7.y:655 { label := node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(label, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -3129,13 +3060,13 @@ yydefault: } case 153: yyDollar = yyS[yypt-0 : yypt+1] - //line parser/php7.y:706 + //line php7/php7.y:666 { yyVAL.list = []node.Node{} } case 154: yyDollar = yyS[yypt-9 : yypt+1] - //line parser/php7.y:708 + //line php7/php7.y:668 { identifier := node.NewIdentifier(yyDollar[5].token.Value) positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[5].token)) @@ -3151,25 +3082,25 @@ yydefault: } case 155: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:723 + //line php7/php7.y:683 { yyVAL.list = []node.Node{yyDollar[1].node} } case 156: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:724 + //line php7/php7.y:684 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 157: yyDollar = yyS[yypt-0 : yypt+1] - //line parser/php7.y:728 + //line php7/php7.y:688 { yyVAL.node = nil } case 158: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:730 + //line php7/php7.y:690 { yyVAL.node = stmt.NewFinally(yyDollar[3].list) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) @@ -3177,25 +3108,25 @@ yydefault: } case 159: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:738 + //line php7/php7.y:698 { yyVAL.list = []node.Node{yyDollar[1].node} } case 160: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:739 + //line php7/php7.y:699 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 161: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:743 + //line php7/php7.y:703 { yyVAL.node = yyDollar[1].node } case 162: yyDollar = yyS[yypt-11 : yypt+1] - //line parser/php7.y:748 + //line php7/php7.y:708 { name := node.NewIdentifier(yyDollar[3].token.Value) positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[3].token)) @@ -3207,31 +3138,31 @@ yydefault: } case 163: yyDollar = yyS[yypt-0 : yypt+1] - //line parser/php7.y:760 + //line php7/php7.y:720 { yyVAL.boolWithToken = boolWithToken{false, nil} } case 164: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:761 + //line php7/php7.y:721 { yyVAL.boolWithToken = boolWithToken{true, &yyDollar[1].token} } case 165: yyDollar = yyS[yypt-0 : yypt+1] - //line parser/php7.y:765 + //line php7/php7.y:725 { yyVAL.boolWithToken = boolWithToken{false, nil} } case 166: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:766 + //line php7/php7.y:726 { yyVAL.boolWithToken = boolWithToken{true, &yyDollar[1].token} } case 167: yyDollar = yyS[yypt-9 : yypt+1] - //line parser/php7.y:771 + //line php7/php7.y:731 { name := node.NewIdentifier(yyDollar[3].token.Value) positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[3].token)) @@ -3243,7 +3174,7 @@ yydefault: } case 168: yyDollar = yyS[yypt-8 : yypt+1] - //line parser/php7.y:781 + //line php7/php7.y:741 { name := node.NewIdentifier(yyDollar[2].token.Value) positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[2].token)) @@ -3255,19 +3186,19 @@ yydefault: } case 169: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:793 + //line php7/php7.y:753 { yyVAL.list = []node.Node{yyDollar[1].node} } case 170: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:794 + //line php7/php7.y:754 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 171: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:799 + //line php7/php7.y:759 { yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -3275,7 +3206,7 @@ yydefault: } case 172: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:805 + //line php7/php7.y:765 { yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -3283,7 +3214,7 @@ yydefault: } case 173: yyDollar = yyS[yypt-6 : yypt+1] - //line parser/php7.y:814 + //line php7/php7.y:774 { name := node.NewIdentifier(yyDollar[2].token.Value) positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[2].token)) @@ -3295,7 +3226,7 @@ yydefault: } case 174: yyDollar = yyS[yypt-7 : yypt+1] - //line parser/php7.y:827 + //line php7/php7.y:787 { name := node.NewIdentifier(yyDollar[2].token.Value) positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[2].token)) @@ -3307,55 +3238,55 @@ yydefault: } case 175: yyDollar = yyS[yypt-0 : yypt+1] - //line parser/php7.y:839 + //line php7/php7.y:799 { yyVAL.node = nil } case 176: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:840 + //line php7/php7.y:800 { yyVAL.node = yyDollar[2].node } case 177: yyDollar = yyS[yypt-0 : yypt+1] - //line parser/php7.y:844 + //line php7/php7.y:804 { yyVAL.list = nil } case 178: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:845 + //line php7/php7.y:805 { yyVAL.list = yyDollar[2].list } case 179: yyDollar = yyS[yypt-0 : yypt+1] - //line parser/php7.y:849 + //line php7/php7.y:809 { yyVAL.list = nil } case 180: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:850 + //line php7/php7.y:810 { yyVAL.list = yyDollar[2].list } case 181: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:854 + //line php7/php7.y:814 { yyVAL.foreachVariable = foreachVariable{yyDollar[1].node, false} } case 182: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:855 + //line php7/php7.y:815 { yyVAL.foreachVariable = foreachVariable{yyDollar[2].node, true} } case 183: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:857 + //line php7/php7.y:817 { list := expr.NewList(yyDollar[3].list) positions.AddPosition(list, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) @@ -3364,7 +3295,7 @@ yydefault: } case 184: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:864 + //line php7/php7.y:824 { list := expr.NewShortList(yyDollar[2].list) positions.AddPosition(list, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) @@ -3373,13 +3304,13 @@ yydefault: } case 185: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:873 + //line php7/php7.y:833 { yyVAL.node = yyDollar[1].node } case 186: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:875 + //line php7/php7.y:835 { yyVAL.node = stmt.NewStmtList(yyDollar[2].list) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) @@ -3387,13 +3318,13 @@ yydefault: } case 187: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:883 + //line php7/php7.y:843 { yyVAL.node = yyDollar[1].node } case 188: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:885 + //line php7/php7.y:845 { yyVAL.node = stmt.NewStmtList(yyDollar[2].list) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) @@ -3401,13 +3332,13 @@ yydefault: } case 189: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:893 + //line php7/php7.y:853 { yyVAL.node = yyDollar[1].node } case 190: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:895 + //line php7/php7.y:855 { yyVAL.node = stmt.NewStmtList(yyDollar[2].list) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) @@ -3415,37 +3346,37 @@ yydefault: } case 191: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:903 + //line php7/php7.y:863 { yyVAL.nodesWithEndToken = &nodesWithEndToken{yyDollar[2].list, yyDollar[3].token} } case 192: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:904 + //line php7/php7.y:864 { yyVAL.nodesWithEndToken = &nodesWithEndToken{yyDollar[3].list, yyDollar[4].token} } case 193: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:905 + //line php7/php7.y:865 { yyVAL.nodesWithEndToken = &nodesWithEndToken{yyDollar[2].list, yyDollar[4].token} } case 194: yyDollar = yyS[yypt-5 : yypt+1] - //line parser/php7.y:906 + //line php7/php7.y:866 { yyVAL.nodesWithEndToken = &nodesWithEndToken{yyDollar[3].list, yyDollar[5].token} } case 195: yyDollar = yyS[yypt-0 : yypt+1] - //line parser/php7.y:910 + //line php7/php7.y:870 { yyVAL.list = []node.Node{} } case 196: yyDollar = yyS[yypt-5 : yypt+1] - //line parser/php7.y:912 + //line php7/php7.y:872 { _case := stmt.NewCase(yyDollar[3].node, yyDollar[5].list) positions.AddPosition(_case, positionBuilder.NewTokenNodeListPosition(yyDollar[2].token, yyDollar[5].list)) @@ -3454,7 +3385,7 @@ yydefault: } case 197: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:919 + //line php7/php7.y:879 { _default := stmt.NewDefault(yyDollar[4].list) positions.AddPosition(_default, positionBuilder.NewTokenNodeListPosition(yyDollar[2].token, yyDollar[4].list)) @@ -3463,13 +3394,13 @@ yydefault: } case 200: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:933 + //line php7/php7.y:893 { yyVAL.node = yyDollar[1].node } case 201: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:935 + //line php7/php7.y:895 { yyVAL.node = stmt.NewStmtList(yyDollar[2].list) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) @@ -3477,15 +3408,15 @@ yydefault: } case 202: yyDollar = yyS[yypt-5 : yypt+1] - //line parser/php7.y:944 + //line php7/php7.y:904 { - yyVAL.node = stmt.NewIf(yyDollar[3].node, yyDollar[5].node) + yyVAL.node = stmt.NewIf(yyDollar[3].node, yyDollar[5].node, nil, nil) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[5].node)) comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 203: yyDollar = yyS[yypt-6 : yypt+1] - //line parser/php7.y:950 + //line php7/php7.y:910 { _elseIf := stmt.NewElseIf(yyDollar[4].node, yyDollar[6].node) positions.AddPosition(_elseIf, positionBuilder.NewTokenNodePosition(yyDollar[2].token, yyDollar[6].node)) @@ -3496,13 +3427,13 @@ yydefault: } case 204: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:961 + //line php7/php7.y:921 { yyVAL.node = yyDollar[1].node } case 205: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:963 + //line php7/php7.y:923 { _else := stmt.NewElse(yyDollar[3].node) positions.AddPosition(_else, positionBuilder.NewTokenNodePosition(yyDollar[2].token, yyDollar[3].node)) @@ -3513,11 +3444,11 @@ yydefault: } case 206: yyDollar = yyS[yypt-6 : yypt+1] - //line parser/php7.y:975 + //line php7/php7.y:935 { stmts := stmt.NewStmtList(yyDollar[6].list) positions.AddPosition(stmts, positionBuilder.NewNodeListPosition(yyDollar[6].list)) - yyVAL.node = stmt.NewAltIf(yyDollar[3].node, stmts) + yyVAL.node = stmt.NewAltIf(yyDollar[3].node, stmts, nil, nil) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodeListPosition(yyDollar[1].token, yyDollar[6].list)) comments.AddComments(stmts, yyDollar[5].token.Comments()) @@ -3525,7 +3456,7 @@ yydefault: } case 207: yyDollar = yyS[yypt-7 : yypt+1] - //line parser/php7.y:985 + //line php7/php7.y:945 { stmts := stmt.NewStmtList(yyDollar[7].list) positions.AddPosition(stmts, positionBuilder.NewNodeListPosition(yyDollar[7].list)) @@ -3538,14 +3469,14 @@ yydefault: } case 208: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:999 + //line php7/php7.y:959 { yyVAL.node = yyDollar[1].node positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[3].token)) } case 209: yyDollar = yyS[yypt-6 : yypt+1] - //line parser/php7.y:1004 + //line php7/php7.y:964 { stmts := stmt.NewStmtList(yyDollar[4].list) positions.AddPosition(stmts, positionBuilder.NewNodeListPosition(yyDollar[4].list)) @@ -3559,31 +3490,31 @@ yydefault: } case 210: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1018 + //line php7/php7.y:978 { yyVAL.list = yyDollar[1].list } case 211: yyDollar = yyS[yypt-0 : yypt+1] - //line parser/php7.y:1019 + //line php7/php7.y:979 { yyVAL.list = nil } case 212: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1023 + //line php7/php7.y:983 { yyVAL.list = []node.Node{yyDollar[1].node} } case 213: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1024 + //line php7/php7.y:984 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 214: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:1029 + //line php7/php7.y:989 { identifier := node.NewIdentifier(yyDollar[4].token.Value) positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[4].token)) @@ -3613,7 +3544,7 @@ yydefault: } case 215: yyDollar = yyS[yypt-6 : yypt+1] - //line parser/php7.y:1057 + //line php7/php7.y:1017 { identifier := node.NewIdentifier(yyDollar[4].token.Value) positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[4].token)) @@ -3643,25 +3574,25 @@ yydefault: } case 216: yyDollar = yyS[yypt-0 : yypt+1] - //line parser/php7.y:1087 + //line php7/php7.y:1047 { yyVAL.node = nil } case 217: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1088 + //line php7/php7.y:1048 { yyVAL.node = yyDollar[1].node } case 218: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1092 + //line php7/php7.y:1052 { yyVAL.node = yyDollar[1].node } case 219: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1094 + //line php7/php7.y:1054 { yyVAL.node = node.NewNullable(yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) @@ -3669,7 +3600,7 @@ yydefault: } case 220: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1103 + //line php7/php7.y:1063 { yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -3677,7 +3608,7 @@ yydefault: } case 221: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1109 + //line php7/php7.y:1069 { yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -3685,95 +3616,95 @@ yydefault: } case 222: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1114 + //line php7/php7.y:1074 { yyVAL.node = yyDollar[1].node } case 223: yyDollar = yyS[yypt-0 : yypt+1] - //line parser/php7.y:1118 + //line php7/php7.y:1078 { yyVAL.node = nil } case 224: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1119 + //line php7/php7.y:1079 { yyVAL.node = yyDollar[2].node } case 225: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1123 + //line php7/php7.y:1083 { yyVAL.nodesWithEndToken = &nodesWithEndToken{[]node.Node{}, yyDollar[2].token} } case 226: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:1124 + //line php7/php7.y:1084 { yyVAL.nodesWithEndToken = &nodesWithEndToken{yyDollar[2].list, yyDollar[4].token} } case 227: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1128 + //line php7/php7.y:1088 { yyVAL.list = []node.Node{yyDollar[1].node} } case 228: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1129 + //line php7/php7.y:1089 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 229: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1134 + //line php7/php7.y:1094 { - yyVAL.node = node.NewArgument(yyDollar[1].node, false) + yyVAL.node = node.NewArgument(yyDollar[1].node, false, false) positions.AddPosition(yyVAL.node, positionBuilder.NewNodePosition(yyDollar[1].node)) comments.AddComments(yyVAL.node, comments[yyDollar[1].node]) } case 230: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1140 + //line php7/php7.y:1100 { - yyVAL.node = node.NewArgument(yyDollar[2].node, true) + yyVAL.node = node.NewArgument(yyDollar[2].node, true, false) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) comments.AddComments(yyVAL.node, yyDollar[1].token.Comments()) } case 231: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1148 + //line php7/php7.y:1108 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 232: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1149 + //line php7/php7.y:1109 { yyVAL.list = []node.Node{yyDollar[1].node} } case 233: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1153 + //line php7/php7.y:1113 { yyVAL.node = yyDollar[1].node } case 234: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1157 + //line php7/php7.y:1117 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 235: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1158 + //line php7/php7.y:1118 { yyVAL.list = []node.Node{yyDollar[1].node} } case 236: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1163 + //line php7/php7.y:1123 { identifier := node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -3788,7 +3719,7 @@ yydefault: } case 237: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1176 + //line php7/php7.y:1136 { identifier := node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -3803,19 +3734,19 @@ yydefault: } case 238: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1191 + //line php7/php7.y:1151 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 239: yyDollar = yyS[yypt-0 : yypt+1] - //line parser/php7.y:1192 + //line php7/php7.y:1152 { yyVAL.list = []node.Node{} } case 240: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1197 + //line php7/php7.y:1157 { yyVAL.node = stmt.NewPropertyList(yyDollar[1].list, yyDollar[2].list) positions.AddPosition(yyVAL.node, positionBuilder.NewNodeListTokenPosition(yyDollar[1].list, yyDollar[3].token)) @@ -3823,7 +3754,7 @@ yydefault: } case 241: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:1203 + //line php7/php7.y:1163 { yyVAL.node = stmt.NewClassConstList(yyDollar[1].list, yyDollar[3].list) positions.AddPosition(yyVAL.node, positionBuilder.NewOptionalListTokensPosition(yyDollar[1].list, yyDollar[2].token, yyDollar[4].token)) @@ -3831,7 +3762,7 @@ yydefault: } case 242: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1209 + //line php7/php7.y:1169 { yyVAL.node = stmt.NewTraitUse(yyDollar[2].list, yyDollar[3].nodesWithEndToken.nodes) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].nodesWithEndToken.endToken)) @@ -3839,7 +3770,7 @@ yydefault: } case 243: yyDollar = yyS[yypt-10 : yypt+1] - //line parser/php7.y:1215 + //line php7/php7.y:1175 { name := node.NewIdentifier(yyDollar[4].token.Value) positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[4].token)) @@ -3851,61 +3782,61 @@ yydefault: } case 244: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1227 + //line php7/php7.y:1187 { yyVAL.list = []node.Node{yyDollar[1].node} } case 245: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1228 + //line php7/php7.y:1188 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 246: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1232 + //line php7/php7.y:1192 { yyVAL.nodesWithEndToken = &nodesWithEndToken{nil, yyDollar[1].token} } case 247: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1233 + //line php7/php7.y:1193 { yyVAL.nodesWithEndToken = &nodesWithEndToken{nil, yyDollar[2].token} } case 248: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1234 + //line php7/php7.y:1194 { yyVAL.nodesWithEndToken = &nodesWithEndToken{yyDollar[2].list, yyDollar[3].token} } case 249: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1238 + //line php7/php7.y:1198 { yyVAL.list = []node.Node{yyDollar[1].node} } case 250: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1239 + //line php7/php7.y:1199 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 251: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1243 + //line php7/php7.y:1203 { yyVAL.node = yyDollar[1].node } case 252: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1244 + //line php7/php7.y:1204 { yyVAL.node = yyDollar[1].node } case 253: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1249 + //line php7/php7.y:1209 { name := name.NewName(yyDollar[3].list) positions.AddPosition(name, positionBuilder.NewNodeListPosition(yyDollar[3].list)) @@ -3917,7 +3848,7 @@ yydefault: } case 254: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1262 + //line php7/php7.y:1222 { alias := node.NewIdentifier(yyDollar[3].token.Value) positions.AddPosition(alias, positionBuilder.NewTokenPosition(yyDollar[3].token)) @@ -3929,7 +3860,7 @@ yydefault: } case 255: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1272 + //line php7/php7.y:1232 { alias := node.NewIdentifier(yyDollar[3].token.Value) positions.AddPosition(alias, positionBuilder.NewTokenPosition(yyDollar[3].token)) @@ -3941,7 +3872,7 @@ yydefault: } case 256: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:1282 + //line php7/php7.y:1242 { alias := node.NewIdentifier(yyDollar[4].token.Value) positions.AddPosition(alias, positionBuilder.NewTokenPosition(yyDollar[4].token)) @@ -3953,7 +3884,7 @@ yydefault: } case 257: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1292 + //line php7/php7.y:1252 { yyVAL.node = stmt.NewTraitUseAlias(yyDollar[1].node, yyDollar[3].node, nil) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -3961,7 +3892,7 @@ yydefault: } case 258: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1301 + //line php7/php7.y:1261 { name := node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -3973,13 +3904,13 @@ yydefault: } case 259: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1310 + //line php7/php7.y:1270 { yyVAL.node = yyDollar[1].node } case 260: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1315 + //line php7/php7.y:1275 { target := node.NewIdentifier(yyDollar[3].token.Value) positions.AddPosition(target, positionBuilder.NewTokenPosition(yyDollar[3].token)) @@ -3991,25 +3922,25 @@ yydefault: } case 261: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1327 + //line php7/php7.y:1287 { yyVAL.nodesWithEndToken = &nodesWithEndToken{nil, yyDollar[1].token} } case 262: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1328 + //line php7/php7.y:1288 { yyVAL.nodesWithEndToken = &nodesWithEndToken{yyDollar[2].list, yyDollar[3].token} } case 263: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1332 + //line php7/php7.y:1292 { yyVAL.list = yyDollar[1].list } case 264: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1334 + //line php7/php7.y:1294 { modifier := node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(modifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -4018,31 +3949,31 @@ yydefault: } case 265: yyDollar = yyS[yypt-0 : yypt+1] - //line parser/php7.y:1343 + //line php7/php7.y:1303 { yyVAL.list = nil } case 266: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1344 + //line php7/php7.y:1304 { yyVAL.list = yyDollar[1].list } case 267: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1348 + //line php7/php7.y:1308 { yyVAL.list = []node.Node{yyDollar[1].node} } case 268: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1349 + //line php7/php7.y:1309 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 269: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1354 + //line php7/php7.y:1314 { yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -4050,7 +3981,7 @@ yydefault: } case 270: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1360 + //line php7/php7.y:1320 { yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -4058,7 +3989,7 @@ yydefault: } case 271: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1366 + //line php7/php7.y:1326 { yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -4066,7 +3997,7 @@ yydefault: } case 272: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1372 + //line php7/php7.y:1332 { yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -4074,7 +4005,7 @@ yydefault: } case 273: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1378 + //line php7/php7.y:1338 { yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -4082,7 +4013,7 @@ yydefault: } case 274: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1384 + //line php7/php7.y:1344 { yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -4090,19 +4021,19 @@ yydefault: } case 275: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1392 + //line php7/php7.y:1352 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 276: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1393 + //line php7/php7.y:1353 { yyVAL.list = []node.Node{yyDollar[1].node} } case 277: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1398 + //line php7/php7.y:1358 { identifier := node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -4117,7 +4048,7 @@ yydefault: } case 278: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:1411 + //line php7/php7.y:1371 { identifier := node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -4132,19 +4063,19 @@ yydefault: } case 279: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1426 + //line php7/php7.y:1386 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 280: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1427 + //line php7/php7.y:1387 { yyVAL.list = []node.Node{yyDollar[1].node} } case 281: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:1432 + //line php7/php7.y:1392 { name := node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -4156,7 +4087,7 @@ yydefault: } case 282: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:1445 + //line php7/php7.y:1405 { name := node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -4168,49 +4099,49 @@ yydefault: } case 283: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1457 + //line php7/php7.y:1417 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 284: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1458 + //line php7/php7.y:1418 { yyVAL.list = []node.Node{yyDollar[1].node} } case 285: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1462 + //line php7/php7.y:1422 { yyVAL.node = yyDollar[1].node } case 286: yyDollar = yyS[yypt-0 : yypt+1] - //line parser/php7.y:1466 + //line php7/php7.y:1426 { yyVAL.list = nil } case 287: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1467 + //line php7/php7.y:1427 { yyVAL.list = yyDollar[1].list } case 288: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1470 + //line php7/php7.y:1430 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 289: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1471 + //line php7/php7.y:1431 { yyVAL.list = []node.Node{yyDollar[1].node} } case 290: yyDollar = yyS[yypt-8 : yypt+1] - //line parser/php7.y:1476 + //line php7/php7.y:1436 { if yyDollar[2].nodesWithEndToken != nil { yyVAL.node = stmt.NewClass(nil, nil, yyDollar[2].nodesWithEndToken.nodes, yyDollar[3].node, yyDollar[4].list, yyDollar[7].list, yyDollar[5].str) @@ -4224,7 +4155,7 @@ yydefault: } case 291: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1491 + //line php7/php7.y:1451 { if yyDollar[3].nodesWithEndToken != nil { yyVAL.node = expr.NewNew(yyDollar[2].node, yyDollar[3].nodesWithEndToken.nodes) @@ -4238,13 +4169,13 @@ yydefault: } case 292: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1502 + //line php7/php7.y:1462 { yyVAL.node = expr.NewNew(yyDollar[2].node, nil) } case 293: yyDollar = yyS[yypt-6 : yypt+1] - //line parser/php7.y:1507 + //line php7/php7.y:1467 { list := expr.NewList(yyDollar[3].list) positions.AddPosition(list, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) @@ -4256,7 +4187,7 @@ yydefault: } case 294: yyDollar = yyS[yypt-5 : yypt+1] - //line parser/php7.y:1517 + //line php7/php7.y:1477 { shortList := expr.NewShortList(yyDollar[2].list) positions.AddPosition(shortList, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) @@ -4268,7 +4199,7 @@ yydefault: } case 295: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1527 + //line php7/php7.y:1487 { yyVAL.node = assign_op.NewAssign(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4276,7 +4207,7 @@ yydefault: } case 296: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:1533 + //line php7/php7.y:1493 { yyVAL.node = assign_op.NewAssignRef(yyDollar[1].node, yyDollar[4].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) @@ -4284,7 +4215,7 @@ yydefault: } case 297: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1539 + //line php7/php7.y:1499 { yyVAL.node = expr.NewClone(yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) @@ -4292,7 +4223,7 @@ yydefault: } case 298: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1545 + //line php7/php7.y:1505 { yyVAL.node = assign_op.NewPlus(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4300,7 +4231,7 @@ yydefault: } case 299: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1551 + //line php7/php7.y:1511 { yyVAL.node = assign_op.NewMinus(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4308,7 +4239,7 @@ yydefault: } case 300: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1557 + //line php7/php7.y:1517 { yyVAL.node = assign_op.NewMul(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4316,7 +4247,7 @@ yydefault: } case 301: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1563 + //line php7/php7.y:1523 { yyVAL.node = assign_op.NewPow(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4324,7 +4255,7 @@ yydefault: } case 302: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1569 + //line php7/php7.y:1529 { yyVAL.node = assign_op.NewDiv(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4332,7 +4263,7 @@ yydefault: } case 303: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1575 + //line php7/php7.y:1535 { yyVAL.node = assign_op.NewConcat(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4340,7 +4271,7 @@ yydefault: } case 304: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1581 + //line php7/php7.y:1541 { yyVAL.node = assign_op.NewMod(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4348,7 +4279,7 @@ yydefault: } case 305: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1587 + //line php7/php7.y:1547 { yyVAL.node = assign_op.NewBitwiseAnd(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4356,7 +4287,7 @@ yydefault: } case 306: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1593 + //line php7/php7.y:1553 { yyVAL.node = assign_op.NewBitwiseOr(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4364,7 +4295,7 @@ yydefault: } case 307: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1599 + //line php7/php7.y:1559 { yyVAL.node = assign_op.NewBitwiseXor(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4372,7 +4303,7 @@ yydefault: } case 308: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1605 + //line php7/php7.y:1565 { yyVAL.node = assign_op.NewShiftLeft(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4380,7 +4311,7 @@ yydefault: } case 309: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1611 + //line php7/php7.y:1571 { yyVAL.node = assign_op.NewShiftRight(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4388,7 +4319,7 @@ yydefault: } case 310: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1617 + //line php7/php7.y:1577 { yyVAL.node = expr.NewPostInc(yyDollar[1].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token)) @@ -4396,7 +4327,7 @@ yydefault: } case 311: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1623 + //line php7/php7.y:1583 { yyVAL.node = expr.NewPreInc(yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) @@ -4404,7 +4335,7 @@ yydefault: } case 312: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1629 + //line php7/php7.y:1589 { yyVAL.node = expr.NewPostDec(yyDollar[1].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].token)) @@ -4412,7 +4343,7 @@ yydefault: } case 313: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1635 + //line php7/php7.y:1595 { yyVAL.node = expr.NewPreDec(yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) @@ -4420,7 +4351,7 @@ yydefault: } case 314: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1641 + //line php7/php7.y:1601 { yyVAL.node = binary_op.NewBooleanOr(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4428,7 +4359,7 @@ yydefault: } case 315: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1647 + //line php7/php7.y:1607 { yyVAL.node = binary_op.NewBooleanAnd(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4436,7 +4367,7 @@ yydefault: } case 316: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1653 + //line php7/php7.y:1613 { yyVAL.node = binary_op.NewLogicalOr(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4444,7 +4375,7 @@ yydefault: } case 317: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1659 + //line php7/php7.y:1619 { yyVAL.node = binary_op.NewLogicalAnd(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4452,7 +4383,7 @@ yydefault: } case 318: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1665 + //line php7/php7.y:1625 { yyVAL.node = binary_op.NewLogicalXor(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4460,7 +4391,7 @@ yydefault: } case 319: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1671 + //line php7/php7.y:1631 { yyVAL.node = binary_op.NewBitwiseOr(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4468,7 +4399,7 @@ yydefault: } case 320: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1677 + //line php7/php7.y:1637 { yyVAL.node = binary_op.NewBitwiseAnd(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4476,7 +4407,7 @@ yydefault: } case 321: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1683 + //line php7/php7.y:1643 { yyVAL.node = binary_op.NewBitwiseXor(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4484,7 +4415,7 @@ yydefault: } case 322: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1689 + //line php7/php7.y:1649 { yyVAL.node = binary_op.NewConcat(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4492,7 +4423,7 @@ yydefault: } case 323: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1695 + //line php7/php7.y:1655 { yyVAL.node = binary_op.NewPlus(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4500,7 +4431,7 @@ yydefault: } case 324: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1701 + //line php7/php7.y:1661 { yyVAL.node = binary_op.NewMinus(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4508,7 +4439,7 @@ yydefault: } case 325: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1707 + //line php7/php7.y:1667 { yyVAL.node = binary_op.NewMul(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4516,7 +4447,7 @@ yydefault: } case 326: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1713 + //line php7/php7.y:1673 { yyVAL.node = binary_op.NewPow(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4524,7 +4455,7 @@ yydefault: } case 327: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1719 + //line php7/php7.y:1679 { yyVAL.node = binary_op.NewDiv(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4532,7 +4463,7 @@ yydefault: } case 328: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1725 + //line php7/php7.y:1685 { yyVAL.node = binary_op.NewMod(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4540,7 +4471,7 @@ yydefault: } case 329: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1731 + //line php7/php7.y:1691 { yyVAL.node = binary_op.NewShiftLeft(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4548,7 +4479,7 @@ yydefault: } case 330: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1737 + //line php7/php7.y:1697 { yyVAL.node = binary_op.NewShiftRight(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4556,7 +4487,7 @@ yydefault: } case 331: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1743 + //line php7/php7.y:1703 { yyVAL.node = expr.NewUnaryPlus(yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) @@ -4564,7 +4495,7 @@ yydefault: } case 332: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1749 + //line php7/php7.y:1709 { yyVAL.node = expr.NewUnaryMinus(yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) @@ -4572,7 +4503,7 @@ yydefault: } case 333: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1755 + //line php7/php7.y:1715 { yyVAL.node = expr.NewBooleanNot(yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) @@ -4580,7 +4511,7 @@ yydefault: } case 334: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1761 + //line php7/php7.y:1721 { yyVAL.node = expr.NewBitwiseNot(yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) @@ -4588,7 +4519,7 @@ yydefault: } case 335: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1767 + //line php7/php7.y:1727 { yyVAL.node = binary_op.NewIdentical(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4596,7 +4527,7 @@ yydefault: } case 336: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1773 + //line php7/php7.y:1733 { yyVAL.node = binary_op.NewNotIdentical(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4604,7 +4535,7 @@ yydefault: } case 337: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1779 + //line php7/php7.y:1739 { yyVAL.node = binary_op.NewEqual(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4612,7 +4543,7 @@ yydefault: } case 338: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1785 + //line php7/php7.y:1745 { yyVAL.node = binary_op.NewNotEqual(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4620,7 +4551,7 @@ yydefault: } case 339: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1791 + //line php7/php7.y:1751 { yyVAL.node = binary_op.NewSmaller(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4628,7 +4559,7 @@ yydefault: } case 340: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1797 + //line php7/php7.y:1757 { yyVAL.node = binary_op.NewSmallerOrEqual(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4636,7 +4567,7 @@ yydefault: } case 341: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1803 + //line php7/php7.y:1763 { yyVAL.node = binary_op.NewGreater(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4644,7 +4575,7 @@ yydefault: } case 342: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1809 + //line php7/php7.y:1769 { yyVAL.node = binary_op.NewGreaterOrEqual(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4652,7 +4583,7 @@ yydefault: } case 343: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1815 + //line php7/php7.y:1775 { yyVAL.node = binary_op.NewSpaceship(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4660,7 +4591,7 @@ yydefault: } case 344: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1821 + //line php7/php7.y:1781 { yyVAL.node = expr.NewInstanceOf(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4668,19 +4599,19 @@ yydefault: } case 345: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1826 + //line php7/php7.y:1786 { yyVAL.node = yyDollar[2].node } case 346: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1827 + //line php7/php7.y:1787 { yyVAL.node = yyDollar[1].node } case 347: yyDollar = yyS[yypt-5 : yypt+1] - //line parser/php7.y:1829 + //line php7/php7.y:1789 { yyVAL.node = expr.NewTernary(yyDollar[1].node, yyDollar[3].node, yyDollar[5].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[5].node)) @@ -4688,7 +4619,7 @@ yydefault: } case 348: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:1835 + //line php7/php7.y:1795 { yyVAL.node = expr.NewTernary(yyDollar[1].node, nil, yyDollar[4].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) @@ -4696,7 +4627,7 @@ yydefault: } case 349: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1841 + //line php7/php7.y:1801 { yyVAL.node = binary_op.NewCoalesce(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -4704,13 +4635,13 @@ yydefault: } case 350: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1846 + //line php7/php7.y:1806 { yyVAL.node = yyDollar[1].node } case 351: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1848 + //line php7/php7.y:1808 { yyVAL.node = cast.NewCastInt(yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) @@ -4718,7 +4649,7 @@ yydefault: } case 352: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1854 + //line php7/php7.y:1814 { yyVAL.node = cast.NewCastDouble(yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) @@ -4726,7 +4657,7 @@ yydefault: } case 353: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1860 + //line php7/php7.y:1820 { yyVAL.node = cast.NewCastString(yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) @@ -4734,7 +4665,7 @@ yydefault: } case 354: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1866 + //line php7/php7.y:1826 { yyVAL.node = cast.NewCastArray(yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) @@ -4742,7 +4673,7 @@ yydefault: } case 355: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1872 + //line php7/php7.y:1832 { yyVAL.node = cast.NewCastObject(yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) @@ -4750,7 +4681,7 @@ yydefault: } case 356: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1878 + //line php7/php7.y:1838 { yyVAL.node = cast.NewCastBool(yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) @@ -4758,7 +4689,7 @@ yydefault: } case 357: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1884 + //line php7/php7.y:1844 { yyVAL.node = cast.NewCastUnset(yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) @@ -4766,7 +4697,7 @@ yydefault: } case 358: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1890 + //line php7/php7.y:1850 { yyVAL.node = expr.NewExit(yyDollar[2].node, strings.EqualFold(yyDollar[1].token.Value, "die")) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) @@ -4774,7 +4705,7 @@ yydefault: } case 359: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1896 + //line php7/php7.y:1856 { yyVAL.node = expr.NewErrorSuppress(yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) @@ -4782,13 +4713,13 @@ yydefault: } case 360: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1901 + //line php7/php7.y:1861 { yyVAL.node = yyDollar[1].node } case 361: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1903 + //line php7/php7.y:1863 { yyVAL.node = expr.NewShellExec(yyDollar[2].list) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) @@ -4796,7 +4727,7 @@ yydefault: } case 362: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1909 + //line php7/php7.y:1869 { yyVAL.node = expr.NewPrint(yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) @@ -4804,7 +4735,7 @@ yydefault: } case 363: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1915 + //line php7/php7.y:1875 { yyVAL.node = expr.NewYield(nil, nil) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -4812,7 +4743,7 @@ yydefault: } case 364: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1921 + //line php7/php7.y:1881 { yyVAL.node = expr.NewYield(nil, yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) @@ -4820,7 +4751,7 @@ yydefault: } case 365: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:1927 + //line php7/php7.y:1887 { yyVAL.node = expr.NewYield(yyDollar[2].node, yyDollar[4].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[4].node)) @@ -4828,7 +4759,7 @@ yydefault: } case 366: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1933 + //line php7/php7.y:1893 { yyVAL.node = expr.NewYieldFrom(yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) @@ -4836,7 +4767,7 @@ yydefault: } case 367: yyDollar = yyS[yypt-11 : yypt+1] - //line parser/php7.y:1939 + //line php7/php7.y:1899 { yyVAL.node = expr.NewClosure(yyDollar[5].list, yyDollar[7].list, yyDollar[8].node, yyDollar[10].list, false, yyDollar[2].boolWithToken.value, yyDollar[3].str) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[11].token)) @@ -4845,7 +4776,7 @@ yydefault: } case 368: yyDollar = yyS[yypt-12 : yypt+1] - //line parser/php7.y:1946 + //line php7/php7.y:1906 { yyVAL.node = expr.NewClosure(yyDollar[6].list, yyDollar[8].list, yyDollar[9].node, yyDollar[11].list, true, yyDollar[3].boolWithToken.value, yyDollar[4].str) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[12].token)) @@ -4854,50 +4785,50 @@ yydefault: } case 369: yyDollar = yyS[yypt-0 : yypt+1] - //line parser/php7.y:1955 + //line php7/php7.y:1915 { - yyVAL.str = yylex.(*lexer).phpDocComment - yylex.(*lexer).phpDocComment = "" + yyVAL.str = yylex.(*lexer).PhpDocComment + yylex.(*lexer).PhpDocComment = "" } case 370: yyDollar = yyS[yypt-0 : yypt+1] - //line parser/php7.y:1959 + //line php7/php7.y:1919 { yyVAL.boolWithToken = boolWithToken{false, nil} } case 371: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1960 + //line php7/php7.y:1920 { yyVAL.boolWithToken = boolWithToken{true, &yyDollar[1].token} } case 372: yyDollar = yyS[yypt-0 : yypt+1] - //line parser/php7.y:1964 + //line php7/php7.y:1924 { yyVAL.list = []node.Node{} } case 373: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:1965 + //line php7/php7.y:1925 { yyVAL.list = yyDollar[3].list } case 374: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:1969 + //line php7/php7.y:1929 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 375: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1970 + //line php7/php7.y:1930 { yyVAL.list = []node.Node{yyDollar[1].node} } case 376: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:1975 + //line php7/php7.y:1935 { identifier := node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -4912,7 +4843,7 @@ yydefault: } case 377: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:1988 + //line php7/php7.y:1948 { identifier := node.NewIdentifier(yyDollar[2].token.Value) positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[2].token)) @@ -4927,7 +4858,7 @@ yydefault: } case 378: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:2004 + //line php7/php7.y:1964 { yyVAL.node = expr.NewFunctionCall(yyDollar[1].node, yyDollar[2].nodesWithEndToken.nodes) positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].nodesWithEndToken.endToken)) @@ -4935,7 +4866,7 @@ yydefault: } case 379: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:2010 + //line php7/php7.y:1970 { yyVAL.node = expr.NewStaticCall(yyDollar[1].node, yyDollar[3].node, yyDollar[4].nodesWithEndToken.nodes) positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].nodesWithEndToken.endToken)) @@ -4943,7 +4874,7 @@ yydefault: } case 380: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:2016 + //line php7/php7.y:1976 { yyVAL.node = expr.NewStaticCall(yyDollar[1].node, yyDollar[3].node, yyDollar[4].nodesWithEndToken.nodes) positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].nodesWithEndToken.endToken)) @@ -4951,7 +4882,7 @@ yydefault: } case 381: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:2022 + //line php7/php7.y:1982 { yyVAL.node = expr.NewFunctionCall(yyDollar[1].node, yyDollar[2].nodesWithEndToken.nodes) positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[2].nodesWithEndToken.endToken)) @@ -4959,7 +4890,7 @@ yydefault: } case 382: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2031 + //line php7/php7.y:1991 { yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -4967,67 +4898,67 @@ yydefault: } case 383: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2036 + //line php7/php7.y:1996 { yyVAL.node = yyDollar[1].node } case 384: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2040 + //line php7/php7.y:2000 { yyVAL.node = yyDollar[1].node } case 385: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2041 + //line php7/php7.y:2001 { yyVAL.node = yyDollar[1].node } case 386: yyDollar = yyS[yypt-0 : yypt+1] - //line parser/php7.y:2045 + //line php7/php7.y:2005 { yyVAL.node = nil } case 387: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:2046 + //line php7/php7.y:2006 { yyVAL.node = yyDollar[2].node } case 388: yyDollar = yyS[yypt-0 : yypt+1] - //line parser/php7.y:2050 + //line php7/php7.y:2010 { yyVAL.list = []node.Node{} } case 389: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2051 + //line php7/php7.y:2011 { yyVAL.list = []node.Node{scalar.NewEncapsedStringPart(yyDollar[1].token.Value)} } case 390: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2052 + //line php7/php7.y:2012 { yyVAL.list = yyDollar[1].list } case 391: yyDollar = yyS[yypt-0 : yypt+1] - //line parser/php7.y:2056 + //line php7/php7.y:2016 { yyVAL.nodesWithEndToken = nil } case 392: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2057 + //line php7/php7.y:2017 { yyVAL.nodesWithEndToken = yyDollar[1].nodesWithEndToken } case 393: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:2062 + //line php7/php7.y:2022 { yyVAL.node = expr.NewArray(yyDollar[3].list) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) @@ -5035,7 +4966,7 @@ yydefault: } case 394: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:2068 + //line php7/php7.y:2028 { yyVAL.node = expr.NewShortArray(yyDollar[2].list) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) @@ -5043,7 +4974,7 @@ yydefault: } case 395: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2074 + //line php7/php7.y:2034 { yyVAL.node = scalar.NewString(yyDollar[1].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -5051,7 +4982,7 @@ yydefault: } case 396: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2083 + //line php7/php7.y:2043 { yyVAL.node = scalar.NewLnumber(yyDollar[1].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -5059,7 +4990,7 @@ yydefault: } case 397: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2089 + //line php7/php7.y:2049 { yyVAL.node = scalar.NewDnumber(yyDollar[1].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -5067,7 +4998,7 @@ yydefault: } case 398: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2095 + //line php7/php7.y:2055 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -5075,7 +5006,7 @@ yydefault: } case 399: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2101 + //line php7/php7.y:2061 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -5083,7 +5014,7 @@ yydefault: } case 400: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2107 + //line php7/php7.y:2067 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -5091,7 +5022,7 @@ yydefault: } case 401: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2113 + //line php7/php7.y:2073 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -5099,7 +5030,7 @@ yydefault: } case 402: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2119 + //line php7/php7.y:2079 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -5107,7 +5038,7 @@ yydefault: } case 403: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2125 + //line php7/php7.y:2085 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -5115,7 +5046,7 @@ yydefault: } case 404: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2131 + //line php7/php7.y:2091 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -5123,7 +5054,7 @@ yydefault: } case 405: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2137 + //line php7/php7.y:2097 { yyVAL.node = scalar.NewMagicConstant(yyDollar[1].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -5131,7 +5062,7 @@ yydefault: } case 406: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:2143 + //line php7/php7.y:2103 { yyVAL.node = scalar.NewString(yyDollar[2].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) /* TODO: mark as Heredoc*/ @@ -5139,7 +5070,7 @@ yydefault: } case 407: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:2148 + //line php7/php7.y:2108 { yyVAL.node = scalar.NewEncapsed(nil) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[2].token)) @@ -5147,7 +5078,7 @@ yydefault: } case 408: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:2154 + //line php7/php7.y:2114 { yyVAL.node = scalar.NewEncapsed(yyDollar[2].list) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) @@ -5155,7 +5086,7 @@ yydefault: } case 409: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:2160 + //line php7/php7.y:2120 { yyVAL.node = scalar.NewEncapsed(yyDollar[2].list) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) @@ -5163,19 +5094,19 @@ yydefault: } case 410: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2165 + //line php7/php7.y:2125 { yyVAL.node = yyDollar[1].node } case 411: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2166 + //line php7/php7.y:2126 { yyVAL.node = yyDollar[1].node } case 412: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2171 + //line php7/php7.y:2131 { yyVAL.node = expr.NewConstFetch(yyDollar[1].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodePosition(yyDollar[1].node)) @@ -5183,7 +5114,7 @@ yydefault: } case 413: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:2177 + //line php7/php7.y:2137 { target := node.NewIdentifier(yyDollar[3].token.Value) positions.AddPosition(target, positionBuilder.NewTokenPosition(yyDollar[3].token)) @@ -5195,7 +5126,7 @@ yydefault: } case 414: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:2187 + //line php7/php7.y:2147 { target := node.NewIdentifier(yyDollar[3].token.Value) positions.AddPosition(target, positionBuilder.NewTokenPosition(yyDollar[3].token)) @@ -5207,79 +5138,79 @@ yydefault: } case 415: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2199 + //line php7/php7.y:2159 { yyVAL.node = yyDollar[1].node } case 416: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2200 + //line php7/php7.y:2160 { yyVAL.node = yyDollar[1].node } case 417: yyDollar = yyS[yypt-0 : yypt+1] - //line parser/php7.y:2204 + //line php7/php7.y:2164 { yyVAL.node = nil } case 418: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2205 + //line php7/php7.y:2165 { yyVAL.node = yyDollar[1].node } case 419: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2209 + //line php7/php7.y:2169 { yyVAL.node = yyDollar[1].node } case 420: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2213 + //line php7/php7.y:2173 { yyVAL.node = yyDollar[1].node } case 421: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:2214 + //line php7/php7.y:2174 { yyVAL.node = yyDollar[2].node } case 422: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2215 + //line php7/php7.y:2175 { yyVAL.node = yyDollar[1].node } case 423: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2219 + //line php7/php7.y:2179 { yyVAL.node = yyDollar[1].node } case 424: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:2220 + //line php7/php7.y:2180 { yyVAL.node = yyDollar[2].node } case 425: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2221 + //line php7/php7.y:2181 { yyVAL.node = yyDollar[1].node } case 426: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2225 + //line php7/php7.y:2185 { yyVAL.node = yyDollar[1].node } case 427: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:2227 + //line php7/php7.y:2187 { yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) @@ -5287,7 +5218,7 @@ yydefault: } case 428: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:2233 + //line php7/php7.y:2193 { yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) @@ -5295,7 +5226,7 @@ yydefault: } case 429: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:2239 + //line php7/php7.y:2199 { yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) @@ -5303,7 +5234,7 @@ yydefault: } case 430: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:2245 + //line php7/php7.y:2205 { yyVAL.node = expr.NewMethodCall(yyDollar[1].node, yyDollar[3].node, yyDollar[4].nodesWithEndToken.nodes) positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].nodesWithEndToken.endToken)) @@ -5311,25 +5242,25 @@ yydefault: } case 431: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2250 + //line php7/php7.y:2210 { yyVAL.node = yyDollar[1].node } case 432: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2254 + //line php7/php7.y:2214 { yyVAL.node = yyDollar[1].node } case 433: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2255 + //line php7/php7.y:2215 { yyVAL.node = yyDollar[1].node } case 434: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:2257 + //line php7/php7.y:2217 { yyVAL.node = expr.NewPropertyFetch(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -5337,7 +5268,7 @@ yydefault: } case 435: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2266 + //line php7/php7.y:2226 { name := node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -5349,7 +5280,7 @@ yydefault: } case 436: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:2276 + //line php7/php7.y:2236 { yyVAL.node = expr.NewVariable(yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) @@ -5357,7 +5288,7 @@ yydefault: } case 437: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:2282 + //line php7/php7.y:2242 { yyVAL.node = expr.NewVariable(yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) @@ -5365,7 +5296,7 @@ yydefault: } case 438: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:2291 + //line php7/php7.y:2251 { yyVAL.node = expr.NewStaticPropertyFetch(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -5373,7 +5304,7 @@ yydefault: } case 439: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:2297 + //line php7/php7.y:2257 { yyVAL.node = expr.NewStaticPropertyFetch(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -5381,13 +5312,13 @@ yydefault: } case 440: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2305 + //line php7/php7.y:2265 { yyVAL.node = yyDollar[1].node } case 441: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:2307 + //line php7/php7.y:2267 { yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) @@ -5395,7 +5326,7 @@ yydefault: } case 442: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:2313 + //line php7/php7.y:2273 { yyVAL.node = expr.NewArrayDimFetch(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodeTokenPosition(yyDollar[1].node, yyDollar[4].token)) @@ -5403,7 +5334,7 @@ yydefault: } case 443: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:2319 + //line php7/php7.y:2279 { yyVAL.node = expr.NewPropertyFetch(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -5411,7 +5342,7 @@ yydefault: } case 444: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:2325 + //line php7/php7.y:2285 { yyVAL.node = expr.NewStaticPropertyFetch(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -5419,7 +5350,7 @@ yydefault: } case 445: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:2331 + //line php7/php7.y:2291 { yyVAL.node = expr.NewStaticPropertyFetch(yyDollar[1].node, yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -5427,7 +5358,7 @@ yydefault: } case 446: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2340 + //line php7/php7.y:2300 { yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -5435,19 +5366,19 @@ yydefault: } case 447: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:2345 + //line php7/php7.y:2305 { yyVAL.node = yyDollar[2].node } case 448: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2346 + //line php7/php7.y:2306 { yyVAL.node = yyDollar[1].node } case 449: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2351 + //line php7/php7.y:2311 { yyVAL.node = node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -5455,19 +5386,19 @@ yydefault: } case 450: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:2356 + //line php7/php7.y:2316 { yyVAL.node = yyDollar[2].node } case 451: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2357 + //line php7/php7.y:2317 { yyVAL.node = yyDollar[1].node } case 452: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2362 + //line php7/php7.y:2322 { if yyDollar[1].list[len(yyDollar[1].list)-1] == nil { yyVAL.list = yyDollar[1].list[:len(yyDollar[1].list)-1] @@ -5477,31 +5408,31 @@ yydefault: } case 453: yyDollar = yyS[yypt-0 : yypt+1] - //line parser/php7.y:2372 + //line php7/php7.y:2332 { yyVAL.node = nil } case 454: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2373 + //line php7/php7.y:2333 { yyVAL.node = yyDollar[1].node } case 455: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:2378 + //line php7/php7.y:2338 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 456: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2379 + //line php7/php7.y:2339 { yyVAL.list = []node.Node{yyDollar[1].node} } case 457: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:2384 + //line php7/php7.y:2344 { yyVAL.node = expr.NewArrayItem(yyDollar[1].node, yyDollar[3].node, false) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[3].node)) @@ -5509,7 +5440,7 @@ yydefault: } case 458: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2390 + //line php7/php7.y:2350 { yyVAL.node = expr.NewArrayItem(nil, yyDollar[1].node, false) positions.AddPosition(yyVAL.node, positionBuilder.NewNodePosition(yyDollar[1].node)) @@ -5517,7 +5448,7 @@ yydefault: } case 459: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:2396 + //line php7/php7.y:2356 { yyVAL.node = expr.NewArrayItem(yyDollar[1].node, yyDollar[4].node, true) positions.AddPosition(yyVAL.node, positionBuilder.NewNodesPosition(yyDollar[1].node, yyDollar[4].node)) @@ -5525,7 +5456,7 @@ yydefault: } case 460: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:2402 + //line php7/php7.y:2362 { yyVAL.node = expr.NewArrayItem(nil, yyDollar[2].node, true) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) @@ -5533,7 +5464,7 @@ yydefault: } case 461: yyDollar = yyS[yypt-6 : yypt+1] - //line parser/php7.y:2408 + //line php7/php7.y:2368 { // TODO: Cannot use list() as standalone expression list := expr.NewList(yyDollar[5].list) @@ -5546,7 +5477,7 @@ yydefault: } case 462: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:2419 + //line php7/php7.y:2379 { // TODO: Cannot use list() as standalone expression list := expr.NewList(yyDollar[3].list) @@ -5559,13 +5490,13 @@ yydefault: } case 463: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:2432 + //line php7/php7.y:2392 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) } case 464: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:2434 + //line php7/php7.y:2394 { encapsed := scalar.NewEncapsedStringPart(yyDollar[2].token.Value) positions.AddPosition(encapsed, positionBuilder.NewTokenPosition(yyDollar[2].token)) @@ -5574,13 +5505,13 @@ yydefault: } case 465: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2440 + //line php7/php7.y:2400 { yyVAL.list = []node.Node{yyDollar[1].node} } case 466: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:2442 + //line php7/php7.y:2402 { encapsed := scalar.NewEncapsedStringPart(yyDollar[1].token.Value) positions.AddPosition(encapsed, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -5589,7 +5520,7 @@ yydefault: } case 467: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2452 + //line php7/php7.y:2412 { name := node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -5601,7 +5532,7 @@ yydefault: } case 468: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:2462 + //line php7/php7.y:2422 { identifier := node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -5616,7 +5547,7 @@ yydefault: } case 469: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:2475 + //line php7/php7.y:2435 { identifier := node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -5634,7 +5565,7 @@ yydefault: } case 470: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:2491 + //line php7/php7.y:2451 { yyVAL.node = expr.NewVariable(yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[3].token)) @@ -5642,7 +5573,7 @@ yydefault: } case 471: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:2497 + //line php7/php7.y:2457 { name := node.NewIdentifier(yyDollar[2].token.Value) positions.AddPosition(name, positionBuilder.NewTokenPosition(yyDollar[2].token)) @@ -5654,7 +5585,7 @@ yydefault: } case 472: yyDollar = yyS[yypt-6 : yypt+1] - //line parser/php7.y:2507 + //line php7/php7.y:2467 { identifier := node.NewIdentifier(yyDollar[2].token.Value) positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[2].token)) @@ -5669,13 +5600,13 @@ yydefault: } case 473: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:2520 + //line php7/php7.y:2480 { yyVAL.node = yyDollar[2].node } case 474: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2524 + //line php7/php7.y:2484 { yyVAL.node = scalar.NewString(yyDollar[1].token.Value) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -5683,7 +5614,7 @@ yydefault: } case 475: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2530 + //line php7/php7.y:2490 { // TODO: add option to handle 64 bit integer if _, err := strconv.Atoi(yyDollar[1].token.Value); err == nil { @@ -5697,7 +5628,7 @@ yydefault: } case 476: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:2542 + //line php7/php7.y:2502 { // TODO: add option to handle 64 bit integer if _, err := strconv.Atoi(yyDollar[2].token.Value); err == nil { @@ -5717,7 +5648,7 @@ yydefault: } case 477: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2560 + //line php7/php7.y:2520 { identifier := node.NewIdentifier(yyDollar[1].token.Value) positions.AddPosition(identifier, positionBuilder.NewTokenPosition(yyDollar[1].token)) @@ -5729,7 +5660,7 @@ yydefault: } case 478: yyDollar = yyS[yypt-5 : yypt+1] - //line parser/php7.y:2573 + //line php7/php7.y:2533 { yyVAL.node = expr.NewIsset(yyDollar[3].list) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[5].token)) @@ -5737,7 +5668,7 @@ yydefault: } case 479: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:2579 + //line php7/php7.y:2539 { yyVAL.node = expr.NewEmpty(yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) @@ -5745,7 +5676,7 @@ yydefault: } case 480: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:2585 + //line php7/php7.y:2545 { yyVAL.node = expr.NewInclude(yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) @@ -5753,7 +5684,7 @@ yydefault: } case 481: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:2591 + //line php7/php7.y:2551 { yyVAL.node = expr.NewIncludeOnce(yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) @@ -5761,7 +5692,7 @@ yydefault: } case 482: yyDollar = yyS[yypt-4 : yypt+1] - //line parser/php7.y:2597 + //line php7/php7.y:2557 { yyVAL.node = expr.NewEval(yyDollar[3].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokensPosition(yyDollar[1].token, yyDollar[4].token)) @@ -5769,7 +5700,7 @@ yydefault: } case 483: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:2603 + //line php7/php7.y:2563 { yyVAL.node = expr.NewRequire(yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) @@ -5777,7 +5708,7 @@ yydefault: } case 484: yyDollar = yyS[yypt-2 : yypt+1] - //line parser/php7.y:2609 + //line php7/php7.y:2569 { yyVAL.node = expr.NewRequireOnce(yyDollar[2].node) positions.AddPosition(yyVAL.node, positionBuilder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node)) @@ -5785,19 +5716,19 @@ yydefault: } case 485: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2617 + //line php7/php7.y:2577 { yyVAL.list = []node.Node{yyDollar[1].node} } case 486: yyDollar = yyS[yypt-3 : yypt+1] - //line parser/php7.y:2618 + //line php7/php7.y:2578 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) } case 487: yyDollar = yyS[yypt-1 : yypt+1] - //line parser/php7.y:2622 + //line php7/php7.y:2582 { yyVAL.node = yyDollar[1].node } diff --git a/parser/php7.y b/php7/php7.y similarity index 98% rename from parser/php7.y rename to php7/php7.y index 58327d2..280cbe2 100644 --- a/parser/php7.y +++ b/php7/php7.y @@ -1,10 +1,10 @@ %{ -package parser +package php7 import ( - "io" "strings" "strconv" + "github.com/z7zmey/php-parser/token" "github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node/scalar" @@ -14,51 +14,8 @@ import ( "github.com/z7zmey/php-parser/node/expr/assign_op" "github.com/z7zmey/php-parser/node/expr/binary_op" "github.com/z7zmey/php-parser/node/expr/cast" - "github.com/z7zmey/php-parser/comment" - "github.com/z7zmey/php-parser/position" ) -var rootnode node.Node -var comments comment.Comments -var positions position.Positions -var positionBuilder position.Builder - -func ParsePhp7(src io.Reader, fName string) (node.Node, comment.Comments, position.Positions) { - yyDebug = 0 - yyErrorVerbose = true - rootnode = stmt.NewStmtList([]node.Node{}) //reset - comments = comment.Comments{} - positions = position.Positions{} - positionBuilder = position.Builder{&positions} - yyParse(newLexer(src, fName)) - return rootnode, comments, positions -} - -func ListGetFirstNodeComments(list []node.Node) []comment.Comment { - if len(list) == 0 { - return nil - } - - node := list[0] - - return comments[node] -} - -type foreachVariable struct { - node node.Node - byRef bool -} - -type nodesWithEndToken struct { - nodes []node.Node - endToken token.Token -} - -type boolWithToken struct { - value bool - token *token.Token -} - %} %union{ @@ -71,40 +28,6 @@ type boolWithToken struct { str string } -%left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE -%left ',' -%left T_LOGICAL_OR -%left T_LOGICAL_XOR -%left T_LOGICAL_AND -%right T_PRINT -%right T_YIELD -%right T_DOUBLE_ARROW -%right T_YIELD_FROM -%left '=' T_PLUS_EQUAL T_MINUS_EQUAL T_MUL_EQUAL T_DIV_EQUAL T_CONCAT_EQUAL T_MOD_EQUAL T_AND_EQUAL T_OR_EQUAL T_XOR_EQUAL T_SL_EQUAL T_SR_EQUAL T_POW_EQUAL -%left '?' ':' -%right T_COALESCE -%left T_BOOLEAN_OR -%left T_BOOLEAN_AND -%left '|' -%left '^' -%left '&' -%nonassoc T_IS_EQUAL T_IS_NOT_EQUAL T_IS_IDENTICAL T_IS_NOT_IDENTICAL T_SPACESHIP -%nonassoc '<' T_IS_SMALLER_OR_EQUAL '>' T_IS_GREATER_OR_EQUAL -%left T_SL T_SR -%left '+' '-' '.' -%left '*' '/' '%' -%right '!' -%nonassoc T_INSTANCEOF -%right '~' T_INC T_DEC T_INT_CAST T_DOUBLE_CAST T_STRING_CAST T_ARRAY_CAST T_OBJECT_CAST T_BOOL_CAST T_UNSET_CAST '@' -%right T_POW -%right '[' -%nonassoc T_NEW T_CLONE -%left T_NOELSE -%left T_ELSEIF -%left T_ELSE -%left T_ENDIF -%right T_STATIC T_ABSTRACT T_FINAL T_PRIVATE T_PROTECTED T_PUBLIC - %type $unk %token T_INCLUDE %token T_INCLUDE_ONCE @@ -216,6 +139,9 @@ type boolWithToken struct { %token T_OBJECT_CAST %token T_BOOL_CAST %token T_UNSET_CAST +%token T_COALESCE +%token T_SPACESHIP +%token T_NOELSE %token '"' %token '`' %token '{' @@ -235,6 +161,40 @@ type boolWithToken struct { %token '@' %token '$' +%left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE +%left ',' +%left T_LOGICAL_OR +%left T_LOGICAL_XOR +%left T_LOGICAL_AND +%right T_PRINT +%right T_YIELD +%right T_DOUBLE_ARROW +%right T_YIELD_FROM +%left '=' T_PLUS_EQUAL T_MINUS_EQUAL T_MUL_EQUAL T_DIV_EQUAL T_CONCAT_EQUAL T_MOD_EQUAL T_AND_EQUAL T_OR_EQUAL T_XOR_EQUAL T_SL_EQUAL T_SR_EQUAL T_POW_EQUAL +%left '?' ':' +%right T_COALESCE +%left T_BOOLEAN_OR +%left T_BOOLEAN_AND +%left '|' +%left '^' +%left '&' +%nonassoc T_IS_EQUAL T_IS_NOT_EQUAL T_IS_IDENTICAL T_IS_NOT_IDENTICAL T_SPACESHIP +%nonassoc '<' T_IS_SMALLER_OR_EQUAL '>' T_IS_GREATER_OR_EQUAL +%left T_SL T_SR +%left '+' '-' '.' +%left '*' '/' '%' +%right '!' +%nonassoc T_INSTANCEOF +%right '~' T_INC T_DEC T_INT_CAST T_DOUBLE_CAST T_STRING_CAST T_ARRAY_CAST T_OBJECT_CAST T_BOOL_CAST T_UNSET_CAST '@' +%right T_POW +%right '[' +%nonassoc T_NEW T_CLONE +%left T_NOELSE +%left T_ELSEIF +%left T_ELSE +%left T_ENDIF +%right T_STATIC T_ABSTRACT T_FINAL T_PRIVATE T_PROTECTED T_PUBLIC + %type is_reference is_variadic returns_ref %type reserved_non_modifiers @@ -942,7 +902,7 @@ while_statement: if_stmt_without_else: T_IF '(' expr ')' statement { - $$ = stmt.NewIf($3, $5) + $$ = stmt.NewIf($3, $5, nil, nil) positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $5)) comments.AddComments($$, $1.Comments()) } @@ -975,7 +935,7 @@ alt_if_stmt_without_else: { stmts := stmt.NewStmtList($6) positions.AddPosition(stmts, positionBuilder.NewNodeListPosition($6)) - $$ = stmt.NewAltIf($3, stmts) + $$ = stmt.NewAltIf($3, stmts, nil, nil) positions.AddPosition($$, positionBuilder.NewTokenNodeListPosition($1, $6)) comments.AddComments(stmts, $5.Comments()) @@ -1132,13 +1092,13 @@ non_empty_argument_list: argument: expr { - $$ = node.NewArgument($1, false) + $$ = node.NewArgument($1, false, false) positions.AddPosition($$, positionBuilder.NewNodePosition($1)) comments.AddComments($$, comments[$1]) } | T_ELLIPSIS expr { - $$ = node.NewArgument($2, true) + $$ = node.NewArgument($2, true, false) positions.AddPosition($$, positionBuilder.NewTokenNodePosition($1, $2)) comments.AddComments($$, $1.Comments()) } @@ -1952,7 +1912,7 @@ expr_without_variable: ; backup_doc_comment: - /* empty */ { $$ = yylex.(*lexer).phpDocComment; yylex.(*lexer).phpDocComment = "" } + /* empty */ { $$ = yylex.(*lexer).PhpDocComment; yylex.(*lexer).PhpDocComment = "" } ; returns_ref: diff --git a/scanner/lexer.go b/scanner/lexer.go new file mode 100644 index 0000000..d63bc3d --- /dev/null +++ b/scanner/lexer.go @@ -0,0 +1,260 @@ +package scanner + +import ( + "bufio" + "bytes" + "go/token" + "io" + "unicode" + + "github.com/cznic/golex/lex" + "github.com/z7zmey/php-parser/comment" + t "github.com/z7zmey/php-parser/token" +) + +// Allocate Character classes anywhere in [0x80, 0xFF]. +const ( + classUnicodeLeter = iota + 0x80 + classUnicodeDigit + classUnicodeGraphic + classOther +) + +const T_INCLUDE = 57346 +const T_INCLUDE_ONCE = 57347 +const T_EXIT = 57348 +const T_IF = 57349 +const T_LNUMBER = 57350 +const T_DNUMBER = 57351 +const T_STRING = 57352 +const T_STRING_VARNAME = 57353 +const T_VARIABLE = 57354 +const T_NUM_STRING = 57355 +const T_INLINE_HTML = 57356 +const T_CHARACTER = 57357 +const T_BAD_CHARACTER = 57358 +const T_ENCAPSED_AND_WHITESPACE = 57359 +const T_CONSTANT_ENCAPSED_STRING = 57360 +const T_ECHO = 57361 +const T_DO = 57362 +const T_WHILE = 57363 +const T_ENDWHILE = 57364 +const T_FOR = 57365 +const T_ENDFOR = 57366 +const T_FOREACH = 57367 +const T_ENDFOREACH = 57368 +const T_DECLARE = 57369 +const T_ENDDECLARE = 57370 +const T_AS = 57371 +const T_SWITCH = 57372 +const T_ENDSWITCH = 57373 +const T_CASE = 57374 +const T_DEFAULT = 57375 +const T_BREAK = 57376 +const T_CONTINUE = 57377 +const T_GOTO = 57378 +const T_FUNCTION = 57379 +const T_CONST = 57380 +const T_RETURN = 57381 +const T_TRY = 57382 +const T_CATCH = 57383 +const T_FINALLY = 57384 +const T_THROW = 57385 +const T_USE = 57386 +const T_INSTEADOF = 57387 +const T_GLOBAL = 57388 +const T_VAR = 57389 +const T_UNSET = 57390 +const T_ISSET = 57391 +const T_EMPTY = 57392 +const T_HALT_COMPILER = 57393 +const T_CLASS = 57394 +const T_TRAIT = 57395 +const T_INTERFACE = 57396 +const T_EXTENDS = 57397 +const T_IMPLEMENTS = 57398 +const T_OBJECT_OPERATOR = 57399 +const T_DOUBLE_ARROW = 57400 +const T_LIST = 57401 +const T_ARRAY = 57402 +const T_CALLABLE = 57403 +const T_CLASS_C = 57404 +const T_TRAIT_C = 57405 +const T_METHOD_C = 57406 +const T_FUNC_C = 57407 +const T_LINE = 57408 +const T_FILE = 57409 +const T_COMMENT = 57410 +const T_DOC_COMMENT = 57411 +const T_OPEN_TAG = 57412 +const T_OPEN_TAG_WITH_ECHO = 57413 +const T_CLOSE_TAG = 57414 +const T_WHITESPACE = 57415 +const T_START_HEREDOC = 57416 +const T_END_HEREDOC = 57417 +const T_DOLLAR_OPEN_CURLY_BRACES = 57418 +const T_CURLY_OPEN = 57419 +const T_PAAMAYIM_NEKUDOTAYIM = 57420 +const T_NAMESPACE = 57421 +const T_NS_C = 57422 +const T_DIR = 57423 +const T_NS_SEPARATOR = 57424 +const T_ELLIPSIS = 57425 +const T_EVAL = 57426 +const T_REQUIRE = 57427 +const T_REQUIRE_ONCE = 57428 +const T_LOGICAL_OR = 57429 +const T_LOGICAL_XOR = 57430 +const T_LOGICAL_AND = 57431 +const T_INSTANCEOF = 57432 +const T_NEW = 57433 +const T_CLONE = 57434 +const T_ELSEIF = 57435 +const T_ELSE = 57436 +const T_ENDIF = 57437 +const T_PRINT = 57438 +const T_YIELD = 57439 +const T_STATIC = 57440 +const T_ABSTRACT = 57441 +const T_FINAL = 57442 +const T_PRIVATE = 57443 +const T_PROTECTED = 57444 +const T_PUBLIC = 57445 +const T_INC = 57446 +const T_DEC = 57447 +const T_YIELD_FROM = 57448 +const T_INT_CAST = 57449 +const T_DOUBLE_CAST = 57450 +const T_STRING_CAST = 57451 +const T_ARRAY_CAST = 57452 +const T_OBJECT_CAST = 57453 +const T_BOOL_CAST = 57454 +const T_UNSET_CAST = 57455 +const T_COALESCE = 57456 +const T_SPACESHIP = 57457 +const T_NOELSE = 57458 +const T_PLUS_EQUAL = 57459 +const T_MINUS_EQUAL = 57460 +const T_MUL_EQUAL = 57461 +const T_DIV_EQUAL = 57462 +const T_CONCAT_EQUAL = 57463 +const T_MOD_EQUAL = 57464 +const T_AND_EQUAL = 57465 +const T_OR_EQUAL = 57466 +const T_XOR_EQUAL = 57467 +const T_SL_EQUAL = 57468 +const T_SR_EQUAL = 57469 +const T_POW_EQUAL = 57470 +const T_BOOLEAN_OR = 57471 +const T_BOOLEAN_AND = 57472 +const T_IS_EQUAL = 57473 +const T_IS_NOT_EQUAL = 57474 +const T_IS_IDENTICAL = 57475 +const T_IS_NOT_IDENTICAL = 57476 +const T_IS_SMALLER_OR_EQUAL = 57477 +const T_IS_GREATER_OR_EQUAL = 57478 +const T_SL = 57479 +const T_SR = 57480 +const T_POW = 57481 + +type Lval interface { + Token(tkn t.Token) +} + +type Lexer struct { + *lex.Lexer + StateStack []int + PhpDocComment string + Comments []comment.Comment +} + +func Rune2Class(r rune) int { + if r >= 0 && r < 0x80 { // Keep ASCII as it is. + return int(r) + } + if unicode.IsLetter(r) { + return classUnicodeLeter + } + if unicode.IsDigit(r) { + return classUnicodeDigit + } + if unicode.IsGraphic(r) { + return classUnicodeGraphic + } + // return classOther + return -1 +} + +func NewLexer(src io.Reader, fName string) *Lexer { + file := token.NewFileSet().AddFile(fName, -1, 1<<31-1) + lx, err := lex.New(file, bufio.NewReader(src), lex.RuneClass(Rune2Class)) + if err != nil { + panic(err) + } + return &Lexer{lx, []int{0}, "", nil} +} + +func (l *Lexer) ungetChars(n int) []lex.Char { + l.Unget(l.Lookahead()) + + chars := l.Token() + + for i := 1; i <= n; i++ { + char := chars[len(chars)-i] + l.Unget(char) + } + + buf := l.Token() + buf = buf[:len(buf)-n] + + return buf +} + +func (l *Lexer) pushState(state int) { + l.StateStack = append(l.StateStack, state) +} + +func (l *Lexer) popState() { + len := len(l.StateStack) + if len <= 1 { + return + } + + l.StateStack = l.StateStack[:len-1] +} + +func (l *Lexer) begin(state int) { + len := len(l.StateStack) + l.StateStack = l.StateStack[:len-1] + l.StateStack = append(l.StateStack, state) +} + +func (l *Lexer) getCurrentState() int { + return l.StateStack[len(l.StateStack)-1] +} + +func (l *Lexer) newToken(chars []lex.Char) t.Token { + firstChar := chars[0] + lastChar := chars[len(chars)-1] + + startLine := l.File.Line(firstChar.Pos()) + endLine := l.File.Line(lastChar.Pos()) + startPos := int(firstChar.Pos()) + endPos := int(lastChar.Pos()) + + return t.NewToken(l.charsToBytes(chars), startLine, endLine, startPos, endPos).SetComments(l.Comments) +} + +func (l *Lexer) addComment(c comment.Comment) { + l.Comments = append(l.Comments, c) +} + +func (l *Lexer) charsToBytes(chars []lex.Char) []byte { + bytesBuf := bytes.Buffer{} + + for _, c := range chars { + bytesBuf.WriteRune(c.Rune) + } + + return bytesBuf.Bytes() +} diff --git a/parser/scanner.go b/scanner/scanner.go similarity index 96% rename from parser/scanner.go rename to scanner/scanner.go index 7d2d332..5aa7c3c 100644 --- a/parser/scanner.go +++ b/scanner/scanner.go @@ -6,12 +6,11 @@ // blame: jnml, labs.nic.cz -package parser +package scanner import ( "bytes" "fmt" - "github.com/cznic/golex/lex" "github.com/z7zmey/php-parser/comment" ) @@ -32,8 +31,8 @@ const ( var heredocLabel []lex.Char -func (l *lexer) Lex(lval *yySymType) int { - l.comments = nil +func (l *Lexer) Lex(lval Lval) int { + l.Comments = nil c := l.Enter() yystate0: @@ -7515,7 +7514,7 @@ yystate596: yyrule1: // [ \t\n\r]+ { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) goto yystate0 } yyrule2: // . @@ -7538,43 +7537,43 @@ yyrule2: // . } c = l.Next() } - lval.token = l.newToken(tb) + lval.Token(l.newToken(tb)) return T_INLINE_HTML } yyrule3: // \<\?php([ \t]|{NEW_LINE}) { l.begin(PHP) - lval.token = l.newToken(l.Token()) // return T_OPEN_TAG; + lval.Token(l.newToken(l.Token())) // return T_OPEN_TAG; goto yystate0 } yyrule4: // \<\? { l.begin(PHP) - lval.token = l.newToken(l.Token()) // return T_OPEN_TAG; + lval.Token(l.newToken(l.Token())) // return T_OPEN_TAG; goto yystate0 } yyrule5: // \<\?= { l.begin(PHP) - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_ECHO goto yystate0 } yyrule6: // [ \t\n\r]+ { - lval.token = l.newToken(l.Token()) // return T_WHITESPACE + lval.Token(l.newToken(l.Token())) // return T_WHITESPACE goto yystate0 } yyrule7: // \?\>{NEW_LINE}? { l.begin(INITIAL) - lval.token = l.newToken(l.Token()) - return rune2Class(';') + lval.Token(l.newToken(l.Token())) + return Rune2Class(';') goto yystate0 } yyrule8: // {DNUM}|{EXPONENT_DNUM} { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_DNUMBER goto yystate0 } @@ -7596,10 +7595,10 @@ yyrule9: // {BNUM} } } if len(tb)-i < 64 { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_LNUMBER } else { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_DNUMBER } goto yystate0 @@ -7608,10 +7607,10 @@ yyrule10: // {LNUM} { if len(l.Token()) < 20 { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_LNUMBER } else { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_DNUMBER } goto yystate0 @@ -7635,695 +7634,695 @@ yyrule11: // {HNUM} } length := len(tb) - i if length < 16 || (length == 16 && tb[i].Rune <= '7') { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_LNUMBER } else { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_DNUMBER } goto yystate0 } yyrule12: // abstract { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_ABSTRACT goto yystate0 } yyrule13: // array { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_ARRAY goto yystate0 } yyrule14: // as { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_AS goto yystate0 } yyrule15: // break { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_BREAK goto yystate0 } yyrule16: // callable { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_CALLABLE goto yystate0 } yyrule17: // case { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_CASE goto yystate0 } yyrule18: // catch { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_CATCH goto yystate0 } yyrule19: // class { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_CLASS goto yystate0 } yyrule20: // clone { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_CLONE goto yystate0 } yyrule21: // const { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_CONST goto yystate0 } yyrule22: // continue { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_CONTINUE goto yystate0 } yyrule23: // declare { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_DECLARE goto yystate0 } yyrule24: // default { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_DEFAULT goto yystate0 } yyrule25: // do { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_DO goto yystate0 } yyrule26: // echo { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_ECHO goto yystate0 } yyrule27: // else { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_ELSE goto yystate0 } yyrule28: // elseif { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_ELSEIF goto yystate0 } yyrule29: // empty { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_EMPTY goto yystate0 } yyrule30: // enddeclare { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_ENDDECLARE goto yystate0 } yyrule31: // endfor { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_ENDFOR goto yystate0 } yyrule32: // endforeach { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_ENDFOREACH goto yystate0 } yyrule33: // endif { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_ENDIF goto yystate0 } yyrule34: // endswitch { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_ENDSWITCH goto yystate0 } yyrule35: // endwhile { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_ENDWHILE goto yystate0 } yyrule36: // eval { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_EVAL goto yystate0 } yyrule37: // exit|die { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_EXIT goto yystate0 } yyrule38: // extends { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_EXTENDS goto yystate0 } yyrule39: // final { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_FINAL goto yystate0 } yyrule40: // finally { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_FINALLY goto yystate0 } yyrule41: // for { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_FOR goto yystate0 } yyrule42: // foreach { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_FOREACH goto yystate0 } yyrule43: // function|cfunction { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_FUNCTION goto yystate0 } yyrule44: // global { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_GLOBAL goto yystate0 } yyrule45: // goto { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_GOTO goto yystate0 } yyrule46: // if { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_IF goto yystate0 } yyrule47: // isset { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_ISSET goto yystate0 } yyrule48: // implements { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_IMPLEMENTS goto yystate0 } yyrule49: // instanceof { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_INSTANCEOF goto yystate0 } yyrule50: // insteadof { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_INSTEADOF goto yystate0 } yyrule51: // interface { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_INTERFACE goto yystate0 } yyrule52: // list { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_LIST goto yystate0 } yyrule53: // namespace { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_NAMESPACE goto yystate0 } yyrule54: // private { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_PRIVATE goto yystate0 } yyrule55: // public { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_PUBLIC goto yystate0 } yyrule56: // print { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_PRINT goto yystate0 } yyrule57: // protected { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_PROTECTED goto yystate0 } yyrule58: // return { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_RETURN goto yystate0 } yyrule59: // static { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_STATIC goto yystate0 } yyrule60: // switch { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_SWITCH goto yystate0 } yyrule61: // throw { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_THROW goto yystate0 } yyrule62: // trait { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_TRAIT goto yystate0 } yyrule63: // try { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_TRY goto yystate0 } yyrule64: // unset { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_UNSET goto yystate0 } yyrule65: // use { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_USE goto yystate0 } yyrule66: // var { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_VAR goto yystate0 } yyrule67: // while { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_WHILE goto yystate0 } yyrule68: // yield[ \t\n\r]+from[^a-zA-Z0-9_\x80-\xff] { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_YIELD_FROM goto yystate0 } yyrule69: // yield { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_YIELD goto yystate0 } yyrule70: // include { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_INCLUDE goto yystate0 } yyrule71: // include_once { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_INCLUDE_ONCE goto yystate0 } yyrule72: // require { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_REQUIRE goto yystate0 } yyrule73: // require_once { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_REQUIRE_ONCE goto yystate0 } yyrule74: // __CLASS__ { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_CLASS_C goto yystate0 } yyrule75: // __DIR__ { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_DIR goto yystate0 } yyrule76: // __FILE__ { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_FILE goto yystate0 } yyrule77: // __FUNCTION__ { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_FUNC_C goto yystate0 } yyrule78: // __LINE__ { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_LINE goto yystate0 } yyrule79: // __NAMESPACE__ { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_NS_C goto yystate0 } yyrule80: // __METHOD__ { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_METHOD_C goto yystate0 } yyrule81: // __TRAIT__ { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_TRAIT_C goto yystate0 } yyrule82: // __halt_compiler { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_HALT_COMPILER goto yystate0 } yyrule83: // \([ \t]*array[ \t]*\) { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_ARRAY_CAST goto yystate0 } yyrule84: // \([ \t]*(bool|boolean)[ \t]*\) { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_BOOL_CAST goto yystate0 } yyrule85: // \([ \t]*(real|double|float)[ \t]*\) { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_DOUBLE_CAST goto yystate0 } yyrule86: // \([ \t]*(int|integer)[ \t]*\) { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_INT_CAST goto yystate0 } yyrule87: // \([ \t]*object[ \t]*\) { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_OBJECT_CAST goto yystate0 } yyrule88: // \([ \t]*string[ \t]*\) { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_STRING_CAST goto yystate0 } yyrule89: // \([ \t]*unset[ \t]*\) { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_UNSET_CAST goto yystate0 } yyrule90: // new { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_NEW goto yystate0 } yyrule91: // and { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_LOGICAL_AND goto yystate0 } yyrule92: // or { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_LOGICAL_OR goto yystate0 } yyrule93: // xor { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_LOGICAL_XOR goto yystate0 } yyrule94: // \\ { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_NS_SEPARATOR goto yystate0 } yyrule95: // \.\.\. { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_ELLIPSIS goto yystate0 } yyrule96: // :: { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_PAAMAYIM_NEKUDOTAYIM // T_DOUBLE_COLON goto yystate0 } yyrule97: // && { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_BOOLEAN_AND goto yystate0 } yyrule98: // \|\| { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_BOOLEAN_OR goto yystate0 } yyrule99: // &= { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_AND_EQUAL goto yystate0 } yyrule100: // \|= { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_OR_EQUAL goto yystate0 } yyrule101: // \.= { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_CONCAT_EQUAL goto yystate0 } yyrule102: // \*= { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_MUL_EQUAL goto yystate0 } yyrule103: // \*\*= { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_POW_EQUAL goto yystate0 } yyrule104: // [/]= { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_DIV_EQUAL goto yystate0 } yyrule105: // \+= { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_PLUS_EQUAL goto yystate0 } yyrule106: // -= { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_MINUS_EQUAL goto yystate0 } yyrule107: // \^= { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_XOR_EQUAL goto yystate0 } yyrule108: // %= { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_MOD_EQUAL goto yystate0 } yyrule109: // -- { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_DEC goto yystate0 } yyrule110: // \+\+ { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_INC goto yystate0 } yyrule111: // => { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_DOUBLE_ARROW goto yystate0 } yyrule112: // \<=\> { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_SPACESHIP goto yystate0 } yyrule113: // \!=|\<\> { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_IS_NOT_EQUAL goto yystate0 } yyrule114: // \!== { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_IS_NOT_IDENTICAL goto yystate0 } yyrule115: // == { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_IS_EQUAL goto yystate0 } yyrule116: // === { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_IS_IDENTICAL goto yystate0 } yyrule117: // \<\<= { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_SL_EQUAL goto yystate0 } yyrule118: // \>\>= { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_SR_EQUAL goto yystate0 } yyrule119: // \>= { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_IS_GREATER_OR_EQUAL goto yystate0 } yyrule120: // \<= { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_IS_SMALLER_OR_EQUAL goto yystate0 } yyrule121: // \*\* { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_POW goto yystate0 } yyrule122: // \<\< { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_SL goto yystate0 } yyrule123: // \>\> { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_SR goto yystate0 } yyrule124: // \?\? { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_COALESCE goto yystate0 } yyrule125: // (#|[/][/]).*{NEW_LINE} { - lval.token = l.newToken(l.Token()) // return T_COMMENT; // TODO: handle ?> + lval.Token(l.newToken(l.Token())) // return T_COMMENT; // TODO: handle ?> goto yystate0 } yyrule126: // ([/][*])|([/][*][*]) @@ -8333,7 +8332,7 @@ yyrule126: // ([/][*])|([/][*][*]) is_doc_comment := false if len(tb) > 2 { is_doc_comment = true - l.phpDocComment = "" + l.PhpDocComment = "" } for { if c == -1 { @@ -8346,9 +8345,9 @@ yyrule126: // ([/][*])|([/][*][*]) break } } - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) if is_doc_comment { - l.phpDocComment = string(l.TokenBytes(nil)) + l.PhpDocComment = string(l.TokenBytes(nil)) l.addComment(comment.NewDocComment(string(l.TokenBytes(nil)))) // return T_DOC_COMMENT } else { @@ -8359,60 +8358,60 @@ yyrule126: // ([/][*])|([/][*][*]) } yyrule127: // {OPERATORS} { - lval.token = l.newToken(l.Token()) - return rune2Class(rune(l.TokenBytes(nil)[0])) + lval.Token(l.newToken(l.Token())) + return Rune2Class(rune(l.TokenBytes(nil)[0])) goto yystate0 } yyrule128: // \{ { l.pushState(PHP) - lval.token = l.newToken(l.Token()) - return rune2Class(rune(l.TokenBytes(nil)[0])) + lval.Token(l.newToken(l.Token())) + return Rune2Class(rune(l.TokenBytes(nil)[0])) goto yystate0 } yyrule129: // \} { l.popState() - lval.token = l.newToken(l.Token()) - return rune2Class(rune(l.TokenBytes(nil)[0])) - l.phpDocComment = "" + lval.Token(l.newToken(l.Token())) + return Rune2Class(rune(l.TokenBytes(nil)[0])) + l.PhpDocComment = "" goto yystate0 } yyrule130: // \${VAR_NAME} { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_VARIABLE goto yystate0 } yyrule131: // {VAR_NAME} { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_STRING goto yystate0 } yyrule132: // -> { l.begin(PROPERTY) - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_OBJECT_OPERATOR goto yystate0 } yyrule133: // [ \t\n\r]+ { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_WHITESPACE goto yystate0 } yyrule134: // -> { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_OBJECT_OPERATOR goto yystate0 } yyrule135: // {VAR_NAME} { l.begin(PHP) - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_STRING goto yystate0 } @@ -8424,22 +8423,22 @@ yyrule136: // . } yyrule137: // [\']([^\\\']*([\\].)*)*[\'] { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_CONSTANT_ENCAPSED_STRING goto yystate0 } yyrule138: // ` { l.begin(BACKQUOTE) - lval.token = l.newToken(l.Token()) - return rune2Class(rune(l.TokenBytes(nil)[0])) + lval.Token(l.newToken(l.Token())) + return Rune2Class(rune(l.TokenBytes(nil)[0])) goto yystate0 } yyrule139: // ` { l.begin(PHP) - lval.token = l.newToken(l.Token()) - return rune2Class(rune(l.TokenBytes(nil)[0])) + lval.Token(l.newToken(l.Token())) + return Rune2Class(rune(l.TokenBytes(nil)[0])) goto yystate0 } yyrule140: // [b]?\<\<\<[ \t]*({VAR_NAME}|([']{VAR_NAME}['])|(["]{VAR_NAME}["])){NEW_LINE} @@ -8495,7 +8494,7 @@ yyrule140: // [b]?\<\<\<[ \t]*({VAR_NAME}|([']{VAR_NAME}['])|(["]{VAR_NAME}["])) } } l.ungetChars(ungetCnt) - lval.token = l.newToken(tb) + lval.Token(l.newToken(tb)) return T_START_HEREDOC } yyrule141: // .|[ \t\n\r] @@ -8526,20 +8525,20 @@ yyrule141: // .|[ \t\n\r] } c = l.Next() } - lval.token = l.newToken(tb) + lval.Token(l.newToken(tb)) return T_ENCAPSED_AND_WHITESPACE } yyrule142: // {VAR_NAME}\; { l.begin(PHP) - lval.token = l.newToken(l.ungetChars(1)) + lval.Token(l.newToken(l.ungetChars(1))) return T_END_HEREDOC goto yystate0 } yyrule143: // {VAR_NAME} { l.begin(PHP) - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_END_HEREDOC goto yystate0 } @@ -8556,8 +8555,8 @@ yyrule144: // [b]?[\"] l.ungetChars(len(l.Token()) - cnt) chars := l.Token()[:cnt] l.pushState(STRING) - lval.token = l.newToken(chars) - return rune2Class('"') + lval.Token(l.newToken(chars)) + return Rune2Class('"') } F: for { @@ -8567,7 +8566,7 @@ yyrule144: // [b]?[\"] switch c { case '"': c = l.Next() - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_CONSTANT_ENCAPSED_STRING break F @@ -8596,13 +8595,13 @@ yyrule144: // [b]?[\"] yyrule145: // \" { l.popState() - lval.token = l.newToken(l.Token()) - return rune2Class(l.Token()[0].Rune) + lval.Token(l.newToken(l.Token())) + return Rune2Class(l.Token()[0].Rune) goto yystate0 } yyrule146: // \{\$ { - lval.token = l.newToken(l.ungetChars(1)) + lval.Token(l.newToken(l.ungetChars(1))) l.pushState(PHP) return T_CURLY_OPEN goto yystate0 @@ -8610,7 +8609,7 @@ yyrule146: // \{\$ yyrule147: // \$\{ { l.pushState(STRING_VAR_NAME) - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_DOLLAR_OPEN_CURLY_BRACES goto yystate0 } @@ -8630,7 +8629,7 @@ yyrule149: // .|[ \t\n\r] } switch c { case '"': - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_ENCAPSED_AND_WHITESPACE break F1 @@ -8639,7 +8638,7 @@ yyrule149: // .|[ \t\n\r] if rune(c) == '{' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z' || c >= '\u007f' && c <= 'ÿ' { l.ungetChars(1) tb := l.Token() - lval.token = l.newToken(tb[:len(tb)-1]) + lval.Token(l.newToken(tb[:len(tb)-1])) return T_ENCAPSED_AND_WHITESPACE break F1 } @@ -8650,7 +8649,7 @@ yyrule149: // .|[ \t\n\r] if rune(c) == '$' { l.ungetChars(1) tb := l.Token() - lval.token = l.newToken(tb[:len(tb)-1]) + lval.Token(l.newToken(tb[:len(tb)-1])) return T_ENCAPSED_AND_WHITESPACE break F1 } @@ -8672,7 +8671,7 @@ yyrule150: // .|[ \t\n\r] } switch c { case '`': - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_ENCAPSED_AND_WHITESPACE break F2 @@ -8681,7 +8680,7 @@ yyrule150: // .|[ \t\n\r] if rune(c) == '{' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z' || c >= '\u007f' && c <= 'ÿ' { l.ungetChars(1) tb := l.Token() - lval.token = l.newToken(tb[:len(tb)-1]) + lval.Token(l.newToken(tb[:len(tb)-1])) return T_ENCAPSED_AND_WHITESPACE break F2 } @@ -8692,7 +8691,7 @@ yyrule150: // .|[ \t\n\r] if rune(c) == '$' { l.ungetChars(1) tb := l.Token() - lval.token = l.newToken(tb[:len(tb)-1]) + lval.Token(l.newToken(tb[:len(tb)-1])) return T_ENCAPSED_AND_WHITESPACE break F2 } @@ -8759,33 +8758,33 @@ yyrule151: // .|[ \t\n\r] c = l.Next() } - lval.token = l.newToken(tb) + lval.Token(l.newToken(tb)) return T_ENCAPSED_AND_WHITESPACE } yyrule152: // \${VAR_NAME} { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_VARIABLE goto yystate0 } yyrule153: // ->{VAR_NAME} { - lval.token = l.newToken(l.ungetChars(len(l.Token()) - 2)) + lval.Token(l.newToken(l.ungetChars(len(l.Token()) - 2))) return T_OBJECT_OPERATOR goto yystate0 } yyrule154: // {VAR_NAME} { l.popState() - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_STRING goto yystate0 } yyrule155: // \[ { l.pushState(STRING_VAR_INDEX) - lval.token = l.newToken(l.Token()) - return rune2Class(rune(l.TokenBytes(nil)[0])) + lval.Token(l.newToken(l.Token())) + return Rune2Class(rune(l.TokenBytes(nil)[0])) goto yystate0 } yyrule156: // .|[ \t\n\r] @@ -8796,19 +8795,19 @@ yyrule156: // .|[ \t\n\r] } yyrule157: // {LNUM}|{HNUM}|{BNUM} { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_NUM_STRING goto yystate0 } yyrule158: // \${VAR_NAME} { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_VARIABLE goto yystate0 } yyrule159: // {VAR_NAME} { - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_STRING goto yystate0 } @@ -8816,35 +8815,35 @@ yyrule160: // \] { l.popState() l.popState() - lval.token = l.newToken(l.Token()) - return rune2Class(rune(l.TokenBytes(nil)[0])) + lval.Token(l.newToken(l.Token())) + return Rune2Class(rune(l.TokenBytes(nil)[0])) goto yystate0 } yyrule161: // [ \n\r\t\\'#] { l.popState() l.popState() - lval.token = l.newToken(l.Token()) + lval.Token(l.newToken(l.Token())) return T_ENCAPSED_AND_WHITESPACE goto yystate0 } yyrule162: // {OPERATORS} { - lval.token = l.newToken(l.Token()) - return rune2Class(rune(l.TokenBytes(nil)[0])) + lval.Token(l.newToken(l.Token())) + return Rune2Class(rune(l.TokenBytes(nil)[0])) goto yystate0 } yyrule163: // . { - lval.token = l.newToken(l.Token()) - return rune2Class(rune(l.TokenBytes(nil)[0])) + lval.Token(l.newToken(l.Token())) + return Rune2Class(rune(l.TokenBytes(nil)[0])) goto yystate0 } yyrule164: // {VAR_NAME}[\[\}] { l.popState() l.pushState(PHP) - lval.token = l.newToken(l.ungetChars(1)) + lval.Token(l.newToken(l.ungetChars(1))) return T_STRING_VARNAME goto yystate0 } diff --git a/scanner/scanner.l b/scanner/scanner.l new file mode 100644 index 0000000..ab15768 --- /dev/null +++ b/scanner/scanner.l @@ -0,0 +1,609 @@ +%{ +// Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// blame: jnml, labs.nic.cz + +package scanner + +import ( + "fmt" + "bytes" + "github.com/cznic/golex/lex" + "github.com/z7zmey/php-parser/comment" +) + +const ( + INITIAL = iota + PHP + STRING + STRING_VAR + STRING_VAR_INDEX + STRING_VAR_NAME + PROPERTY + HEREDOC_END + NOWDOC + HEREDOC + BACKQUOTE +) + +var heredocLabel []lex.Char + +func (l *Lexer) Lex(lval Lval) int { + l.Comments = nil + c := l.Enter() + +%} + +%s PHP STRING STRING_VAR STRING_VAR_INDEX STRING_VAR_NAME PROPERTY HEREDOC_END NOWDOC HEREDOC BACKQUOTE + +%yyb last == '\n' || last = '\0' +%yyt l.getCurrentState() +%yyc c +%yyn c = l.Next() +%yym l.Mark() +%optioncase-insensitive + +LNUM [0-9]+ +DNUM ([0-9]*"."[0-9]+)|([0-9]+"."[0-9]*) +HNUM 0x[0-9a-fA-F]+ +BNUM 0b[01]+ +EXPONENT_DNUM (({LNUM}|{DNUM})[eE][+-]?{LNUM}) +VAR_NAME [a-zA-Z_\x7f-\xff^0-9/][a-zA-Z0-9_\x7f-\xff]* +OPERATORS [;:,.\[\]()|\/\^&\+-*=%!~$<>?@] +NEW_LINE (\r|\n|\r\n) + +%% + c = l.Rule0() + +[ \t\n\r]+ lval.Token(l.newToken(l.Token())); +. + tb := []lex.Char{} + + for { + if c == -1 { + tb = l.Token(); + break; + } + + if '?' == rune(c) { + tb = l.Token(); + if (len(tb) < 2 || tb[len(tb)-1].Rune != '<') { + c = l.Next() + continue; + } + + tb = l.ungetChars(1) + break; + } + + c = l.Next() + } + + lval.Token(l.newToken(tb)) + return T_INLINE_HTML + +\<\?php([ \t]|{NEW_LINE}) l.begin(PHP);lval.Token(l.newToken(l.Token()));// return T_OPEN_TAG; +\<\? l.begin(PHP);lval.Token(l.newToken(l.Token()));// return T_OPEN_TAG; +\<\?= l.begin(PHP);lval.Token(l.newToken(l.Token())); return T_ECHO; + +[ \t\n\r]+ lval.Token(l.newToken(l.Token()));// return T_WHITESPACE +\?\>{NEW_LINE}? l.begin(INITIAL);lval.Token(l.newToken(l.Token())); return Rune2Class(';'); + +{DNUM}|{EXPONENT_DNUM} lval.Token(l.newToken(l.Token())); return T_DNUMBER +{BNUM} + tb := l.Token() + i:=2 + BNUMFOR:for { + if i > len(tb)-1 { + break BNUMFOR; + } + switch tb[i].Rune { + case '0': i++; + default: break BNUMFOR; + } + } + if len(tb) - i < 64 { + lval.Token(l.newToken(l.Token())); return T_LNUMBER + } else { + lval.Token(l.newToken(l.Token())); return T_DNUMBER + } +{LNUM} + if len(l.Token()) < 20 { + lval.Token(l.newToken(l.Token())); return T_LNUMBER + } else { + lval.Token(l.newToken(l.Token())); return T_DNUMBER + } +{HNUM} + tb := l.Token() + i:=2 + HNUMFOR:for { + if i > len(tb)-1 { + break HNUMFOR; + } + switch tb[i].Rune { + case '0': i++; + default: break HNUMFOR; + } + } + length := len(tb) - i + if length < 16 || (length == 16 && tb[i].Rune <= '7') { + lval.Token(l.newToken(l.Token())); return T_LNUMBER + } else { + lval.Token(l.newToken(l.Token())); return T_DNUMBER + } + +abstract lval.Token(l.newToken(l.Token())); return T_ABSTRACT +array lval.Token(l.newToken(l.Token())); return T_ARRAY +as lval.Token(l.newToken(l.Token())); return T_AS +break lval.Token(l.newToken(l.Token())); return T_BREAK +callable lval.Token(l.newToken(l.Token())); return T_CALLABLE +case lval.Token(l.newToken(l.Token())); return T_CASE +catch lval.Token(l.newToken(l.Token())); return T_CATCH +class lval.Token(l.newToken(l.Token())); return T_CLASS +clone lval.Token(l.newToken(l.Token())); return T_CLONE +const lval.Token(l.newToken(l.Token())); return T_CONST; +continue lval.Token(l.newToken(l.Token())); return T_CONTINUE; +declare lval.Token(l.newToken(l.Token())); return T_DECLARE; +default lval.Token(l.newToken(l.Token())); return T_DEFAULT; +do lval.Token(l.newToken(l.Token())); return T_DO; +echo lval.Token(l.newToken(l.Token())); return T_ECHO; +else lval.Token(l.newToken(l.Token())); return T_ELSE; +elseif lval.Token(l.newToken(l.Token())); return T_ELSEIF; +empty lval.Token(l.newToken(l.Token())); return T_EMPTY; +enddeclare lval.Token(l.newToken(l.Token())); return T_ENDDECLARE +endfor lval.Token(l.newToken(l.Token())); return T_ENDFOR +endforeach lval.Token(l.newToken(l.Token())); return T_ENDFOREACH +endif lval.Token(l.newToken(l.Token())); return T_ENDIF +endswitch lval.Token(l.newToken(l.Token())); return T_ENDSWITCH +endwhile lval.Token(l.newToken(l.Token())); return T_ENDWHILE +eval lval.Token(l.newToken(l.Token())); return T_EVAL +exit|die lval.Token(l.newToken(l.Token())); return T_EXIT +extends lval.Token(l.newToken(l.Token())); return T_EXTENDS +final lval.Token(l.newToken(l.Token())); return T_FINAL +finally lval.Token(l.newToken(l.Token())); return T_FINALLY +for lval.Token(l.newToken(l.Token())); return T_FOR +foreach lval.Token(l.newToken(l.Token())); return T_FOREACH +function|cfunction lval.Token(l.newToken(l.Token())); return T_FUNCTION +global lval.Token(l.newToken(l.Token())); return T_GLOBAL +goto lval.Token(l.newToken(l.Token())); return T_GOTO +if lval.Token(l.newToken(l.Token())); return T_IF +isset lval.Token(l.newToken(l.Token())); return T_ISSET +implements lval.Token(l.newToken(l.Token())); return T_IMPLEMENTS +instanceof lval.Token(l.newToken(l.Token())); return T_INSTANCEOF +insteadof lval.Token(l.newToken(l.Token())); return T_INSTEADOF +interface lval.Token(l.newToken(l.Token())); return T_INTERFACE +list lval.Token(l.newToken(l.Token())); return T_LIST +namespace lval.Token(l.newToken(l.Token())); return T_NAMESPACE +private lval.Token(l.newToken(l.Token())); return T_PRIVATE +public lval.Token(l.newToken(l.Token())); return T_PUBLIC +print lval.Token(l.newToken(l.Token())); return T_PRINT +protected lval.Token(l.newToken(l.Token())); return T_PROTECTED +return lval.Token(l.newToken(l.Token())); return T_RETURN +static lval.Token(l.newToken(l.Token())); return T_STATIC +switch lval.Token(l.newToken(l.Token())); return T_SWITCH +throw lval.Token(l.newToken(l.Token())); return T_THROW +trait lval.Token(l.newToken(l.Token())); return T_TRAIT +try lval.Token(l.newToken(l.Token())); return T_TRY +unset lval.Token(l.newToken(l.Token())); return T_UNSET +use lval.Token(l.newToken(l.Token())); return T_USE +var lval.Token(l.newToken(l.Token())); return T_VAR +while lval.Token(l.newToken(l.Token())); return T_WHILE +yield[ \t\n\r]+from[^a-zA-Z0-9_\x80-\xff] lval.Token(l.newToken(l.Token())); return T_YIELD_FROM +yield lval.Token(l.newToken(l.Token())); return T_YIELD +include lval.Token(l.newToken(l.Token())); return T_INCLUDE +include_once lval.Token(l.newToken(l.Token())); return T_INCLUDE_ONCE +require lval.Token(l.newToken(l.Token())); return T_REQUIRE +require_once lval.Token(l.newToken(l.Token())); return T_REQUIRE_ONCE +__CLASS__ lval.Token(l.newToken(l.Token())); return T_CLASS_C +__DIR__ lval.Token(l.newToken(l.Token())); return T_DIR +__FILE__ lval.Token(l.newToken(l.Token())); return T_FILE +__FUNCTION__ lval.Token(l.newToken(l.Token())); return T_FUNC_C +__LINE__ lval.Token(l.newToken(l.Token())); return T_LINE +__NAMESPACE__ lval.Token(l.newToken(l.Token())); return T_NS_C +__METHOD__ lval.Token(l.newToken(l.Token())); return T_METHOD_C +__TRAIT__ lval.Token(l.newToken(l.Token())); return T_TRAIT_C +__halt_compiler lval.Token(l.newToken(l.Token())); return T_HALT_COMPILER +\([ \t]*array[ \t]*\) lval.Token(l.newToken(l.Token())); return T_ARRAY_CAST +\([ \t]*(bool|boolean)[ \t]*\) lval.Token(l.newToken(l.Token())); return T_BOOL_CAST +\([ \t]*(real|double|float)[ \t]*\) lval.Token(l.newToken(l.Token())); return T_DOUBLE_CAST +\([ \t]*(int|integer)[ \t]*\) lval.Token(l.newToken(l.Token())); return T_INT_CAST +\([ \t]*object[ \t]*\) lval.Token(l.newToken(l.Token())); return T_OBJECT_CAST +\([ \t]*string[ \t]*\) lval.Token(l.newToken(l.Token())); return T_STRING_CAST +\([ \t]*unset[ \t]*\) lval.Token(l.newToken(l.Token())); return T_UNSET_CAST +new lval.Token(l.newToken(l.Token())); return T_NEW +and lval.Token(l.newToken(l.Token())); return T_LOGICAL_AND +or lval.Token(l.newToken(l.Token())); return T_LOGICAL_OR +xor lval.Token(l.newToken(l.Token())); return T_LOGICAL_XOR +\\ lval.Token(l.newToken(l.Token())); return T_NS_SEPARATOR +\.\.\. lval.Token(l.newToken(l.Token())); return T_ELLIPSIS; +:: lval.Token(l.newToken(l.Token())); return T_PAAMAYIM_NEKUDOTAYIM; // T_DOUBLE_COLON +&& lval.Token(l.newToken(l.Token())); return T_BOOLEAN_AND +\|\| lval.Token(l.newToken(l.Token())); return T_BOOLEAN_OR +&= lval.Token(l.newToken(l.Token())); return T_AND_EQUAL +\|= lval.Token(l.newToken(l.Token())); return T_OR_EQUAL +\.= lval.Token(l.newToken(l.Token())); return T_CONCAT_EQUAL; +\*= lval.Token(l.newToken(l.Token())); return T_MUL_EQUAL +\*\*= lval.Token(l.newToken(l.Token())); return T_POW_EQUAL +[/]= lval.Token(l.newToken(l.Token())); return T_DIV_EQUAL; +\+= lval.Token(l.newToken(l.Token())); return T_PLUS_EQUAL +-= lval.Token(l.newToken(l.Token())); return T_MINUS_EQUAL +\^= lval.Token(l.newToken(l.Token())); return T_XOR_EQUAL +%= lval.Token(l.newToken(l.Token())); return T_MOD_EQUAL +-- lval.Token(l.newToken(l.Token())); return T_DEC; +\+\+ lval.Token(l.newToken(l.Token())); return T_INC +=> lval.Token(l.newToken(l.Token())); return T_DOUBLE_ARROW; +\<=\> lval.Token(l.newToken(l.Token())); return T_SPACESHIP +\!=|\<\> lval.Token(l.newToken(l.Token())); return T_IS_NOT_EQUAL +\!== lval.Token(l.newToken(l.Token())); return T_IS_NOT_IDENTICAL +== lval.Token(l.newToken(l.Token())); return T_IS_EQUAL +=== lval.Token(l.newToken(l.Token())); return T_IS_IDENTICAL +\<\<= lval.Token(l.newToken(l.Token())); return T_SL_EQUAL +\>\>= lval.Token(l.newToken(l.Token())); return T_SR_EQUAL +\>= lval.Token(l.newToken(l.Token())); return T_IS_GREATER_OR_EQUAL +\<= lval.Token(l.newToken(l.Token())); return T_IS_SMALLER_OR_EQUAL +\*\* lval.Token(l.newToken(l.Token())); return T_POW +\<\< lval.Token(l.newToken(l.Token())); return T_SL +\>\> lval.Token(l.newToken(l.Token())); return T_SR +\?\? lval.Token(l.newToken(l.Token())); return T_COALESCE +(#|[/][/]).*{NEW_LINE} lval.Token(l.newToken(l.Token()));// return T_COMMENT; // TODO: handle ?> +([/][*])|([/][*][*]) + tb := l.Token() + is_doc_comment := false + if len(tb) > 2 { + is_doc_comment = true + l.PhpDocComment = "" + } + + for { + if c == -1 { + break; // TODO: Unterminated comment starting line %d + } + + p := c + c = l.Next() + + if rune(p) == '*' && rune(c) == '/' { + c = l.Next() + break; + } + } + + lval.Token(l.newToken(l.Token())) + if is_doc_comment { + l.PhpDocComment = string(l.TokenBytes(nil)) + l.addComment(comment.NewDocComment(string(l.TokenBytes(nil)))) + // return T_DOC_COMMENT + } else { + l.addComment(comment.NewPlainComment(string(l.TokenBytes(nil)))) + // return T_COMMENT + } + +{OPERATORS} lval.Token(l.newToken(l.Token())); return Rune2Class(rune(l.TokenBytes(nil)[0])) + +\{ l.pushState(PHP); lval.Token(l.newToken(l.Token())); return Rune2Class(rune(l.TokenBytes(nil)[0])) +\} l.popState(); lval.Token(l.newToken(l.Token())); return Rune2Class(rune(l.TokenBytes(nil)[0])); l.PhpDocComment = "" +\${VAR_NAME} lval.Token(l.newToken(l.Token())); return T_VARIABLE +{VAR_NAME} lval.Token(l.newToken(l.Token())); return T_STRING + +-> l.begin(PROPERTY);lval.Token(l.newToken(l.Token())); return T_OBJECT_OPERATOR; +[ \t\n\r]+ lval.Token(l.newToken(l.Token())); return T_WHITESPACE; +-> lval.Token(l.newToken(l.Token())); return T_OBJECT_OPERATOR; +{VAR_NAME} l.begin(PHP);lval.Token(l.newToken(l.Token())); return T_STRING; +. l.ungetChars(1);l.begin(PHP) + +[\']([^\\\']*([\\].)*)*[\'] lval.Token(l.newToken(l.Token())); return T_CONSTANT_ENCAPSED_STRING; + +` l.begin(BACKQUOTE); lval.Token(l.newToken(l.Token())); return Rune2Class(rune(l.TokenBytes(nil)[0])) +` l.begin(PHP); lval.Token(l.newToken(l.Token())); return Rune2Class(rune(l.TokenBytes(nil)[0])) + +[b]?\<\<\<[ \t]*({VAR_NAME}|([']{VAR_NAME}['])|(["]{VAR_NAME}["])){NEW_LINE} + tb := l.Token() + binPrefix := 0 + if tb[0].Rune == 'b' { + binPrefix = 1 + } + + lblFirst := 3 + binPrefix + lblLast := len(tb)-2 + if tb[lblLast].Rune == '\r' { + lblLast-- + } + + for { + if tb[lblFirst].Rune == ' ' || tb[lblFirst].Rune == '\t' { + lblFirst++ + continue + } + + break + } + + switch tb[lblFirst].Rune { + case '\'' : + lblFirst++ + lblLast-- + l.begin(NOWDOC) + case '"' : + lblFirst++ + lblLast-- + l.begin(HEREDOC) + default: + l.begin(HEREDOC) + } + + heredocLabel = make([]lex.Char, lblLast - lblFirst + 1) + copy(heredocLabel, tb[lblFirst:lblLast+1]) + + ungetCnt := len(heredocLabel) + searchLabelAhead := []lex.Char{} + for i := 0; i < len(heredocLabel); i++ { + if c == -1 { + break; + } + searchLabelAhead = append(searchLabelAhead, l.Lookahead()) + c = l.Next() + } + + if bytes.Equal(l.charsToBytes(heredocLabel), l.charsToBytes(searchLabelAhead)) && ';' == rune(c) { + ungetCnt++ + c = l.Next() + if '\n' == rune(c) || '\r' == rune(c) { + l.begin(HEREDOC_END) + } + } + + l.ungetChars(ungetCnt) + + lval.Token(l.newToken(tb)); + return T_START_HEREDOC + +.|[ \t\n\r] + searchLabel := []byte{} + tb := []lex.Char{} + + for { + if c == -1 { + break; + } + + if '\n' == rune(c) || '\r' == rune(c) { + if bytes.Equal(append(l.charsToBytes(heredocLabel), ';'), searchLabel) { + l.begin(HEREDOC_END) + tb = l.ungetChars(len(heredocLabel)+1) + break; + } + + if bytes.Equal(l.charsToBytes(heredocLabel), searchLabel) { + l.begin(HEREDOC_END) + tb = l.ungetChars(len(heredocLabel)) + break; + } + + searchLabel = []byte{} + } else { + searchLabel = append(searchLabel, byte(rune(c))) + } + + c = l.Next() + } + + lval.Token(l.newToken(tb) ) + return T_ENCAPSED_AND_WHITESPACE + +{VAR_NAME}\; l.begin(PHP);lval.Token(l.newToken(l.ungetChars(1))); return T_END_HEREDOC +{VAR_NAME} l.begin(PHP);lval.Token(l.newToken(l.Token())); return T_END_HEREDOC + +[b]?[\"] + binPrefix := l.Token()[0].Rune == 'b' + + beginString := func() int { + cnt := 1; if (binPrefix) {cnt = 2} + + l.ungetChars(len(l.Token())-cnt) + chars := l.Token()[:cnt] + l.pushState(STRING) + + lval.Token(l.newToken(chars)); return Rune2Class('"') + } + + F:for { + if c == -1 { + break; + } + + switch c { + case '"' : + c = l.Next(); + lval.Token(l.newToken(l.Token())); return T_CONSTANT_ENCAPSED_STRING + break F; + + case '$': + c = l.Next(); + if rune(c) == '{' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z' || c >= '\u007f' && c <= 'ÿ' { + return beginString() + break F; + } + l.ungetChars(0) + + case '{': + c = l.Next(); + if rune(c) == '$' { + return beginString() + break F; + } + l.ungetChars(0) + + case '\\': + c = l.Next(); + } + + c = l.Next() + } + +\" l.popState(); lval.Token(l.newToken(l.Token())); return Rune2Class(l.Token()[0].Rune) +\{\$ lval.Token(l.newToken(l.ungetChars(1))); l.pushState(PHP); return T_CURLY_OPEN +\$\{ l.pushState(STRING_VAR_NAME); lval.Token(l.newToken(l.Token())); return T_DOLLAR_OPEN_CURLY_BRACES +\$ l.ungetChars(1);l.pushState(STRING_VAR) +.|[ \t\n\r] + F1:for { + if c == -1 { + break; + } + + switch c { + case '"' : + lval.Token(l.newToken(l.Token())); + return T_ENCAPSED_AND_WHITESPACE + break F1; + + case '$': + c = l.Next(); + if rune(c) == '{' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z' || c >= '\u007f' && c <= 'ÿ' { + l.ungetChars(1) + tb := l.Token() + lval.Token(l.newToken(tb[:len(tb)-1])); + return T_ENCAPSED_AND_WHITESPACE + break F1; + } + l.ungetChars(0) + + case '{': + c = l.Next(); + if rune(c) == '$' { + l.ungetChars(1) + tb := l.Token() + lval.Token(l.newToken(tb[:len(tb)-1])); + return T_ENCAPSED_AND_WHITESPACE + break F1; + } + l.ungetChars(0) + + case '\\': + c = l.Next(); + } + + c = l.Next() + } + +.|[ \t\n\r] + F2:for { + if c == -1 { + break; + } + + switch c { + case '`' : + lval.Token(l.newToken(l.Token())); + return T_ENCAPSED_AND_WHITESPACE + break F2; + + case '$': + c = l.Next(); + if rune(c) == '{' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z' || c >= '\u007f' && c <= 'ÿ' { + l.ungetChars(1) + tb := l.Token() + lval.Token(l.newToken(tb[:len(tb)-1])); + return T_ENCAPSED_AND_WHITESPACE + break F2; + } + l.ungetChars(0) + + case '{': + c = l.Next(); + if rune(c) == '$' { + l.ungetChars(1) + tb := l.Token() + lval.Token(l.newToken(tb[:len(tb)-1])); + return T_ENCAPSED_AND_WHITESPACE + break F2; + } + l.ungetChars(0) + + case '\\': + c = l.Next(); + } + + c = l.Next() + } + +.|[ \t\n\r] + searchLabel := []byte{} + tb := []lex.Char{} + + HEREDOCFOR:for { + if c == -1 { + break; + } + + switch c { + case '\n': fallthrough + case '\r': + if bytes.Equal(append(l.charsToBytes(heredocLabel), ';'), searchLabel) { + l.begin(HEREDOC_END) + tb = l.ungetChars(len(heredocLabel)+1) + break HEREDOCFOR; + } + + if bytes.Equal(l.charsToBytes(heredocLabel), searchLabel) { + l.begin(HEREDOC_END) + tb = l.ungetChars(len(heredocLabel)) + break HEREDOCFOR; + } + + searchLabel = []byte{} + + case '$': + c = l.Next(); + if rune(c) == '{' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z' || c >= '\u007f' && c <= 'ÿ' { + tb = l.ungetChars(1) + break HEREDOCFOR; + } + l.ungetChars(0) + searchLabel = []byte{} + + case '{': + c = l.Next(); + if rune(c) == '$' { + tb = l.ungetChars(1) + break HEREDOCFOR; + } + l.ungetChars(0) + searchLabel = []byte{} + + case '\\': + c = l.Next(); + searchLabel = []byte{} + + default: + searchLabel = append(searchLabel, byte(rune(c))) + } + + c = l.Next() + } + + lval.Token(l.newToken(tb)); + return T_ENCAPSED_AND_WHITESPACE + +\${VAR_NAME} lval.Token(l.newToken(l.Token())); return T_VARIABLE +->{VAR_NAME} lval.Token(l.newToken(l.ungetChars(len(l.Token())-2))); return T_OBJECT_OPERATOR +{VAR_NAME} l.popState();lval.Token(l.newToken(l.Token())); return T_STRING +\[ l.pushState(STRING_VAR_INDEX);lval.Token(l.newToken(l.Token())); return Rune2Class(rune(l.TokenBytes(nil)[0])) +.|[ \t\n\r] l.ungetChars(1);l.popState() + +{LNUM}|{HNUM}|{BNUM} lval.Token(l.newToken(l.Token())); return T_NUM_STRING +\${VAR_NAME} lval.Token(l.newToken(l.Token())); return T_VARIABLE +{VAR_NAME} lval.Token(l.newToken(l.Token())); return T_STRING +\] l.popState(); l.popState();lval.Token(l.newToken(l.Token())); return Rune2Class(rune(l.TokenBytes(nil)[0])) +[ \n\r\t\\'#] l.popState(); l.popState();lval.Token(l.newToken(l.Token())); return T_ENCAPSED_AND_WHITESPACE +{OPERATORS} lval.Token(l.newToken(l.Token())); return Rune2Class(rune(l.TokenBytes(nil)[0])) +. lval.Token(l.newToken(l.Token())); return Rune2Class(rune(l.TokenBytes(nil)[0])) + +{VAR_NAME}[\[\}] l.popState();l.pushState(PHP);lval.Token(l.newToken(l.ungetChars(1))); return T_STRING_VARNAME +. l.ungetChars(1);l.popState();l.pushState(PHP) + +%% + if c, ok := l.Abort(); ok { return int(c) } + goto yyAction +} \ No newline at end of file diff --git a/dumper.go b/visitor/dumper.go similarity index 98% rename from dumper.go rename to visitor/dumper.go index da02e3b..8e3995c 100644 --- a/dumper.go +++ b/visitor/dumper.go @@ -1,4 +1,4 @@ -package main +package visitor import ( "fmt"