amath
1.8.5
Simple command line calculator
|
#include <language.h>
Public Member Functions | |
Language () | |
virtual | ~Language () |
char * | GetText (int id) |
char * | GetHelpText (char *ident) |
char * | GetHelpText (Symbol symbol) |
Symbol | FindKeyword (const char *ident) const |
virtual char | GetFractionPoint ()=0 |
virtual bool | CharIsAlNum (unsigned long character)=0 |
virtual bool | CharIsAlpha (unsigned long character)=0 |
virtual bool | CharIsDigit (unsigned long character)=0 |
virtual bool | CharIsPunct (unsigned long character)=0 |
virtual bool | CharIsSpace (unsigned long character)=0 |
virtual bool | CharIsCntrl (unsigned long character)=0 |
virtual bool | CharIsQuote (unsigned long character) |
virtual bool | CharIsBlank (unsigned long character) |
virtual bool | CharIsNewLine (unsigned long character) |
virtual bool | CharIsOperator (unsigned long character) |
virtual bool | StrIsEqualLoc (const char *s1, const char *s2)=0 |
virtual bool | Validate (char c)=0 |
void | SetAnsiMode (bool value) |
Public Member Functions inherited from CharValidator | |
virtual | ~CharValidator () |
Protected Member Functions | |
virtual char * | Translate (textdef *def)=0 |
virtual char * | Translate (helptextdef *def)=0 |
virtual char * | Translate (identhelpdef *def)=0 |
Protected Attributes | |
keyworddef * | keywordsloc |
unsigned int | keywordcount |
unsigned int | textcount |
unsigned int | identcount |
unsigned int | helpcount |
unsigned int | aliascount |
Private Member Functions | |
char * | FindAlias (const char *ident) const |
char * | UntagText (const char *text) |
Private Attributes | |
char * | lastText |
bool | ansiMode |
Definition at line 40 of file language.h.
Language::Language | ( | ) |
Definition at line 76 of file language.cpp.
References aliascount, helpcount, helptexts, identaliases, identcount, identtexts, keywordcount, keywords, keywordsloc, lastText, textcount, and textdefs.
Referenced by StandardLanguage::StandardLanguage().
|
virtual |
|
pure virtual |
Implemented in StandardLanguage.
|
pure virtual |
Implemented in StandardLanguage.
Referenced by Lexer::GetLiteral().
|
virtual |
Definition at line 232 of file language.cpp.
|
pure virtual |
Implemented in StandardLanguage.
Referenced by Lexer::GetQuotedIdent(), and Lexer::ShouldSkip().
|
pure virtual |
Implemented in StandardLanguage.
Referenced by Lexer::GetLiteral().
|
virtual |
Definition at line 244 of file language.cpp.
|
virtual |
Definition at line 253 of file language.cpp.
References operatordef::chr, and operators.
|
pure virtual |
Implemented in StandardLanguage.
|
virtual |
Definition at line 227 of file language.cpp.
|
pure virtual |
Implemented in StandardLanguage.
Referenced by Lexer::GetNextToken(), and Lexer::ShouldSkip().
|
private |
Definition at line 105 of file language.cpp.
References identalias::alias, aliascount, identalias::ident, identaliases, and StrIsEqual().
Referenced by GetHelpText().
Symbol Language::FindKeyword | ( | const char * | ident | ) | const |
Definition at line 118 of file language.cpp.
References keywordcount, keywords, keywordsloc, keyworddef::name, StrIsEqualLoc(), and keyworddef::symbol.
Referenced by Lexer::FindKeyword().
|
pure virtual |
Implemented in StandardLanguage.
Referenced by Program::NewPositionalInput(), Program::NewPositionalOutput(), and Program::Program().
char * Language::GetHelpText | ( | char * | ident | ) |
Definition at line 154 of file language.cpp.
References FindAlias(), identhelpdef::ident, identcount, identtexts, StrIsEqual(), Translate(), and UntagText().
Referenced by HelpStatement::Execute().
char * Language::GetHelpText | ( | Symbol | symbol | ) |
Definition at line 177 of file language.cpp.
References helpcount, helptexts, helptextdef::symbol, Translate(), and UntagText().
Referenced by HelpStatement::Execute().
char * Language::GetText | ( | int | id | ) |
Definition at line 132 of file language.cpp.
References textdef::id, textcount, textdefs, Translate(), and UntagText().
void Language::SetAnsiMode | ( | bool | value | ) |
Definition at line 100 of file language.cpp.
References ansiMode.
Referenced by Program::SetAnsiMode().
|
pure virtual |
Implemented in StandardLanguage.
Referenced by FindKeyword().
|
protectedpure virtual |
Implemented in StandardLanguage.
Referenced by GetText().
|
protectedpure virtual |
Implemented in StandardLanguage.
Referenced by GetHelpText().
|
protectedpure virtual |
Implemented in StandardLanguage.
Referenced by GetHelpText().
|
private |
Definition at line 199 of file language.cpp.
References ansiMode, ansiTags, emptyTags, lastText, MemCopy(), StrLen(), and Untag().
Referenced by GetHelpText(), and GetText().
|
pure virtual |
Implements CharValidator.
Implemented in StandardLanguage.
|
protected |
Definition at line 74 of file language.h.
Referenced by FindAlias(), and Language().
|
private |
Definition at line 80 of file language.h.
Referenced by SetAnsiMode(), and UntagText().
|
protected |
Definition at line 73 of file language.h.
Referenced by GetHelpText(), and Language().
|
protected |
Definition at line 72 of file language.h.
Referenced by GetHelpText(), and Language().
|
protected |
Definition at line 70 of file language.h.
Referenced by FindKeyword(), and Language().
|
protected |
Definition at line 69 of file language.h.
Referenced by FindKeyword(), Language(), and ~Language().
|
private |
Definition at line 79 of file language.h.
Referenced by Language(), UntagText(), and ~Language().
|
protected |
Definition at line 71 of file language.h.
Referenced by GetText(), and Language().