перезалив
parent
b73d25de50
commit
2ad260c9fe
|
@ -38,8 +38,8 @@ LETTER_OR_DIGIT [a-zA-Z0-9_]
|
||||||
"float32" { return FLOAT32; }
|
"float32" { return FLOAT32; }
|
||||||
"float64" { return FLOAT64; }
|
"float64" { return FLOAT64; }
|
||||||
"uintptr" { return UINT_PTR; }
|
"uintptr" { return UINT_PTR; }
|
||||||
"true" { return BOOL_LIT; }
|
"true" { return BOOL_LITERAL; }
|
||||||
"false" { return BOOL_LIT; }
|
"false" { return BOOL_LITERAL; }
|
||||||
"if" { return IF; }
|
"if" { return IF; }
|
||||||
"else" { return ELSE; }
|
"else" { return ELSE; }
|
||||||
"<-" { return ARROW; }
|
"<-" { return ARROW; }
|
||||||
|
|
|
@ -31,7 +31,7 @@ void free_node(char *str) {
|
||||||
%token STRING
|
%token STRING
|
||||||
%token UINT UINT8 UINT16 UINT32 UINT64 UINT_PTR
|
%token UINT UINT8 UINT16 UINT32 UINT64 UINT_PTR
|
||||||
%token INT INT8 INT16 INT32 INT64
|
%token INT INT8 INT16 INT32 INT64
|
||||||
%token RUNE BYTE BOOL_LIT
|
%token RUNE BYTE BOOL_LITERAL
|
||||||
%token FLOAT32 FLOAT64
|
%token FLOAT32 FLOAT64
|
||||||
%token COMPLEX64 COMPLEX128
|
%token COMPLEX64 COMPLEX128
|
||||||
%token <str> IDENTIFIER
|
%token <str> IDENTIFIER
|
||||||
|
@ -179,18 +179,14 @@ log_expr:
|
||||||
| log_expr AND log_expr { }
|
| log_expr AND log_expr { }
|
||||||
| log_expr OR log_expr { }
|
| log_expr OR log_expr { }
|
||||||
| NOT log_expr %prec UMINUS { }
|
| NOT log_expr %prec UMINUS { }
|
||||||
| comparison_expr { }
|
|
||||||
| LPAREN log_expr RPAREN { }
|
|
||||||
| BOOL_LIT
|
|
||||||
;
|
|
||||||
|
|
||||||
comparison_expr:
|
|
||||||
| math_expr EQ math_expr { }
|
| math_expr EQ math_expr { }
|
||||||
| math_expr NEQ math_expr { }
|
| math_expr NEQ math_expr { }
|
||||||
| math_expr LT math_expr { }
|
| math_expr LT math_expr { }
|
||||||
| math_expr LEQ math_expr { }
|
| math_expr LEQ math_expr { }
|
||||||
| math_expr GT math_expr { }
|
| math_expr GT math_expr { }
|
||||||
| math_expr GEQ math_expr { }
|
| math_expr GEQ math_expr { }
|
||||||
|
| LPAREN log_expr RPAREN { }
|
||||||
|
| BOOL_LITERAL
|
||||||
;
|
;
|
||||||
|
|
||||||
int_types:
|
int_types:
|
||||||
|
@ -227,7 +223,7 @@ type:
|
||||||
|
|
||||||
literal:
|
literal:
|
||||||
STRING_LITERAL { }
|
STRING_LITERAL { }
|
||||||
| BOOL_LIT { }
|
| BOOL_LITERAL { }
|
||||||
| FLOAT_LITERAL { }
|
| FLOAT_LITERAL { }
|
||||||
| NUMBER { }
|
| NUMBER { }
|
||||||
;
|
;
|
||||||
|
|
|
@ -26,8 +26,6 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
outer:
|
outer:
|
||||||
|
|
||||||
|
|
||||||
for p := 0; p < 3; p++ {
|
for p := 0; p < 3; p++ {
|
||||||
for q := 0; q < 3; q++ {
|
for q := 0; q < 3; q++ {
|
||||||
if p*q > 2 {
|
if p*q > 2 {
|
||||||
|
|
Loading…
Reference in New Issue