feat/schema: additional literal types
This commit is contained in:
@@ -2,6 +2,7 @@ package ast
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"azalea/schema/token"
|
"azalea/schema/token"
|
||||||
|
"azalea/schema/util"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
@@ -15,26 +16,41 @@ type Expr struct {
|
|||||||
}
|
}
|
||||||
type ValList []Val
|
type ValList []Val
|
||||||
type Val struct {
|
type Val struct {
|
||||||
string string
|
string *string
|
||||||
number string
|
rune *rune
|
||||||
name string
|
int *int64
|
||||||
|
float *float64
|
||||||
|
imaginary *complex128
|
||||||
|
name *string
|
||||||
*Expr
|
*Expr
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewExprList(expr any) (ExprList, error) {
|
|
||||||
return ExprList{expr.(Expr)}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewStringVal(val *token.Token) (Val, error) {
|
func NewStringVal(val *token.Token) (Val, error) {
|
||||||
return Val{string: string(val.Lit)}, nil
|
s, err := strconv.Unquote(string(val.Lit))
|
||||||
|
return Val{string: &s}, err
|
||||||
|
}
|
||||||
|
func NewRuneVal(val *token.Token) (Val, error) {
|
||||||
|
r := util.RuneValue(val.Lit)
|
||||||
|
return Val{rune: &r}, nil
|
||||||
|
}
|
||||||
|
func NewIntVal(val *token.Token) (Val, error) {
|
||||||
|
i, err := strconv.ParseInt(string(val.Lit), 0, 64)
|
||||||
|
return Val{int: &i}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewNumberVal(val *token.Token) (Val, error) {
|
func NewFloatVal(val *token.Token) (Val, error) {
|
||||||
return Val{number: string(val.Lit)}, nil
|
f, err := strconv.ParseFloat(string(val.Lit), 64)
|
||||||
|
return Val{float: &f}, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewComplexVal(val *token.Token) (Val, error) {
|
||||||
|
c, err := strconv.ParseComplex(string(val.Lit), 128)
|
||||||
|
return Val{imaginary: &c}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewNameVal(val *token.Token) (Val, error) {
|
func NewNameVal(val *token.Token) (Val, error) {
|
||||||
return Val{name: string(val.Lit)}, nil
|
name := string(val.Lit)
|
||||||
|
return Val{name: &name}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewExprVal(val any) (Val, error) {
|
func NewExprVal(val any) (Val, error) {
|
||||||
@@ -42,6 +58,10 @@ func NewExprVal(val any) (Val, error) {
|
|||||||
return Val{Expr: &expr}, nil
|
return Val{Expr: &expr}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func NewExprList(expr any) (ExprList, error) {
|
||||||
|
return ExprList{expr.(Expr)}, nil
|
||||||
|
}
|
||||||
|
|
||||||
func AppendExpr(exprList, expr any) (ExprList, error) {
|
func AppendExpr(exprList, expr any) (ExprList, error) {
|
||||||
return append(exprList.(ExprList), expr.(Expr)), nil
|
return append(exprList.(ExprList), expr.(Expr)), nil
|
||||||
}
|
}
|
||||||
@@ -100,15 +120,23 @@ func (e Expr) String() string {
|
|||||||
return sb.String()
|
return sb.String()
|
||||||
}
|
}
|
||||||
func (v *Val) String() string {
|
func (v *Val) String() string {
|
||||||
if v.string != "" {
|
if v.string != nil {
|
||||||
return v.string
|
return *v.string
|
||||||
}
|
}
|
||||||
if v.number != "" {
|
if v.rune != nil {
|
||||||
num, _ := strconv.ParseInt(v.number, 0, 64)
|
return string(*v.rune)
|
||||||
return strconv.FormatInt(num, 10)
|
|
||||||
}
|
}
|
||||||
if v.name != "" {
|
if v.int != nil {
|
||||||
return v.name
|
return strconv.FormatInt(*v.int, 10)
|
||||||
|
}
|
||||||
|
if v.float != nil {
|
||||||
|
return strconv.FormatFloat(*v.float, 'g', -1, 64)
|
||||||
|
}
|
||||||
|
if v.imaginary != nil {
|
||||||
|
return strconv.FormatComplex(*v.imaginary, 'g', -1, 128)
|
||||||
|
}
|
||||||
|
if v.name != nil {
|
||||||
|
return *v.name
|
||||||
}
|
}
|
||||||
if v.Expr != nil {
|
if v.Expr != nil {
|
||||||
return v.Expr.String()
|
return v.Expr.String()
|
||||||
|
|||||||
@@ -1,15 +1,43 @@
|
|||||||
string: '`' {.} '`' | '"' {.} '"';
|
_raw_string: '`' {.} '`';
|
||||||
|
_interpreted_string: '"' {.} '"';
|
||||||
|
string: _raw_string | _interpreted_string;
|
||||||
|
|
||||||
|
_unicode_value: . | _little_u_value | _big_u_value | _escaped_char;
|
||||||
|
_byte_value: _octal_byte_value | _hex_byte_value;
|
||||||
|
_little_u_value: '\\' 'u' _hex_digit _hex_digit _hex_digit _hex_digit;
|
||||||
|
_big_u_value: '\\' 'U' _hex_digit _hex_digit _hex_digit _hex_digit _hex_digit _hex_digit _hex_digit _hex_digit;
|
||||||
|
_escaped_char: '\\' ('a' | 'b' | 'f' | 'n' | 'r' | 't' | 'v' | '\\' | '\'' | '"');
|
||||||
|
_octal_byte_value: '\\' _oct_digit _oct_digit _oct_digit;
|
||||||
|
_hex_byte_value: '\\' 'x' _hex_digit _hex_digit;
|
||||||
|
rune: '\'' (_unicode_value | _byte_value) '\'';
|
||||||
|
|
||||||
_bin_digit: '0' - '1';
|
_bin_digit: '0' - '1';
|
||||||
|
_bin_digits: _bin_digit {_bin_digit | '_'};
|
||||||
_oct_digit: _bin_digit | '2' - '7';
|
_oct_digit: _bin_digit | '2' - '7';
|
||||||
|
_oct_digits: _oct_digit {_oct_digit | '_'};
|
||||||
_dec_digit: _oct_digit | '8' - '9';
|
_dec_digit: _oct_digit | '8' - '9';
|
||||||
|
_dec_digits: _dec_digit {_dec_digit | '_'};
|
||||||
_hex_digit: _dec_digit | 'A' - 'F' | 'a' - 'f';
|
_hex_digit: _dec_digit | 'A' - 'F' | 'a' - 'f';
|
||||||
number: ['-' | '+'] '0' 'b' _bin_digit {_bin_digit | '_'}
|
_hex_digits: _hex_digit {_hex_digit | '_'};
|
||||||
| ['-' | '+'] '0' 'o' _oct_digit {_oct_digit | '_'}
|
|
||||||
| ['-' | '+'] _dec_digit {_dec_digit | '_'}
|
|
||||||
| ['-' | '+'] '0' 'x' _hex_digit {_hex_digit | '_'};
|
|
||||||
|
|
||||||
_name_initial: 'A' - 'Z' | 'a' - 'z' | '_' | '~' | '!' | '@' | '#' | '$' | '%' | '^' | '&' | '*' | '-' | '_' | '+' | '=' | '?' | '/' | '.' | '\'';
|
_int: ['-' | '+'] '0' ('b' | 'B') _bin_digits
|
||||||
|
| ['-' | '+'] '0' ('o' | 'O') _oct_digits
|
||||||
|
| ['-' | '+'] _dec_digits
|
||||||
|
| ['-' | '+'] '0' ('x' | 'X') _hex_digits;
|
||||||
|
int: _int;
|
||||||
|
_dec_exponent: ('e' | 'E') ['+' | '-'] _dec_digits;
|
||||||
|
_dec_float: ['-' | '+'] _dec_digits '.' [_dec_digits] [_dec_exponent]
|
||||||
|
| _dec_digits _dec_exponent
|
||||||
|
| '.' _dec_digits [_dec_exponent];
|
||||||
|
|
||||||
|
_hex_exponent: ('p' | 'P') ['+' | '-'] _dec_digits;
|
||||||
|
_hex_mantissa: ['_'] _hex_digits '.' _hex_digits | ['_'] _hex_digits | '.' _hex_digits;
|
||||||
|
_hex_float: ['-' | '+'] '0' ('x' | 'X') _hex_mantissa _hex_exponent;
|
||||||
|
_float: _dec_float | _hex_float;
|
||||||
|
float: _float;
|
||||||
|
imaginary: (_dec_digits | _int | _float) 'i';
|
||||||
|
|
||||||
|
_name_initial: 'A' - 'Z' | 'a' - 'z' | '_' | '~' | '!' | '@' | '#' | '$' | '%' | '^' | '&' | '*' | '-' | '_' | '+' | '=' | '?' | '/' | '.';
|
||||||
_name_char: _name_initial | _dec_digit;
|
_name_char: _name_initial | _dec_digit;
|
||||||
name: _name_initial {_name_char};
|
name: _name_initial {_name_char};
|
||||||
|
|
||||||
@@ -33,7 +61,10 @@ ValList
|
|||||||
;
|
;
|
||||||
Val
|
Val
|
||||||
: string <<ast.NewStringVal($T0)>>
|
: string <<ast.NewStringVal($T0)>>
|
||||||
| number <<ast.NewNumberVal($T0)>>
|
| rune <<ast.NewRuneVal($T0)>>
|
||||||
|
| int <<ast.NewIntVal($T0)>>
|
||||||
|
| float <<ast.NewFloatVal($T0)>>
|
||||||
|
| imaginary <<ast.NewComplexVal($T0)>>
|
||||||
| name <<ast.NewNameVal($T0)>>
|
| name <<ast.NewNameVal($T0)>>
|
||||||
| Expr <<ast.NewExprVal($0)>>
|
| Expr <<ast.NewExprVal($0)>>
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ var ActTab = ActionTable{
|
|||||||
Ignore: "!whitespace",
|
Ignore: "!whitespace",
|
||||||
},
|
},
|
||||||
ActionRow{ // S2
|
ActionRow{ // S2
|
||||||
Accept: 4,
|
Accept: 7,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S3
|
ActionRow{ // S3
|
||||||
@@ -37,15 +37,15 @@ var ActTab = ActionTable{
|
|||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S4
|
ActionRow{ // S4
|
||||||
Accept: 5,
|
Accept: 0,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S5
|
ActionRow{ // S5
|
||||||
Accept: 6,
|
Accept: 8,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S6
|
ActionRow{ // S6
|
||||||
Accept: 4,
|
Accept: 9,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S7
|
ActionRow{ // S7
|
||||||
@@ -53,23 +53,23 @@ var ActTab = ActionTable{
|
|||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S8
|
ActionRow{ // S8
|
||||||
Accept: 3,
|
Accept: 10,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S9
|
ActionRow{ // S9
|
||||||
Accept: 3,
|
Accept: 4,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S10
|
ActionRow{ // S10
|
||||||
Accept: 3,
|
Accept: 4,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S11
|
ActionRow{ // S11
|
||||||
Accept: 3,
|
Accept: 4,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S12
|
ActionRow{ // S12
|
||||||
Accept: 0,
|
Accept: 4,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S13
|
ActionRow{ // S13
|
||||||
@@ -77,123 +77,123 @@ var ActTab = ActionTable{
|
|||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S14
|
ActionRow{ // S14
|
||||||
Accept: 4,
|
Accept: 0,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S15
|
ActionRow{ // S15
|
||||||
Accept: 4,
|
Accept: 7,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S16
|
ActionRow{ // S16
|
||||||
Accept: 4,
|
Accept: 7,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S17
|
ActionRow{ // S17
|
||||||
Accept: 4,
|
Accept: 7,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S18
|
ActionRow{ // S18
|
||||||
Accept: 2,
|
Accept: 7,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S19
|
ActionRow{ // S19
|
||||||
Accept: 3,
|
Accept: 2,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S20
|
ActionRow{ // S20
|
||||||
Accept: 3,
|
Accept: 0,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S21
|
ActionRow{ // S21
|
||||||
Accept: 3,
|
Accept: 0,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S22
|
ActionRow{ // S22
|
||||||
Accept: 3,
|
Accept: 4,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S23
|
ActionRow{ // S23
|
||||||
Accept: 3,
|
Accept: 4,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S24
|
ActionRow{ // S24
|
||||||
Accept: 0,
|
Accept: 4,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S25
|
ActionRow{ // S25
|
||||||
Accept: 0,
|
Accept: 4,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S26
|
ActionRow{ // S26
|
||||||
Accept: 0,
|
Accept: 5,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S27
|
ActionRow{ // S27
|
||||||
Accept: -1,
|
Accept: 5,
|
||||||
Ignore: "!comment",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S28
|
ActionRow{ // S28
|
||||||
Accept: 3,
|
Accept: 5,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S29
|
ActionRow{ // S29
|
||||||
Accept: 4,
|
Accept: 5,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S30
|
ActionRow{ // S30
|
||||||
Accept: 4,
|
Accept: 0,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S31
|
ActionRow{ // S31
|
||||||
Accept: 4,
|
Accept: 0,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S32
|
ActionRow{ // S32
|
||||||
Accept: 3,
|
Accept: 0,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S33
|
ActionRow{ // S33
|
||||||
Accept: 3,
|
Accept: 0,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S34
|
ActionRow{ // S34
|
||||||
Accept: 3,
|
Accept: 4,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S35
|
ActionRow{ // S35
|
||||||
Accept: 3,
|
Accept: 6,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S36
|
ActionRow{ // S36
|
||||||
Accept: 3,
|
Accept: -1,
|
||||||
Ignore: "",
|
Ignore: "!comment",
|
||||||
},
|
},
|
||||||
ActionRow{ // S37
|
ActionRow{ // S37
|
||||||
Accept: 3,
|
Accept: 2,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S38
|
ActionRow{ // S38
|
||||||
Accept: 3,
|
Accept: 0,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S39
|
ActionRow{ // S39
|
||||||
Accept: 3,
|
Accept: 0,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S40
|
ActionRow{ // S40
|
||||||
Accept: 3,
|
Accept: 0,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S41
|
ActionRow{ // S41
|
||||||
Accept: 3,
|
Accept: 0,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S42
|
ActionRow{ // S42
|
||||||
Accept: 3,
|
Accept: 0,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S43
|
ActionRow{ // S43
|
||||||
Accept: 3,
|
Accept: 0,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S44
|
ActionRow{ // S44
|
||||||
@@ -201,31 +201,667 @@ var ActTab = ActionTable{
|
|||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S45
|
ActionRow{ // S45
|
||||||
Accept: 3,
|
Accept: 5,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S46
|
ActionRow{ // S46
|
||||||
Accept: 3,
|
Accept: 7,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S47
|
ActionRow{ // S47
|
||||||
Accept: 3,
|
Accept: 7,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S48
|
ActionRow{ // S48
|
||||||
Accept: 3,
|
Accept: 7,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S49
|
ActionRow{ // S49
|
||||||
Accept: 3,
|
Accept: 4,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S50
|
ActionRow{ // S50
|
||||||
Accept: 3,
|
Accept: 6,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
ActionRow{ // S51
|
ActionRow{ // S51
|
||||||
Accept: 3,
|
Accept: 7,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S52
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S53
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S54
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S55
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S56
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S57
|
||||||
|
Accept: 4,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S58
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S59
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S60
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S61
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S62
|
||||||
|
Accept: 4,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S63
|
||||||
|
Accept: 4,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S64
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S65
|
||||||
|
Accept: 4,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S66
|
||||||
|
Accept: 4,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S67
|
||||||
|
Accept: 4,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S68
|
||||||
|
Accept: 4,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S69
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S70
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S71
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S72
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S73
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S74
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S75
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S76
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S77
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S78
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S79
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S80
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S81
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S82
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S83
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S84
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S85
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S86
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S87
|
||||||
|
Accept: 7,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S88
|
||||||
|
Accept: 4,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S89
|
||||||
|
Accept: 4,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S90
|
||||||
|
Accept: 4,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S91
|
||||||
|
Accept: 7,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S92
|
||||||
|
Accept: 4,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S93
|
||||||
|
Accept: 4,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S94
|
||||||
|
Accept: 4,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S95
|
||||||
|
Accept: 4,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S96
|
||||||
|
Accept: 7,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S97
|
||||||
|
Accept: 7,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S98
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S99
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S100
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S101
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S102
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S103
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S104
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S105
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S106
|
||||||
|
Accept: 4,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S107
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S108
|
||||||
|
Accept: 4,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S109
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S110
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S111
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S112
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S113
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S114
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S115
|
||||||
|
Accept: 4,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S116
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S117
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S118
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S119
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S120
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S121
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S122
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S123
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S124
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S125
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S126
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S127
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S128
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S129
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S130
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S131
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S132
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S133
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S134
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S135
|
||||||
|
Accept: 7,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S136
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S137
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S138
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S139
|
||||||
|
Accept: 4,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S140
|
||||||
|
Accept: 4,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S141
|
||||||
|
Accept: 7,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S142
|
||||||
|
Accept: 7,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S143
|
||||||
|
Accept: 7,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S144
|
||||||
|
Accept: 7,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S145
|
||||||
|
Accept: 7,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S146
|
||||||
|
Accept: 7,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S147
|
||||||
|
Accept: 4,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S148
|
||||||
|
Accept: 7,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S149
|
||||||
|
Accept: 7,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S150
|
||||||
|
Accept: 7,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S151
|
||||||
|
Accept: 7,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S152
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S153
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S154
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S155
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S156
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S157
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S158
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S159
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S160
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S161
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S162
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S163
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S164
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S165
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S166
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S167
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S168
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S169
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S170
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S171
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S172
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S173
|
||||||
|
Accept: 7,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S174
|
||||||
|
Accept: 7,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S175
|
||||||
|
Accept: 7,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S176
|
||||||
|
Accept: 7,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S177
|
||||||
|
Accept: 7,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S178
|
||||||
|
Accept: 7,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S179
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S180
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S181
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S182
|
||||||
|
Accept: 7,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S183
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S184
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S185
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S186
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S187
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S188
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S189
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S190
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S191
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S192
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S193
|
||||||
|
Accept: 7,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S194
|
||||||
|
Accept: 5,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S195
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S196
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S197
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S198
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S199
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S200
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S201
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S202
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S203
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S204
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S205
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S206
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S207
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S208
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S209
|
||||||
|
Accept: 0,
|
||||||
|
Ignore: "",
|
||||||
|
},
|
||||||
|
ActionRow{ // S210
|
||||||
|
Accept: 0,
|
||||||
Ignore: "",
|
Ignore: "",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
NoState = -1
|
NoState = -1
|
||||||
NumStates = 52
|
NumStates = 211
|
||||||
NumSymbols = 57
|
NumSymbols = 101
|
||||||
)
|
)
|
||||||
|
|
||||||
type Lexer struct {
|
type Lexer struct {
|
||||||
@@ -129,61 +129,105 @@ func (l *Lexer) Reset() {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
Lexer symbols:
|
Lexer symbols:
|
||||||
0: '`'
|
0: '''
|
||||||
1: '`'
|
1: '''
|
||||||
2: '"'
|
2: 'i'
|
||||||
3: '"'
|
3: '('
|
||||||
4: '-'
|
4: ')'
|
||||||
5: '+'
|
5: '.'
|
||||||
6: '0'
|
6: '`'
|
||||||
7: 'b'
|
7: '`'
|
||||||
8: '_'
|
8: '"'
|
||||||
9: '-'
|
9: '"'
|
||||||
10: '+'
|
10: '\'
|
||||||
11: '0'
|
11: 'u'
|
||||||
12: 'o'
|
12: '\'
|
||||||
13: '_'
|
13: 'U'
|
||||||
14: '-'
|
14: '\'
|
||||||
15: '+'
|
15: 'a'
|
||||||
16: '_'
|
16: 'b'
|
||||||
17: '-'
|
17: 'f'
|
||||||
18: '+'
|
18: 'n'
|
||||||
19: '0'
|
19: 'r'
|
||||||
20: 'x'
|
20: 't'
|
||||||
21: '_'
|
21: 'v'
|
||||||
22: '('
|
22: '\'
|
||||||
23: ')'
|
23: '''
|
||||||
24: '.'
|
24: '"'
|
||||||
25: '_'
|
25: '\'
|
||||||
26: '~'
|
26: '\'
|
||||||
27: '!'
|
27: 'x'
|
||||||
28: '@'
|
28: '_'
|
||||||
29: '#'
|
29: '_'
|
||||||
30: '$'
|
30: '_'
|
||||||
31: '%'
|
31: '_'
|
||||||
32: '^'
|
32: '-'
|
||||||
33: '&'
|
33: '+'
|
||||||
34: '*'
|
34: '0'
|
||||||
35: '-'
|
35: 'b'
|
||||||
36: '_'
|
36: 'B'
|
||||||
37: '+'
|
37: '-'
|
||||||
38: '='
|
38: '+'
|
||||||
39: '?'
|
39: '0'
|
||||||
40: '/'
|
40: 'o'
|
||||||
41: '.'
|
41: 'O'
|
||||||
42: '''
|
42: '-'
|
||||||
43: ' '
|
43: '+'
|
||||||
44: '\t'
|
44: '-'
|
||||||
45: '\n'
|
45: '+'
|
||||||
46: '\r'
|
46: '0'
|
||||||
47: ';'
|
47: 'x'
|
||||||
48: '\n'
|
48: 'X'
|
||||||
49: '0'-'1'
|
49: 'e'
|
||||||
50: '2'-'7'
|
50: 'E'
|
||||||
51: '8'-'9'
|
51: '+'
|
||||||
52: 'A'-'F'
|
52: '-'
|
||||||
53: 'a'-'f'
|
53: '-'
|
||||||
54: 'A'-'Z'
|
54: '+'
|
||||||
55: 'a'-'z'
|
55: '.'
|
||||||
56: .
|
56: '.'
|
||||||
|
57: 'p'
|
||||||
|
58: 'P'
|
||||||
|
59: '+'
|
||||||
|
60: '-'
|
||||||
|
61: '_'
|
||||||
|
62: '.'
|
||||||
|
63: '_'
|
||||||
|
64: '.'
|
||||||
|
65: '-'
|
||||||
|
66: '+'
|
||||||
|
67: '0'
|
||||||
|
68: 'x'
|
||||||
|
69: 'X'
|
||||||
|
70: '_'
|
||||||
|
71: '~'
|
||||||
|
72: '!'
|
||||||
|
73: '@'
|
||||||
|
74: '#'
|
||||||
|
75: '$'
|
||||||
|
76: '%'
|
||||||
|
77: '^'
|
||||||
|
78: '&'
|
||||||
|
79: '*'
|
||||||
|
80: '-'
|
||||||
|
81: '_'
|
||||||
|
82: '+'
|
||||||
|
83: '='
|
||||||
|
84: '?'
|
||||||
|
85: '/'
|
||||||
|
86: '.'
|
||||||
|
87: ' '
|
||||||
|
88: '\t'
|
||||||
|
89: '\n'
|
||||||
|
90: '\r'
|
||||||
|
91: ';'
|
||||||
|
92: '\n'
|
||||||
|
93: '0'-'1'
|
||||||
|
94: '2'-'7'
|
||||||
|
95: '8'-'9'
|
||||||
|
96: 'A'-'F'
|
||||||
|
97: 'a'-'f'
|
||||||
|
98: 'A'-'Z'
|
||||||
|
99: 'a'-'z'
|
||||||
|
100: .
|
||||||
*/
|
*/
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -17,7 +17,10 @@ var actionTab = actionTable{
|
|||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
nil, // string
|
nil, // string
|
||||||
nil, // number
|
nil, // rune
|
||||||
|
nil, // int
|
||||||
|
nil, // float
|
||||||
|
nil, // imaginary
|
||||||
nil, // name
|
nil, // name
|
||||||
shift(4), // (
|
shift(4), // (
|
||||||
nil, // )
|
nil, // )
|
||||||
@@ -30,7 +33,10 @@ var actionTab = actionTable{
|
|||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
accept(true), // ␚
|
accept(true), // ␚
|
||||||
nil, // string
|
nil, // string
|
||||||
nil, // number
|
nil, // rune
|
||||||
|
nil, // int
|
||||||
|
nil, // float
|
||||||
|
nil, // imaginary
|
||||||
nil, // name
|
nil, // name
|
||||||
nil, // (
|
nil, // (
|
||||||
nil, // )
|
nil, // )
|
||||||
@@ -43,7 +49,10 @@ var actionTab = actionTable{
|
|||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
reduce(1), // ␚, reduce: Schema
|
reduce(1), // ␚, reduce: Schema
|
||||||
nil, // string
|
nil, // string
|
||||||
nil, // number
|
nil, // rune
|
||||||
|
nil, // int
|
||||||
|
nil, // float
|
||||||
|
nil, // imaginary
|
||||||
nil, // name
|
nil, // name
|
||||||
shift(4), // (
|
shift(4), // (
|
||||||
nil, // )
|
nil, // )
|
||||||
@@ -56,7 +65,10 @@ var actionTab = actionTable{
|
|||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
reduce(2), // ␚, reduce: ExprList
|
reduce(2), // ␚, reduce: ExprList
|
||||||
nil, // string
|
nil, // string
|
||||||
nil, // number
|
nil, // rune
|
||||||
|
nil, // int
|
||||||
|
nil, // float
|
||||||
|
nil, // imaginary
|
||||||
nil, // name
|
nil, // name
|
||||||
reduce(2), // (, reduce: ExprList
|
reduce(2), // (, reduce: ExprList
|
||||||
nil, // )
|
nil, // )
|
||||||
@@ -69,7 +81,10 @@ var actionTab = actionTable{
|
|||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
nil, // string
|
nil, // string
|
||||||
nil, // number
|
nil, // rune
|
||||||
|
nil, // int
|
||||||
|
nil, // float
|
||||||
|
nil, // imaginary
|
||||||
shift(6), // name
|
shift(6), // name
|
||||||
nil, // (
|
nil, // (
|
||||||
nil, // )
|
nil, // )
|
||||||
@@ -82,7 +97,10 @@ var actionTab = actionTable{
|
|||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
reduce(3), // ␚, reduce: ExprList
|
reduce(3), // ␚, reduce: ExprList
|
||||||
nil, // string
|
nil, // string
|
||||||
nil, // number
|
nil, // rune
|
||||||
|
nil, // int
|
||||||
|
nil, // float
|
||||||
|
nil, // imaginary
|
||||||
nil, // name
|
nil, // name
|
||||||
reduce(3), // (, reduce: ExprList
|
reduce(3), // (, reduce: ExprList
|
||||||
nil, // )
|
nil, // )
|
||||||
@@ -95,10 +113,13 @@ var actionTab = actionTable{
|
|||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
shift(10), // string
|
shift(10), // string
|
||||||
shift(11), // number
|
shift(11), // rune
|
||||||
shift(12), // name
|
shift(12), // int
|
||||||
shift(13), // (
|
shift(13), // float
|
||||||
shift(14), // )
|
shift(14), // imaginary
|
||||||
|
shift(15), // name
|
||||||
|
shift(16), // (
|
||||||
|
shift(17), // )
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -108,9 +129,12 @@ var actionTab = actionTable{
|
|||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
shift(10), // string
|
shift(10), // string
|
||||||
shift(11), // number
|
shift(11), // rune
|
||||||
shift(12), // name
|
shift(12), // int
|
||||||
shift(13), // (
|
shift(13), // float
|
||||||
|
shift(14), // imaginary
|
||||||
|
shift(15), // name
|
||||||
|
shift(16), // (
|
||||||
nil, // )
|
nil, // )
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
@@ -120,11 +144,14 @@ var actionTab = actionTable{
|
|||||||
actions: [numSymbols]action{
|
actions: [numSymbols]action{
|
||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
reduce(9), // string, reduce: Val
|
reduce(12), // string, reduce: Val
|
||||||
reduce(9), // number, reduce: Val
|
reduce(12), // rune, reduce: Val
|
||||||
reduce(9), // name, reduce: Val
|
reduce(12), // int, reduce: Val
|
||||||
reduce(9), // (, reduce: Val
|
reduce(12), // float, reduce: Val
|
||||||
reduce(9), // ), reduce: Val
|
reduce(12), // imaginary, reduce: Val
|
||||||
|
reduce(12), // name, reduce: Val
|
||||||
|
reduce(12), // (, reduce: Val
|
||||||
|
reduce(12), // ), reduce: Val
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -133,11 +160,14 @@ var actionTab = actionTable{
|
|||||||
actions: [numSymbols]action{
|
actions: [numSymbols]action{
|
||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
shift(19), // string
|
shift(22), // string
|
||||||
shift(20), // number
|
shift(23), // rune
|
||||||
shift(21), // name
|
shift(24), // int
|
||||||
shift(22), // (
|
shift(25), // float
|
||||||
shift(23), // )
|
shift(26), // imaginary
|
||||||
|
shift(27), // name
|
||||||
|
shift(28), // (
|
||||||
|
shift(29), // )
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -147,7 +177,10 @@ var actionTab = actionTable{
|
|||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
reduce(6), // string, reduce: Val
|
reduce(6), // string, reduce: Val
|
||||||
reduce(6), // number, reduce: Val
|
reduce(6), // rune, reduce: Val
|
||||||
|
reduce(6), // int, reduce: Val
|
||||||
|
reduce(6), // float, reduce: Val
|
||||||
|
reduce(6), // imaginary, reduce: Val
|
||||||
reduce(6), // name, reduce: Val
|
reduce(6), // name, reduce: Val
|
||||||
reduce(6), // (, reduce: Val
|
reduce(6), // (, reduce: Val
|
||||||
reduce(6), // ), reduce: Val
|
reduce(6), // ), reduce: Val
|
||||||
@@ -160,7 +193,10 @@ var actionTab = actionTable{
|
|||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
reduce(7), // string, reduce: Val
|
reduce(7), // string, reduce: Val
|
||||||
reduce(7), // number, reduce: Val
|
reduce(7), // rune, reduce: Val
|
||||||
|
reduce(7), // int, reduce: Val
|
||||||
|
reduce(7), // float, reduce: Val
|
||||||
|
reduce(7), // imaginary, reduce: Val
|
||||||
reduce(7), // name, reduce: Val
|
reduce(7), // name, reduce: Val
|
||||||
reduce(7), // (, reduce: Val
|
reduce(7), // (, reduce: Val
|
||||||
reduce(7), // ), reduce: Val
|
reduce(7), // ), reduce: Val
|
||||||
@@ -173,7 +209,10 @@ var actionTab = actionTable{
|
|||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
reduce(8), // string, reduce: Val
|
reduce(8), // string, reduce: Val
|
||||||
reduce(8), // number, reduce: Val
|
reduce(8), // rune, reduce: Val
|
||||||
|
reduce(8), // int, reduce: Val
|
||||||
|
reduce(8), // float, reduce: Val
|
||||||
|
reduce(8), // imaginary, reduce: Val
|
||||||
reduce(8), // name, reduce: Val
|
reduce(8), // name, reduce: Val
|
||||||
reduce(8), // (, reduce: Val
|
reduce(8), // (, reduce: Val
|
||||||
reduce(8), // ), reduce: Val
|
reduce(8), // ), reduce: Val
|
||||||
@@ -185,24 +224,30 @@ var actionTab = actionTable{
|
|||||||
actions: [numSymbols]action{
|
actions: [numSymbols]action{
|
||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
nil, // string
|
reduce(9), // string, reduce: Val
|
||||||
nil, // number
|
reduce(9), // rune, reduce: Val
|
||||||
shift(24), // name
|
reduce(9), // int, reduce: Val
|
||||||
nil, // (
|
reduce(9), // float, reduce: Val
|
||||||
nil, // )
|
reduce(9), // imaginary, reduce: Val
|
||||||
shift(25), // .
|
reduce(9), // name, reduce: Val
|
||||||
|
reduce(9), // (, reduce: Val
|
||||||
|
reduce(9), // ), reduce: Val
|
||||||
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
actionRow{ // S14
|
actionRow{ // S14
|
||||||
canRecover: false,
|
canRecover: false,
|
||||||
actions: [numSymbols]action{
|
actions: [numSymbols]action{
|
||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
reduce(12), // ␚, reduce: Expr
|
nil, // ␚
|
||||||
nil, // string
|
reduce(10), // string, reduce: Val
|
||||||
nil, // number
|
reduce(10), // rune, reduce: Val
|
||||||
nil, // name
|
reduce(10), // int, reduce: Val
|
||||||
reduce(12), // (, reduce: Expr
|
reduce(10), // float, reduce: Val
|
||||||
nil, // )
|
reduce(10), // imaginary, reduce: Val
|
||||||
|
reduce(10), // name, reduce: Val
|
||||||
|
reduce(10), // (, reduce: Val
|
||||||
|
reduce(10), // ), reduce: Val
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -211,11 +256,14 @@ var actionTab = actionTable{
|
|||||||
actions: [numSymbols]action{
|
actions: [numSymbols]action{
|
||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
shift(10), // string
|
reduce(11), // string, reduce: Val
|
||||||
shift(11), // number
|
reduce(11), // rune, reduce: Val
|
||||||
shift(12), // name
|
reduce(11), // int, reduce: Val
|
||||||
shift(13), // (
|
reduce(11), // float, reduce: Val
|
||||||
shift(27), // )
|
reduce(11), // imaginary, reduce: Val
|
||||||
|
reduce(11), // name, reduce: Val
|
||||||
|
reduce(11), // (, reduce: Val
|
||||||
|
reduce(11), // ), reduce: Val
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -224,24 +272,30 @@ var actionTab = actionTable{
|
|||||||
actions: [numSymbols]action{
|
actions: [numSymbols]action{
|
||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
reduce(4), // string, reduce: ValList
|
nil, // string
|
||||||
reduce(4), // number, reduce: ValList
|
nil, // rune
|
||||||
reduce(4), // name, reduce: ValList
|
nil, // int
|
||||||
reduce(4), // (, reduce: ValList
|
nil, // float
|
||||||
reduce(4), // ), reduce: ValList
|
nil, // imaginary
|
||||||
nil, // .
|
shift(30), // name
|
||||||
|
nil, // (
|
||||||
|
nil, // )
|
||||||
|
shift(31), // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
actionRow{ // S17
|
actionRow{ // S17
|
||||||
canRecover: false,
|
canRecover: false,
|
||||||
actions: [numSymbols]action{
|
actions: [numSymbols]action{
|
||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
reduce(15), // ␚, reduce: Expr
|
||||||
nil, // string
|
nil, // string
|
||||||
nil, // number
|
nil, // rune
|
||||||
|
nil, // int
|
||||||
|
nil, // float
|
||||||
|
nil, // imaginary
|
||||||
nil, // name
|
nil, // name
|
||||||
nil, // (
|
reduce(15), // (, reduce: Expr
|
||||||
reduce(9), // ), reduce: Val
|
nil, // )
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -250,11 +304,14 @@ var actionTab = actionTable{
|
|||||||
actions: [numSymbols]action{
|
actions: [numSymbols]action{
|
||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
nil, // string
|
shift(10), // string
|
||||||
nil, // number
|
shift(11), // rune
|
||||||
nil, // name
|
shift(12), // int
|
||||||
nil, // (
|
shift(13), // float
|
||||||
shift(28), // )
|
shift(14), // imaginary
|
||||||
|
shift(15), // name
|
||||||
|
shift(16), // (
|
||||||
|
shift(33), // )
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -263,11 +320,14 @@ var actionTab = actionTable{
|
|||||||
actions: [numSymbols]action{
|
actions: [numSymbols]action{
|
||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
nil, // string
|
reduce(4), // string, reduce: ValList
|
||||||
nil, // number
|
reduce(4), // rune, reduce: ValList
|
||||||
nil, // name
|
reduce(4), // int, reduce: ValList
|
||||||
nil, // (
|
reduce(4), // float, reduce: ValList
|
||||||
reduce(6), // ), reduce: Val
|
reduce(4), // imaginary, reduce: ValList
|
||||||
|
reduce(4), // name, reduce: ValList
|
||||||
|
reduce(4), // (, reduce: ValList
|
||||||
|
reduce(4), // ), reduce: ValList
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -277,10 +337,13 @@ var actionTab = actionTable{
|
|||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
nil, // string
|
nil, // string
|
||||||
nil, // number
|
nil, // rune
|
||||||
|
nil, // int
|
||||||
|
nil, // float
|
||||||
|
nil, // imaginary
|
||||||
nil, // name
|
nil, // name
|
||||||
nil, // (
|
nil, // (
|
||||||
reduce(7), // ), reduce: Val
|
reduce(12), // ), reduce: Val
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -290,10 +353,13 @@ var actionTab = actionTable{
|
|||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
nil, // string
|
nil, // string
|
||||||
nil, // number
|
nil, // rune
|
||||||
|
nil, // int
|
||||||
|
nil, // float
|
||||||
|
nil, // imaginary
|
||||||
nil, // name
|
nil, // name
|
||||||
nil, // (
|
nil, // (
|
||||||
reduce(8), // ), reduce: Val
|
shift(34), // )
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -303,23 +369,29 @@ var actionTab = actionTable{
|
|||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
nil, // string
|
nil, // string
|
||||||
nil, // number
|
nil, // rune
|
||||||
shift(29), // name
|
nil, // int
|
||||||
|
nil, // float
|
||||||
|
nil, // imaginary
|
||||||
|
nil, // name
|
||||||
nil, // (
|
nil, // (
|
||||||
nil, // )
|
reduce(6), // ), reduce: Val
|
||||||
shift(30), // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
actionRow{ // S23
|
actionRow{ // S23
|
||||||
canRecover: false,
|
canRecover: false,
|
||||||
actions: [numSymbols]action{
|
actions: [numSymbols]action{
|
||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
reduce(11), // ␚, reduce: Expr
|
nil, // ␚
|
||||||
nil, // string
|
nil, // string
|
||||||
nil, // number
|
nil, // rune
|
||||||
|
nil, // int
|
||||||
|
nil, // float
|
||||||
|
nil, // imaginary
|
||||||
nil, // name
|
nil, // name
|
||||||
reduce(11), // (, reduce: Expr
|
nil, // (
|
||||||
nil, // )
|
reduce(7), // ), reduce: Val
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -328,11 +400,14 @@ var actionTab = actionTable{
|
|||||||
actions: [numSymbols]action{
|
actions: [numSymbols]action{
|
||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
shift(10), // string
|
nil, // string
|
||||||
shift(11), // number
|
nil, // rune
|
||||||
shift(12), // name
|
nil, // int
|
||||||
shift(13), // (
|
nil, // float
|
||||||
shift(32), // )
|
nil, // imaginary
|
||||||
|
nil, // name
|
||||||
|
nil, // (
|
||||||
|
reduce(8), // ), reduce: Val
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -341,11 +416,14 @@ var actionTab = actionTable{
|
|||||||
actions: [numSymbols]action{
|
actions: [numSymbols]action{
|
||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
shift(10), // string
|
nil, // string
|
||||||
shift(11), // number
|
nil, // rune
|
||||||
shift(12), // name
|
nil, // int
|
||||||
shift(13), // (
|
nil, // float
|
||||||
nil, // )
|
nil, // imaginary
|
||||||
|
nil, // name
|
||||||
|
nil, // (
|
||||||
|
reduce(9), // ), reduce: Val
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -354,11 +432,14 @@ var actionTab = actionTable{
|
|||||||
actions: [numSymbols]action{
|
actions: [numSymbols]action{
|
||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
reduce(5), // string, reduce: ValList
|
nil, // string
|
||||||
reduce(5), // number, reduce: ValList
|
nil, // rune
|
||||||
reduce(5), // name, reduce: ValList
|
nil, // int
|
||||||
reduce(5), // (, reduce: ValList
|
nil, // float
|
||||||
reduce(5), // ), reduce: ValList
|
nil, // imaginary
|
||||||
|
nil, // name
|
||||||
|
nil, // (
|
||||||
|
reduce(10), // ), reduce: Val
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -366,12 +447,15 @@ var actionTab = actionTable{
|
|||||||
canRecover: false,
|
canRecover: false,
|
||||||
actions: [numSymbols]action{
|
actions: [numSymbols]action{
|
||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
reduce(13), // ␚, reduce: Expr
|
nil, // ␚
|
||||||
nil, // string
|
nil, // string
|
||||||
nil, // number
|
nil, // rune
|
||||||
|
nil, // int
|
||||||
|
nil, // float
|
||||||
|
nil, // imaginary
|
||||||
nil, // name
|
nil, // name
|
||||||
reduce(13), // (, reduce: Expr
|
nil, // (
|
||||||
nil, // )
|
reduce(11), // ), reduce: Val
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -379,25 +463,31 @@ var actionTab = actionTable{
|
|||||||
canRecover: false,
|
canRecover: false,
|
||||||
actions: [numSymbols]action{
|
actions: [numSymbols]action{
|
||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
reduce(10), // ␚, reduce: Expr
|
nil, // ␚
|
||||||
nil, // string
|
nil, // string
|
||||||
nil, // number
|
nil, // rune
|
||||||
nil, // name
|
nil, // int
|
||||||
reduce(10), // (, reduce: Expr
|
nil, // float
|
||||||
|
nil, // imaginary
|
||||||
|
shift(35), // name
|
||||||
|
nil, // (
|
||||||
nil, // )
|
nil, // )
|
||||||
nil, // .
|
shift(36), // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
actionRow{ // S29
|
actionRow{ // S29
|
||||||
canRecover: false,
|
canRecover: false,
|
||||||
actions: [numSymbols]action{
|
actions: [numSymbols]action{
|
||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
reduce(14), // ␚, reduce: Expr
|
||||||
shift(10), // string
|
nil, // string
|
||||||
shift(11), // number
|
nil, // rune
|
||||||
shift(12), // name
|
nil, // int
|
||||||
shift(13), // (
|
nil, // float
|
||||||
shift(35), // )
|
nil, // imaginary
|
||||||
|
nil, // name
|
||||||
|
reduce(14), // (, reduce: Expr
|
||||||
|
nil, // )
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -407,10 +497,13 @@ var actionTab = actionTable{
|
|||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
shift(10), // string
|
shift(10), // string
|
||||||
shift(11), // number
|
shift(11), // rune
|
||||||
shift(12), // name
|
shift(12), // int
|
||||||
shift(13), // (
|
shift(13), // float
|
||||||
nil, // )
|
shift(14), // imaginary
|
||||||
|
shift(15), // name
|
||||||
|
shift(16), // (
|
||||||
|
shift(38), // )
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -419,11 +512,14 @@ var actionTab = actionTable{
|
|||||||
actions: [numSymbols]action{
|
actions: [numSymbols]action{
|
||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
shift(19), // string
|
shift(10), // string
|
||||||
shift(20), // number
|
shift(11), // rune
|
||||||
shift(21), // name
|
shift(12), // int
|
||||||
shift(22), // (
|
shift(13), // float
|
||||||
shift(38), // )
|
shift(14), // imaginary
|
||||||
|
shift(15), // name
|
||||||
|
shift(16), // (
|
||||||
|
nil, // )
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -432,11 +528,14 @@ var actionTab = actionTable{
|
|||||||
actions: [numSymbols]action{
|
actions: [numSymbols]action{
|
||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
reduce(12), // string, reduce: Expr
|
reduce(5), // string, reduce: ValList
|
||||||
reduce(12), // number, reduce: Expr
|
reduce(5), // rune, reduce: ValList
|
||||||
reduce(12), // name, reduce: Expr
|
reduce(5), // int, reduce: ValList
|
||||||
reduce(12), // (, reduce: Expr
|
reduce(5), // float, reduce: ValList
|
||||||
reduce(12), // ), reduce: Expr
|
reduce(5), // imaginary, reduce: ValList
|
||||||
|
reduce(5), // name, reduce: ValList
|
||||||
|
reduce(5), // (, reduce: ValList
|
||||||
|
reduce(5), // ), reduce: ValList
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -444,12 +543,15 @@ var actionTab = actionTable{
|
|||||||
canRecover: false,
|
canRecover: false,
|
||||||
actions: [numSymbols]action{
|
actions: [numSymbols]action{
|
||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
reduce(16), // ␚, reduce: Expr
|
||||||
shift(10), // string
|
nil, // string
|
||||||
shift(11), // number
|
nil, // rune
|
||||||
shift(12), // name
|
nil, // int
|
||||||
shift(13), // (
|
nil, // float
|
||||||
shift(39), // )
|
nil, // imaginary
|
||||||
|
nil, // name
|
||||||
|
reduce(16), // (, reduce: Expr
|
||||||
|
nil, // )
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -457,12 +559,15 @@ var actionTab = actionTable{
|
|||||||
canRecover: false,
|
canRecover: false,
|
||||||
actions: [numSymbols]action{
|
actions: [numSymbols]action{
|
||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
reduce(13), // ␚, reduce: Expr
|
||||||
shift(19), // string
|
nil, // string
|
||||||
shift(20), // number
|
nil, // rune
|
||||||
shift(21), // name
|
nil, // int
|
||||||
shift(22), // (
|
nil, // float
|
||||||
shift(41), // )
|
nil, // imaginary
|
||||||
|
nil, // name
|
||||||
|
reduce(13), // (, reduce: Expr
|
||||||
|
nil, // )
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -471,11 +576,14 @@ var actionTab = actionTable{
|
|||||||
actions: [numSymbols]action{
|
actions: [numSymbols]action{
|
||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
nil, // string
|
shift(10), // string
|
||||||
nil, // number
|
shift(11), // rune
|
||||||
nil, // name
|
shift(12), // int
|
||||||
nil, // (
|
shift(13), // float
|
||||||
reduce(12), // ), reduce: Expr
|
shift(14), // imaginary
|
||||||
|
shift(15), // name
|
||||||
|
shift(16), // (
|
||||||
|
shift(41), // )
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -485,10 +593,13 @@ var actionTab = actionTable{
|
|||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
shift(10), // string
|
shift(10), // string
|
||||||
shift(11), // number
|
shift(11), // rune
|
||||||
shift(12), // name
|
shift(12), // int
|
||||||
shift(13), // (
|
shift(13), // float
|
||||||
shift(42), // )
|
shift(14), // imaginary
|
||||||
|
shift(15), // name
|
||||||
|
shift(16), // (
|
||||||
|
nil, // )
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -497,11 +608,14 @@ var actionTab = actionTable{
|
|||||||
actions: [numSymbols]action{
|
actions: [numSymbols]action{
|
||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
nil, // string
|
shift(22), // string
|
||||||
nil, // number
|
shift(23), // rune
|
||||||
nil, // name
|
shift(24), // int
|
||||||
nil, // (
|
shift(25), // float
|
||||||
shift(43), // )
|
shift(26), // imaginary
|
||||||
|
shift(27), // name
|
||||||
|
shift(28), // (
|
||||||
|
shift(44), // )
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -510,11 +624,14 @@ var actionTab = actionTable{
|
|||||||
actions: [numSymbols]action{
|
actions: [numSymbols]action{
|
||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
reduce(11), // string, reduce: Expr
|
reduce(15), // string, reduce: Expr
|
||||||
reduce(11), // number, reduce: Expr
|
reduce(15), // rune, reduce: Expr
|
||||||
reduce(11), // name, reduce: Expr
|
reduce(15), // int, reduce: Expr
|
||||||
reduce(11), // (, reduce: Expr
|
reduce(15), // float, reduce: Expr
|
||||||
reduce(11), // ), reduce: Expr
|
reduce(15), // imaginary, reduce: Expr
|
||||||
|
reduce(15), // name, reduce: Expr
|
||||||
|
reduce(15), // (, reduce: Expr
|
||||||
|
reduce(15), // ), reduce: Expr
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -523,11 +640,14 @@ var actionTab = actionTable{
|
|||||||
actions: [numSymbols]action{
|
actions: [numSymbols]action{
|
||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
reduce(13), // string, reduce: Expr
|
shift(10), // string
|
||||||
reduce(13), // number, reduce: Expr
|
shift(11), // rune
|
||||||
reduce(13), // name, reduce: Expr
|
shift(12), // int
|
||||||
reduce(13), // (, reduce: Expr
|
shift(13), // float
|
||||||
reduce(13), // ), reduce: Expr
|
shift(14), // imaginary
|
||||||
|
shift(15), // name
|
||||||
|
shift(16), // (
|
||||||
|
shift(45), // )
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -536,11 +656,14 @@ var actionTab = actionTable{
|
|||||||
actions: [numSymbols]action{
|
actions: [numSymbols]action{
|
||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
nil, // string
|
shift(22), // string
|
||||||
nil, // number
|
shift(23), // rune
|
||||||
nil, // name
|
shift(24), // int
|
||||||
nil, // (
|
shift(25), // float
|
||||||
shift(44), // )
|
shift(26), // imaginary
|
||||||
|
shift(27), // name
|
||||||
|
shift(28), // (
|
||||||
|
shift(47), // )
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -550,10 +673,13 @@ var actionTab = actionTable{
|
|||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
nil, // string
|
nil, // string
|
||||||
nil, // number
|
nil, // rune
|
||||||
|
nil, // int
|
||||||
|
nil, // float
|
||||||
|
nil, // imaginary
|
||||||
nil, // name
|
nil, // name
|
||||||
nil, // (
|
nil, // (
|
||||||
reduce(11), // ), reduce: Expr
|
reduce(15), // ), reduce: Expr
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -562,11 +688,14 @@ var actionTab = actionTable{
|
|||||||
actions: [numSymbols]action{
|
actions: [numSymbols]action{
|
||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
nil, // string
|
shift(10), // string
|
||||||
nil, // number
|
shift(11), // rune
|
||||||
nil, // name
|
shift(12), // int
|
||||||
nil, // (
|
shift(13), // float
|
||||||
reduce(13), // ), reduce: Expr
|
shift(14), // imaginary
|
||||||
|
shift(15), // name
|
||||||
|
shift(16), // (
|
||||||
|
shift(48), // )
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -575,24 +704,126 @@ var actionTab = actionTable{
|
|||||||
actions: [numSymbols]action{
|
actions: [numSymbols]action{
|
||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
reduce(10), // string, reduce: Expr
|
nil, // string
|
||||||
reduce(10), // number, reduce: Expr
|
nil, // rune
|
||||||
reduce(10), // name, reduce: Expr
|
nil, // int
|
||||||
reduce(10), // (, reduce: Expr
|
nil, // float
|
||||||
reduce(10), // ), reduce: Expr
|
nil, // imaginary
|
||||||
|
nil, // name
|
||||||
|
nil, // (
|
||||||
|
shift(49), // )
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
actionRow{ // S44
|
actionRow{ // S44
|
||||||
|
canRecover: false,
|
||||||
|
actions: [numSymbols]action{
|
||||||
|
nil, // INVALID
|
||||||
|
nil, // ␚
|
||||||
|
reduce(14), // string, reduce: Expr
|
||||||
|
reduce(14), // rune, reduce: Expr
|
||||||
|
reduce(14), // int, reduce: Expr
|
||||||
|
reduce(14), // float, reduce: Expr
|
||||||
|
reduce(14), // imaginary, reduce: Expr
|
||||||
|
reduce(14), // name, reduce: Expr
|
||||||
|
reduce(14), // (, reduce: Expr
|
||||||
|
reduce(14), // ), reduce: Expr
|
||||||
|
nil, // .
|
||||||
|
},
|
||||||
|
},
|
||||||
|
actionRow{ // S45
|
||||||
|
canRecover: false,
|
||||||
|
actions: [numSymbols]action{
|
||||||
|
nil, // INVALID
|
||||||
|
nil, // ␚
|
||||||
|
reduce(16), // string, reduce: Expr
|
||||||
|
reduce(16), // rune, reduce: Expr
|
||||||
|
reduce(16), // int, reduce: Expr
|
||||||
|
reduce(16), // float, reduce: Expr
|
||||||
|
reduce(16), // imaginary, reduce: Expr
|
||||||
|
reduce(16), // name, reduce: Expr
|
||||||
|
reduce(16), // (, reduce: Expr
|
||||||
|
reduce(16), // ), reduce: Expr
|
||||||
|
nil, // .
|
||||||
|
},
|
||||||
|
},
|
||||||
|
actionRow{ // S46
|
||||||
canRecover: false,
|
canRecover: false,
|
||||||
actions: [numSymbols]action{
|
actions: [numSymbols]action{
|
||||||
nil, // INVALID
|
nil, // INVALID
|
||||||
nil, // ␚
|
nil, // ␚
|
||||||
nil, // string
|
nil, // string
|
||||||
nil, // number
|
nil, // rune
|
||||||
|
nil, // int
|
||||||
|
nil, // float
|
||||||
|
nil, // imaginary
|
||||||
nil, // name
|
nil, // name
|
||||||
nil, // (
|
nil, // (
|
||||||
reduce(10), // ), reduce: Expr
|
shift(50), // )
|
||||||
|
nil, // .
|
||||||
|
},
|
||||||
|
},
|
||||||
|
actionRow{ // S47
|
||||||
|
canRecover: false,
|
||||||
|
actions: [numSymbols]action{
|
||||||
|
nil, // INVALID
|
||||||
|
nil, // ␚
|
||||||
|
nil, // string
|
||||||
|
nil, // rune
|
||||||
|
nil, // int
|
||||||
|
nil, // float
|
||||||
|
nil, // imaginary
|
||||||
|
nil, // name
|
||||||
|
nil, // (
|
||||||
|
reduce(14), // ), reduce: Expr
|
||||||
|
nil, // .
|
||||||
|
},
|
||||||
|
},
|
||||||
|
actionRow{ // S48
|
||||||
|
canRecover: false,
|
||||||
|
actions: [numSymbols]action{
|
||||||
|
nil, // INVALID
|
||||||
|
nil, // ␚
|
||||||
|
nil, // string
|
||||||
|
nil, // rune
|
||||||
|
nil, // int
|
||||||
|
nil, // float
|
||||||
|
nil, // imaginary
|
||||||
|
nil, // name
|
||||||
|
nil, // (
|
||||||
|
reduce(16), // ), reduce: Expr
|
||||||
|
nil, // .
|
||||||
|
},
|
||||||
|
},
|
||||||
|
actionRow{ // S49
|
||||||
|
canRecover: false,
|
||||||
|
actions: [numSymbols]action{
|
||||||
|
nil, // INVALID
|
||||||
|
nil, // ␚
|
||||||
|
reduce(13), // string, reduce: Expr
|
||||||
|
reduce(13), // rune, reduce: Expr
|
||||||
|
reduce(13), // int, reduce: Expr
|
||||||
|
reduce(13), // float, reduce: Expr
|
||||||
|
reduce(13), // imaginary, reduce: Expr
|
||||||
|
reduce(13), // name, reduce: Expr
|
||||||
|
reduce(13), // (, reduce: Expr
|
||||||
|
reduce(13), // ), reduce: Expr
|
||||||
|
nil, // .
|
||||||
|
},
|
||||||
|
},
|
||||||
|
actionRow{ // S50
|
||||||
|
canRecover: false,
|
||||||
|
actions: [numSymbols]action{
|
||||||
|
nil, // INVALID
|
||||||
|
nil, // ␚
|
||||||
|
nil, // string
|
||||||
|
nil, // rune
|
||||||
|
nil, // int
|
||||||
|
nil, // float
|
||||||
|
nil, // imaginary
|
||||||
|
nil, // name
|
||||||
|
nil, // (
|
||||||
|
reduce(13), // ), reduce: Expr
|
||||||
nil, // .
|
nil, // .
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -70,8 +70,8 @@ var gotoTab = gotoTable{
|
|||||||
-1, // S'
|
-1, // S'
|
||||||
-1, // Schema
|
-1, // Schema
|
||||||
-1, // ExprList
|
-1, // ExprList
|
||||||
15, // ValList
|
18, // ValList
|
||||||
16, // Val
|
19, // Val
|
||||||
8, // Expr
|
8, // Expr
|
||||||
},
|
},
|
||||||
gotoRow{ // S8
|
gotoRow{ // S8
|
||||||
@@ -87,8 +87,8 @@ var gotoTab = gotoTable{
|
|||||||
-1, // Schema
|
-1, // Schema
|
||||||
-1, // ExprList
|
-1, // ExprList
|
||||||
-1, // ValList
|
-1, // ValList
|
||||||
18, // Val
|
21, // Val
|
||||||
17, // Expr
|
20, // Expr
|
||||||
},
|
},
|
||||||
gotoRow{ // S10
|
gotoRow{ // S10
|
||||||
-1, // S'
|
-1, // S'
|
||||||
@@ -135,8 +135,8 @@ var gotoTab = gotoTable{
|
|||||||
-1, // Schema
|
-1, // Schema
|
||||||
-1, // ExprList
|
-1, // ExprList
|
||||||
-1, // ValList
|
-1, // ValList
|
||||||
26, // Val
|
-1, // Val
|
||||||
8, // Expr
|
-1, // Expr
|
||||||
},
|
},
|
||||||
gotoRow{ // S16
|
gotoRow{ // S16
|
||||||
-1, // S'
|
-1, // S'
|
||||||
@@ -159,8 +159,8 @@ var gotoTab = gotoTable{
|
|||||||
-1, // Schema
|
-1, // Schema
|
||||||
-1, // ExprList
|
-1, // ExprList
|
||||||
-1, // ValList
|
-1, // ValList
|
||||||
-1, // Val
|
32, // Val
|
||||||
-1, // Expr
|
8, // Expr
|
||||||
},
|
},
|
||||||
gotoRow{ // S19
|
gotoRow{ // S19
|
||||||
-1, // S'
|
-1, // S'
|
||||||
@@ -207,16 +207,16 @@ var gotoTab = gotoTable{
|
|||||||
-1, // Schema
|
-1, // Schema
|
||||||
-1, // ExprList
|
-1, // ExprList
|
||||||
-1, // ValList
|
-1, // ValList
|
||||||
31, // Val
|
-1, // Val
|
||||||
8, // Expr
|
-1, // Expr
|
||||||
},
|
},
|
||||||
gotoRow{ // S25
|
gotoRow{ // S25
|
||||||
-1, // S'
|
-1, // S'
|
||||||
-1, // Schema
|
-1, // Schema
|
||||||
-1, // ExprList
|
-1, // ExprList
|
||||||
33, // ValList
|
-1, // ValList
|
||||||
16, // Val
|
-1, // Val
|
||||||
8, // Expr
|
-1, // Expr
|
||||||
},
|
},
|
||||||
gotoRow{ // S26
|
gotoRow{ // S26
|
||||||
-1, // S'
|
-1, // S'
|
||||||
@@ -247,24 +247,24 @@ var gotoTab = gotoTable{
|
|||||||
-1, // Schema
|
-1, // Schema
|
||||||
-1, // ExprList
|
-1, // ExprList
|
||||||
-1, // ValList
|
-1, // ValList
|
||||||
34, // Val
|
-1, // Val
|
||||||
8, // Expr
|
-1, // Expr
|
||||||
},
|
},
|
||||||
gotoRow{ // S30
|
gotoRow{ // S30
|
||||||
-1, // S'
|
-1, // S'
|
||||||
-1, // Schema
|
-1, // Schema
|
||||||
-1, // ExprList
|
-1, // ExprList
|
||||||
36, // ValList
|
-1, // ValList
|
||||||
16, // Val
|
37, // Val
|
||||||
8, // Expr
|
8, // Expr
|
||||||
},
|
},
|
||||||
gotoRow{ // S31
|
gotoRow{ // S31
|
||||||
-1, // S'
|
-1, // S'
|
||||||
-1, // Schema
|
-1, // Schema
|
||||||
-1, // ExprList
|
-1, // ExprList
|
||||||
-1, // ValList
|
39, // ValList
|
||||||
37, // Val
|
19, // Val
|
||||||
17, // Expr
|
8, // Expr
|
||||||
},
|
},
|
||||||
gotoRow{ // S32
|
gotoRow{ // S32
|
||||||
-1, // S'
|
-1, // S'
|
||||||
@@ -279,18 +279,10 @@ var gotoTab = gotoTable{
|
|||||||
-1, // Schema
|
-1, // Schema
|
||||||
-1, // ExprList
|
-1, // ExprList
|
||||||
-1, // ValList
|
-1, // ValList
|
||||||
26, // Val
|
-1, // Val
|
||||||
8, // Expr
|
-1, // Expr
|
||||||
},
|
},
|
||||||
gotoRow{ // S34
|
gotoRow{ // S34
|
||||||
-1, // S'
|
|
||||||
-1, // Schema
|
|
||||||
-1, // ExprList
|
|
||||||
-1, // ValList
|
|
||||||
40, // Val
|
|
||||||
17, // Expr
|
|
||||||
},
|
|
||||||
gotoRow{ // S35
|
|
||||||
-1, // S'
|
-1, // S'
|
||||||
-1, // Schema
|
-1, // Schema
|
||||||
-1, // ExprList
|
-1, // ExprList
|
||||||
@@ -298,12 +290,20 @@ var gotoTab = gotoTable{
|
|||||||
-1, // Val
|
-1, // Val
|
||||||
-1, // Expr
|
-1, // Expr
|
||||||
},
|
},
|
||||||
gotoRow{ // S36
|
gotoRow{ // S35
|
||||||
-1, // S'
|
-1, // S'
|
||||||
-1, // Schema
|
-1, // Schema
|
||||||
-1, // ExprList
|
-1, // ExprList
|
||||||
-1, // ValList
|
-1, // ValList
|
||||||
26, // Val
|
40, // Val
|
||||||
|
8, // Expr
|
||||||
|
},
|
||||||
|
gotoRow{ // S36
|
||||||
|
-1, // S'
|
||||||
|
-1, // Schema
|
||||||
|
-1, // ExprList
|
||||||
|
42, // ValList
|
||||||
|
19, // Val
|
||||||
8, // Expr
|
8, // Expr
|
||||||
},
|
},
|
||||||
gotoRow{ // S37
|
gotoRow{ // S37
|
||||||
@@ -311,8 +311,8 @@ var gotoTab = gotoTable{
|
|||||||
-1, // Schema
|
-1, // Schema
|
||||||
-1, // ExprList
|
-1, // ExprList
|
||||||
-1, // ValList
|
-1, // ValList
|
||||||
-1, // Val
|
43, // Val
|
||||||
-1, // Expr
|
20, // Expr
|
||||||
},
|
},
|
||||||
gotoRow{ // S38
|
gotoRow{ // S38
|
||||||
-1, // S'
|
-1, // S'
|
||||||
@@ -327,16 +327,16 @@ var gotoTab = gotoTable{
|
|||||||
-1, // Schema
|
-1, // Schema
|
||||||
-1, // ExprList
|
-1, // ExprList
|
||||||
-1, // ValList
|
-1, // ValList
|
||||||
-1, // Val
|
32, // Val
|
||||||
-1, // Expr
|
8, // Expr
|
||||||
},
|
},
|
||||||
gotoRow{ // S40
|
gotoRow{ // S40
|
||||||
-1, // S'
|
-1, // S'
|
||||||
-1, // Schema
|
-1, // Schema
|
||||||
-1, // ExprList
|
-1, // ExprList
|
||||||
-1, // ValList
|
-1, // ValList
|
||||||
-1, // Val
|
46, // Val
|
||||||
-1, // Expr
|
20, // Expr
|
||||||
},
|
},
|
||||||
gotoRow{ // S41
|
gotoRow{ // S41
|
||||||
-1, // S'
|
-1, // S'
|
||||||
@@ -351,8 +351,8 @@ var gotoTab = gotoTable{
|
|||||||
-1, // Schema
|
-1, // Schema
|
||||||
-1, // ExprList
|
-1, // ExprList
|
||||||
-1, // ValList
|
-1, // ValList
|
||||||
-1, // Val
|
32, // Val
|
||||||
-1, // Expr
|
8, // Expr
|
||||||
},
|
},
|
||||||
gotoRow{ // S43
|
gotoRow{ // S43
|
||||||
-1, // S'
|
-1, // S'
|
||||||
@@ -370,4 +370,52 @@ var gotoTab = gotoTable{
|
|||||||
-1, // Val
|
-1, // Val
|
||||||
-1, // Expr
|
-1, // Expr
|
||||||
},
|
},
|
||||||
|
gotoRow{ // S45
|
||||||
|
-1, // S'
|
||||||
|
-1, // Schema
|
||||||
|
-1, // ExprList
|
||||||
|
-1, // ValList
|
||||||
|
-1, // Val
|
||||||
|
-1, // Expr
|
||||||
|
},
|
||||||
|
gotoRow{ // S46
|
||||||
|
-1, // S'
|
||||||
|
-1, // Schema
|
||||||
|
-1, // ExprList
|
||||||
|
-1, // ValList
|
||||||
|
-1, // Val
|
||||||
|
-1, // Expr
|
||||||
|
},
|
||||||
|
gotoRow{ // S47
|
||||||
|
-1, // S'
|
||||||
|
-1, // Schema
|
||||||
|
-1, // ExprList
|
||||||
|
-1, // ValList
|
||||||
|
-1, // Val
|
||||||
|
-1, // Expr
|
||||||
|
},
|
||||||
|
gotoRow{ // S48
|
||||||
|
-1, // S'
|
||||||
|
-1, // Schema
|
||||||
|
-1, // ExprList
|
||||||
|
-1, // ValList
|
||||||
|
-1, // Val
|
||||||
|
-1, // Expr
|
||||||
|
},
|
||||||
|
gotoRow{ // S49
|
||||||
|
-1, // S'
|
||||||
|
-1, // Schema
|
||||||
|
-1, // ExprList
|
||||||
|
-1, // ValList
|
||||||
|
-1, // Val
|
||||||
|
-1, // Expr
|
||||||
|
},
|
||||||
|
gotoRow{ // S50
|
||||||
|
-1, // S'
|
||||||
|
-1, // Schema
|
||||||
|
-1, // ExprList
|
||||||
|
-1, // ValList
|
||||||
|
-1, // Val
|
||||||
|
-1, // Expr
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
numProductions = 14
|
numProductions = 17
|
||||||
numStates = 45
|
numStates = 51
|
||||||
numSymbols = 14
|
numSymbols = 17
|
||||||
)
|
)
|
||||||
|
|
||||||
// Stack
|
// Stack
|
||||||
|
|||||||
@@ -93,20 +93,50 @@ var productionsTable = ProdTab{
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
ProdTabEntry{
|
ProdTabEntry{
|
||||||
String: `Val : number << ast.NewNumberVal(X[0].(*token.Token)) >>`,
|
String: `Val : rune << ast.NewRuneVal(X[0].(*token.Token)) >>`,
|
||||||
Id: "Val",
|
Id: "Val",
|
||||||
NTType: 4,
|
NTType: 4,
|
||||||
Index: 7,
|
Index: 7,
|
||||||
NumSymbols: 1,
|
NumSymbols: 1,
|
||||||
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
|
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
|
||||||
return ast.NewNumberVal(X[0].(*token.Token))
|
return ast.NewRuneVal(X[0].(*token.Token))
|
||||||
|
},
|
||||||
|
},
|
||||||
|
ProdTabEntry{
|
||||||
|
String: `Val : int << ast.NewIntVal(X[0].(*token.Token)) >>`,
|
||||||
|
Id: "Val",
|
||||||
|
NTType: 4,
|
||||||
|
Index: 8,
|
||||||
|
NumSymbols: 1,
|
||||||
|
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
|
||||||
|
return ast.NewIntVal(X[0].(*token.Token))
|
||||||
|
},
|
||||||
|
},
|
||||||
|
ProdTabEntry{
|
||||||
|
String: `Val : float << ast.NewFloatVal(X[0].(*token.Token)) >>`,
|
||||||
|
Id: "Val",
|
||||||
|
NTType: 4,
|
||||||
|
Index: 9,
|
||||||
|
NumSymbols: 1,
|
||||||
|
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
|
||||||
|
return ast.NewFloatVal(X[0].(*token.Token))
|
||||||
|
},
|
||||||
|
},
|
||||||
|
ProdTabEntry{
|
||||||
|
String: `Val : imaginary << ast.NewComplexVal(X[0].(*token.Token)) >>`,
|
||||||
|
Id: "Val",
|
||||||
|
NTType: 4,
|
||||||
|
Index: 10,
|
||||||
|
NumSymbols: 1,
|
||||||
|
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
|
||||||
|
return ast.NewComplexVal(X[0].(*token.Token))
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ProdTabEntry{
|
ProdTabEntry{
|
||||||
String: `Val : name << ast.NewNameVal(X[0].(*token.Token)) >>`,
|
String: `Val : name << ast.NewNameVal(X[0].(*token.Token)) >>`,
|
||||||
Id: "Val",
|
Id: "Val",
|
||||||
NTType: 4,
|
NTType: 4,
|
||||||
Index: 8,
|
Index: 11,
|
||||||
NumSymbols: 1,
|
NumSymbols: 1,
|
||||||
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
|
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
|
||||||
return ast.NewNameVal(X[0].(*token.Token))
|
return ast.NewNameVal(X[0].(*token.Token))
|
||||||
@@ -116,7 +146,7 @@ var productionsTable = ProdTab{
|
|||||||
String: `Val : Expr << ast.NewExprVal(X[0]) >>`,
|
String: `Val : Expr << ast.NewExprVal(X[0]) >>`,
|
||||||
Id: "Val",
|
Id: "Val",
|
||||||
NTType: 4,
|
NTType: 4,
|
||||||
Index: 9,
|
Index: 12,
|
||||||
NumSymbols: 1,
|
NumSymbols: 1,
|
||||||
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
|
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
|
||||||
return ast.NewExprVal(X[0])
|
return ast.NewExprVal(X[0])
|
||||||
@@ -126,7 +156,7 @@ var productionsTable = ProdTab{
|
|||||||
String: `Expr : "(" name Val Val ")" << ast.NewExpr(X[1].(*token.Token), X[2], X[3]) >>`,
|
String: `Expr : "(" name Val Val ")" << ast.NewExpr(X[1].(*token.Token), X[2], X[3]) >>`,
|
||||||
Id: "Expr",
|
Id: "Expr",
|
||||||
NTType: 5,
|
NTType: 5,
|
||||||
Index: 10,
|
Index: 13,
|
||||||
NumSymbols: 5,
|
NumSymbols: 5,
|
||||||
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
|
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
|
||||||
return ast.NewExpr(X[1].(*token.Token), X[2], X[3])
|
return ast.NewExpr(X[1].(*token.Token), X[2], X[3])
|
||||||
@@ -136,7 +166,7 @@ var productionsTable = ProdTab{
|
|||||||
String: `Expr : "(" name Val ")" << ast.NewExpr(X[1].(*token.Token), X[2], nil) >>`,
|
String: `Expr : "(" name Val ")" << ast.NewExpr(X[1].(*token.Token), X[2], nil) >>`,
|
||||||
Id: "Expr",
|
Id: "Expr",
|
||||||
NTType: 5,
|
NTType: 5,
|
||||||
Index: 11,
|
Index: 14,
|
||||||
NumSymbols: 4,
|
NumSymbols: 4,
|
||||||
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
|
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
|
||||||
return ast.NewExpr(X[1].(*token.Token), X[2], nil)
|
return ast.NewExpr(X[1].(*token.Token), X[2], nil)
|
||||||
@@ -146,7 +176,7 @@ var productionsTable = ProdTab{
|
|||||||
String: `Expr : "(" name ")" << ast.NewExpr(X[1].(*token.Token), nil, nil) >>`,
|
String: `Expr : "(" name ")" << ast.NewExpr(X[1].(*token.Token), nil, nil) >>`,
|
||||||
Id: "Expr",
|
Id: "Expr",
|
||||||
NTType: 5,
|
NTType: 5,
|
||||||
Index: 12,
|
Index: 15,
|
||||||
NumSymbols: 3,
|
NumSymbols: 3,
|
||||||
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
|
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
|
||||||
return ast.NewExpr(X[1].(*token.Token), nil, nil)
|
return ast.NewExpr(X[1].(*token.Token), nil, nil)
|
||||||
@@ -156,7 +186,7 @@ var productionsTable = ProdTab{
|
|||||||
String: `Expr : "(" "." ValList ")" << ast.ListExpr(X[2]) >>`,
|
String: `Expr : "(" "." ValList ")" << ast.ListExpr(X[2]) >>`,
|
||||||
Id: "Expr",
|
Id: "Expr",
|
||||||
NTType: 5,
|
NTType: 5,
|
||||||
Index: 13,
|
Index: 16,
|
||||||
NumSymbols: 4,
|
NumSymbols: 4,
|
||||||
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
|
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
|
||||||
return ast.ListExpr(X[2])
|
return ast.ListExpr(X[2])
|
||||||
|
|||||||
@@ -6,13 +6,19 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestParser(t *testing.T) {
|
func TestParser(t *testing.T) {
|
||||||
test := "(test)" +
|
test := "(test)\n ; test comment" +
|
||||||
"(test a)" +
|
"(test a)\n" +
|
||||||
"(test a b)" +
|
"(test a b)\n" +
|
||||||
"(test \"a\" \"b\")" +
|
"(test \"a\" \"b\")\n" +
|
||||||
"(+ 0b1010 -0xDEAD_BEEF)" +
|
"(+ 0b1010 -0xDEAD_BEEF)\n" +
|
||||||
"(. a b c d e f g)" +
|
"(. a b c d e f g)\n" +
|
||||||
"(test (test1 \"hi\") (test2 \"hi 2\"))" +
|
"(test (test1 \"hi\") (test2 \"hi 2\"))\n" +
|
||||||
"(test (. \"awa\" \"awawa\" \"awawawa\" \"awawawawa\"))"
|
"(test (. \"awa\" `awawa` \"awawawa\" \"awawawawa\"))\n" +
|
||||||
fmt.Println(CreateSchema(test))
|
"(test \n `new\nline`)\n" +
|
||||||
|
"(test (. 0x0.1Fp1 '\\t' 2i '\\u6767' '\\U0001F600' '\\x23' '\\043'))\n"
|
||||||
|
schema, err := CreateSchema(test)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
fmt.Println(schema)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,7 +139,10 @@ var TokMap = TokenMap{
|
|||||||
"INVALID",
|
"INVALID",
|
||||||
"␚",
|
"␚",
|
||||||
"string",
|
"string",
|
||||||
"number",
|
"rune",
|
||||||
|
"int",
|
||||||
|
"float",
|
||||||
|
"imaginary",
|
||||||
"name",
|
"name",
|
||||||
"(",
|
"(",
|
||||||
")",
|
")",
|
||||||
@@ -150,10 +153,13 @@ var TokMap = TokenMap{
|
|||||||
"INVALID": 0,
|
"INVALID": 0,
|
||||||
"␚": 1,
|
"␚": 1,
|
||||||
"string": 2,
|
"string": 2,
|
||||||
"number": 3,
|
"rune": 3,
|
||||||
"name": 4,
|
"int": 4,
|
||||||
"(": 5,
|
"float": 5,
|
||||||
")": 6,
|
"imaginary": 6,
|
||||||
".": 7,
|
"name": 7,
|
||||||
|
"(": 8,
|
||||||
|
")": 9,
|
||||||
|
".": 10,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user