From dfda0223cc2b53def9f7eb2c3cd67722fe0bdb90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Wed, 15 Feb 2017 13:59:28 +0100 Subject: [PATCH] [kandinsky] Change unicode symbol of e (exponential) Change-Id: I3f379092bc00975ce588a0fffdf425128079976c --- ion/include/ion/charset.h | 8 ++++---- kandinsky/fonts/unicode_for_symbol.c | 2 +- poincare/src/expression_lexer.l | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ion/include/ion/charset.h b/ion/include/ion/charset.h index 0c4253f21..e6506ddcc 100644 --- a/ion/include/ion/charset.h +++ b/ion/include/ion/charset.h @@ -36,10 +36,10 @@ enum Charset : char { SmallMu = (char)158, SmallPi = (char)159, SmallSigma = (char)160, - Exponential = (char)161, - IComplex = (char)162, - Exponent = (char)163, - Prime = (char)164, + IComplex = (char)161, + Exponent = (char)162, + Prime = (char)163, + Exponential = (char)164, Sto = (char)165, Root = (char)166, LessEqual = (char)167, diff --git a/kandinsky/fonts/unicode_for_symbol.c b/kandinsky/fonts/unicode_for_symbol.c index 2ad52d15b..4a9fd6cb5 100644 --- a/kandinsky/fonts/unicode_for_symbol.c +++ b/kandinsky/fonts/unicode_for_symbol.c @@ -3,4 +3,4 @@ wchar_t codePointForSymbol[NUMBER_OF_SYMBOLS] = {0x00c1, 0x00c9, 0x00cd, 0x00d1, 0x00d3, 0x00da, 0x00e0, 0x00e1, 0x00e2, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ed, 0x00ee, 0x00ef, 0x00f1, 0x00f3, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x222b, 0x0078, 0x0305, 0x0079, 0x0305, 0x0393, 0x03a3, 0x03b8, 0x03bb, - 0x03bc, 0x03c0, 0x03c3, 0x0435, 0x0456, 0x1D07, 0x2032, 0x2192, 0x221A, 0x2264, 0x2265}; + 0x03bc, 0x03c0, 0x03c3, 0x0456, 0x1D07, 0x2032, 0x212e, 0x2192, 0x221A, 0x2264, 0x2265}; diff --git a/poincare/src/expression_lexer.l b/poincare/src/expression_lexer.l index 67ad5dc2f..82ee2a5a5 100644 --- a/poincare/src/expression_lexer.l +++ b/poincare/src/expression_lexer.l @@ -77,12 +77,12 @@ using namespace Poincare; */ /* We designed our own extended-ASCII to include requiered symbols in less * than 255 glyphs. The file ion/include/ion/charset.h lists all added - * non-ASCII symbols with their char associated. For example, the char \xa0 + * non-ASCII symbols with their char associated. For example, the char \x9f * refered to Pi symbols. This artefact leads to the following lexer rules * starting with \x. */ [0-9]+ { poincare_expression_yylval.string.address = yytext; poincare_expression_yylval.string.length = yyleng; return DIGITS; } -\xa3 { return EE; } +\xa2 { return EE; } [A-Zxnt] { poincare_expression_yylval.character = yytext[0]; return SYMBOL; } abs { poincare_expression_yylval.expression = new AbsoluteValue(); return FUNCTION; } diff { poincare_expression_yylval.expression = new Derivative(); return FUNCTION; } @@ -101,8 +101,8 @@ sum { poincare_expression_yylval.expression = new Sum(); return FUNCTION; } product { poincare_expression_yylval.expression = new Product(); return FUNCTION; } \x9f { poincare_expression_yylval.character = yytext[0]; return SYMBOL; } \xa6 { poincare_expression_yylval.expression = new SquareRoot(); return FUNCTION; } -\xa2 { return ICOMPLEX; } -\xa1 { poincare_expression_yylval.character = yytext[0]; return SYMBOL; } +\xa1 { return ICOMPLEX; } +\xa4 { poincare_expression_yylval.character = yytext[0]; return SYMBOL; } \+ { return PLUS; } \- { return MINUS; } \* { return MULTIPLY; }