Ignore:
Timestamp:
Dec 11, 2006, 3:07:59 AM (18 years ago)
Author:
dai_9181
Message:

LexicalAnalysisを廃止。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler_Common/calculation.cpp

    r14 r15  
    1010_int64 i64stack[255];
    1111
    12 bool IsNumberTopChar(char *buffer){
     12bool IsNumberTopChar(const char *buffer){
    1313    int c = buffer[0];
    1414    if('0' <= c && c <= '9') return true;
    15     if(buffer[0] == '&' && (buffer[1] == 'h' || buffer[1] == 'H' || buffer[1] == 'o' || buffer[1] == 'O')) return true;
     15    if(c == '&' && (buffer[1] == 'h' || buffer[1] == 'H' || buffer[1] == 'o' || buffer[1] == 'O')) return true;
    1616
    1717    return false;
    1818}
    19 bool IsNumberChar(char c){
     19bool IsNumberChar(const char c){
    2020    if('0' <= c && c <= '9') return true;
    2121    if('a' <= c && c <= 'f') return true;
    2222    if('A' <= c && c <= 'F') return true;
     23    if(c=='.' || c=='e'||c=='E') return true;
    2324
    2425    return false;
    2526}
    26 BOOL IsJudgMark(char *Command,int p){
     27BOOL IsJudgMark(const char *Command,int p){
    2728    if(Command[p]==1){
    2829        if(Command[p+1]==ESC_AND) return 1;
     
    3334    return 0;
    3435}
    35 BOOL IsNumCalcMark(char *Command,int p){
     36BOOL IsNumCalcMark(const char *Command,int p){
    3637    if(Command[p]=='^'||Command[p]=='*'||Command[p]=='/'||Command[p]=='\\'||
    3738        (Command[p]==1&&Command[p+1]==ESC_MOD)||Command[p]=='+'||Command[p]=='-'||
     
    4142    return 0;
    4243}
    43 BOOL IsNumCalcMark_Back(char *Command,int p){
     44BOOL IsNumCalcMark_Back(const char *Command,int p){
    4445    if(p==0){
    4546        if(Command[p]=='^'||Command[p]=='*'||Command[p]=='/'||Command[p]=='\\'||
     
    5657    return 0;
    5758}
    58 BOOL IsStrCalcMark(char c){
     59BOOL IsStrCalcMark(const char c){
    5960    if(c=='+'||c=='&') return 1;
    6061    return 0;
    6162}
    62 BOOL IsExponent(char *Command,int p){
     63BOOL IsExponent(const char *Command,int p){
    6364    int i,sw;
    6465    for(i=p-2,sw=FALSE;i>=0;i--){
     
    388389}
    389390
    390 int StaticCalculation(bool enableerror, char *Command,int BaseType,_int64 *pi64data,LONG_PTR *plpIndex,BOOL bDebuggingWatchList){
     391int StaticCalculation(bool enableerror, const char *Command,int BaseType,_int64 *pi64data,LONG_PTR *plpIndex,BOOL bDebuggingWatchList){
    391392    extern HANDLE hHeap;
    392393    extern int cp;
     
    13461347}
    13471348
    1348 BYTE GetCalcId(char *Command,int *pi){
     1349BYTE GetCalcId(const char *Command,int *pi){
    13491350    *pi=0;
    13501351
     
    14001401    return 0;
    14011402}
    1402 BOOL GetNumOpeElements(char *Command,int *pnum,
     1403BOOL GetNumOpeElements(const char *Command,int *pnum,
    14031404                       char *values[255],long calc[255],long stack[255]){
    14041405    extern int cp;
Note: See TracChangeset for help on using the changeset viewer.