add square bracket notation
This commit is contained in:
parent
8b484b69d7
commit
8c40fc8d9e
|
@ -43,7 +43,7 @@ void yylex_destroy();
|
|||
pic_value datum;
|
||||
}
|
||||
|
||||
%token tLPAREN tRPAREN tDOT tVPAREN
|
||||
%token tLPAREN tRPAREN tLBRACKET tRBRACKET tDOT tVPAREN
|
||||
%token tQUOTE tQUASIQUOTE tUNQUOTE tUNQUOTE_SPLICING
|
||||
%token <i> tINT tBOOLEAN
|
||||
%token <f> tFLOAT
|
||||
|
@ -135,6 +135,10 @@ list
|
|||
{
|
||||
$$ = $2;
|
||||
}
|
||||
| tLBRACKET list_data tRBRACKET
|
||||
{
|
||||
$$ = $2;
|
||||
}
|
||||
;
|
||||
|
||||
list_data
|
||||
|
@ -191,6 +195,7 @@ abbrev
|
|||
|
||||
incomplete_datum
|
||||
: tLPAREN incomplete_data
|
||||
| tLBRACKET incomplete_data
|
||||
| tVPAREN incomplete_data
|
||||
| incomplete_abbrev
|
||||
;
|
||||
|
|
|
@ -44,6 +44,8 @@ infnan "+inf.0"|"-inf.0"|"+nan.0"|"-nan.0"
|
|||
"." return tDOT;
|
||||
"(" return tLPAREN;
|
||||
")" return tRPAREN;
|
||||
"[" return tLBRACKET;
|
||||
"]" return tRBRACKET;
|
||||
"#(" return tVPAREN;
|
||||
"'" return tQUOTE;
|
||||
"`" return tQUASIQUOTE;
|
||||
|
|
Loading…
Reference in New Issue