[kandinsky] Add the degree symbol to Charset

This commit is contained in:
Émilie Feral
2018-09-25 14:06:44 +02:00
committed by LeaNumworks
parent afeb987efa
commit eebb405cd5
4 changed files with 5 additions and 4 deletions

View File

@@ -26,7 +26,8 @@ enum Charset : char {
MultiplicationSign = (char)148,
MiddleDot = (char)149,
AlmostEqual = (char)150,
Empty = (char)151 // This char is used to be parsed into EmptyExpression.
Degree = (char)151,
Empty = (char)152 // This char is used to be parsed into EmptyExpression.
};
}

View File

@@ -1,3 +1,3 @@
#include "unicode_for_symbol.h"
wchar_t codePointForSymbol[NUMBER_OF_SYMBOLS] = {0x222b, 0x0078, 0x0305, 0x0079, 0x0305, 0x0393, 0x0394, 0x03a3, 0x03b8, 0x03bb, 0x03bc, 0x03c0, 0x03c3, 0x0456, 0x1D07, 0x2032, 0x212e, 0x2192, 0x221A, 0x2264, 0x2265, 0x00D7, 0x00B7, 0x2248};
wchar_t codePointForSymbol[NUMBER_OF_SYMBOLS] = {0x222b, 0x0078, 0x0305, 0x0079, 0x0305, 0x0393, 0x0394, 0x03a3, 0x03b8, 0x03bb, 0x03bc, 0x03c0, 0x03c3, 0x0456, 0x1D07, 0x2032, 0x212e, 0x2192, 0x221A, 0x2264, 0x2265, 0x00D7, 0x00B7, 0x2248, 0x00B0};

View File

@@ -3,7 +3,7 @@
#include <stddef.h>
#define NUMBER_OF_SYMBOLS 24
#define NUMBER_OF_SYMBOLS 25
extern wchar_t codePointForSymbol[NUMBER_OF_SYMBOLS];

View File

@@ -173,7 +173,7 @@ inf { *yylval = Infinity(false); return TERM; }
\] { return RIGHT_BRACKET; }
\, { return COMMA; }
\_ { return UNDERSCORE; }
\x97 { *yylval = EmptyExpression(); return TERM; }
\x98 { *yylval = EmptyExpression(); return TERM; }
[ ]+ /* Ignore whitespaces */
. { return UNDEFINED_SYMBOL; }