App: extend Expression syntax

* Support sub-object reference syntax using the following syntax,
    Part.<<Box.>>.Placement
  or, with sub-object label referencing
    Part.<<$Cube.>>.Placement

* Extend indexing support, including range based indexing, e.g.
    A1[B2+1][C3][D4:-1]

* Add new constants, None, True, true, False, false.
This commit is contained in:
Zheng, Lei
2019-08-29 18:53:51 +08:00
committed by wmayer
parent 22fede14d8
commit a1417c5ffa
10 changed files with 7670 additions and 7381 deletions

View File

@@ -264,6 +264,12 @@ EXPO [eE][-+]?[0-9]+
"pi" COUNTCHARS; yylval.constant.fvalue = M_PI; yylval.constant.name = "pi"; return CONSTANT; // constant pi
"e" COUNTCHARS; yylval.constant.fvalue = M_E; yylval.constant.name = "e"; return CONSTANT; // constant e
"None" COUNTCHARS; yylval.constant.fvalue = 0; yylval.constant.name = "None"; return CONSTANT;
"True" COUNTCHARS; yylval.constant.fvalue = 1; yylval.constant.name = "True"; return CONSTANT;
"true" COUNTCHARS; yylval.constant.fvalue = 1; yylval.constant.name = "True"; return CONSTANT;
"False" COUNTCHARS; yylval.constant.fvalue = 0; yylval.constant.name = "False"; return CONSTANT;
"false" COUNTCHARS; yylval.constant.fvalue = 0; yylval.constant.name = "False"; return CONSTANT;
$[A-Za-z]{1,2}+${DIGIT}+ COUNTCHARS; yylval.string = yytext; return CELLADDRESS;
[A-Za-z]{1,2}${DIGIT}+ COUNTCHARS; yylval.string = yytext; return CELLADDRESS;
$[A-Za-z]{1,2}{DIGIT}+ COUNTCHARS; yylval.string = yytext; return CELLADDRESS;