I am building a language, a toy language. The syntax \\#0061 is supposed to convert the given Unicode to an character:
\\#0061
String temp = yytext().su
i am basically trying to convert unicode to a character by supplying only '0061' to a method, help.
char fromUnicode(String codePoint) { return (char) Integer.parseInt(codePoint, 16); }
You need to handle bad inputs and such, but that will work otherwise.