Some fixes in the unit system

This commit is contained in:
jriegel
2013-12-03 19:57:29 +01:00
parent 6ff12d9a4b
commit 27becf2e7b
6 changed files with 6 additions and 60 deletions

View File

@@ -159,57 +159,3 @@ int UnitsApi::getDecimals()
return UserPrefDecimals;
}
//// === Parser & Scanner stuff ===============================================
//
//// include the Scanner and the Parser for the filter language
//
//double ScanResult=0;
//bool UU = false;
//
//// error func
//void Unit_yyerror(char *errorinfo)
//{ throw Base::Exception(errorinfo); }
//
//
//// for VC9 (isatty and fileno not supported anymore)
//#ifdef _MSC_VER
//int isatty (int i) {return _isatty(i);}
//int fileno(FILE *stream) {return _fileno(stream);}
//#endif
//
//namespace UnitParser {
//
//// show the parser the lexer method
//#define yylex UnitsApilex
//int UnitsApilex(void);
//
//// Parser, defined in UnitsApi.y
//#include "UnitsApi.tab.c"
//
//#ifndef DOXYGEN_SHOULD_SKIP_THIS
//// Scanner, defined in UnitsApi.l
//#include "lex.UnitsApi.c"
//#endif // DOXYGEN_SHOULD_SKIP_THIS
//}
//
//double UnitsApi::parse(const char* buffer,bool &UsedUnit)
//{
// // parse from buffer
// UnitParser::YY_BUFFER_STATE my_string_buffer = UnitParser::UnitsApi_scan_string (buffer);
// // set the global return variables
// ScanResult = DOUBLE_MIN;
// UU = false;
// // run the parser
// UnitParser::Unit_yyparse ();
// UsedUnit = UU;
// UU=false;
// // free the scan buffer
// UnitParser::UnitsApi_delete_buffer (my_string_buffer);
//
// if (ScanResult == DOUBLE_MIN)
// throw Base::Exception("Unknown error in Unit expression");
// return ScanResult;
//}