Closed apstndb closed 2 weeks ago
Some punctuations are not yet handled in memefish.Lexer. It cause panic when lexing even if parsing is not needed.
memefish.Lexer
I think it is safe to add all punctuations in ZetaSQL.
https://github.com/google/zetasql/blob/194cd32b5d766d60e3ca442651d792c7fe54ea74/zetasql/parser/flex_tokenizer.l#L513-L552
(
[
{
)
]
}
*
,
=
+=
KW_ADD_ASSIGN
options_assignment_operator
-=
KW_SUB_ASSIGN
!=
<=
<<
=>
->
KW_LAMBDA_ARROW
<
>
>=
||
|
^
&
+
-
/
~
?
Positional parameters are not supported
!
%
|>
KW_PIPE
@
@@
KW_DOUBLE_AT
.
:
NEW
\
BACKSLASH
;
${unquoted_identifier}
MACRO_INVOCATION
${decimal_digits}
MACRO_ARGUMENT_REFERENCE
$
Except MACRO_INVOCATION and MACRO_ARGUMENT_REFERENCE would be better to be implemented.
This makes Lexer more robust even to new lexical structures that are being tested privately.
Lexer
Some punctuations are not yet handled in
memefish.Lexer
. It cause panic when lexing even if parsing is not needed.I think it is safe to add all punctuations in ZetaSQL.
https://github.com/google/zetasql/blob/194cd32b5d766d60e3ca442651d792c7fe54ea74/zetasql/parser/flex_tokenizer.l#L513-L552
(
[
{
)
]
}
*
,
=
+=
KW_ADD_ASSIGN
options_assignment_operator
-=
KW_SUB_ASSIGN
options_assignment_operator
!=
<=
<<
=>
->
KW_LAMBDA_ARROW
153
<
>
>=
||
|
^
&
+
-
/
~
?
!
%
|>
KW_PIPE
@
@@
KW_DOUBLE_AT
.
:
NEW
constructors #119\
BACKSLASH
;
${unquoted_identifier}
MACRO_INVOCATION
${decimal_digits}
MACRO_ARGUMENT_REFERENCE
$
Except
MACRO_INVOCATION
andMACRO_ARGUMENT_REFERENCE
would be better to be implemented.This makes
Lexer
more robust even to new lexical structures that are being tested privately.