You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The toStringTT() method returns a pANTLR3_STRING pointer.
But the createTypeText() method (and the createToken() method that it calls) expects a UTF-8 char string.
The pANTLR3_STRING is eventually cast to pANTLR3_UCHAR and the text state set to ANTLR3_TEXT_CHARP.
Reading the token text from the token results in gibberish.
Tested with both ANTLR 3.4 and 3.5.
Is there any workaround available?
The text was updated successfully, but these errors were encountered:
With a parser rule like this:
The returned string in the
BAR
token is corrupted.The reason is that the following code is generated in the parser:
The
toStringTT()
method returns apANTLR3_STRING
pointer.But the
createTypeText()
method (and thecreateToken()
method that it calls) expects a UTF-8 char string.The
pANTLR3_STRING
is eventually cast topANTLR3_UCHAR
and the text state set toANTLR3_TEXT_CHARP
.Reading the token text from the token results in gibberish.
Tested with both ANTLR 3.4 and 3.5.
Is there any workaround available?
The text was updated successfully, but these errors were encountered: