0022904: Clean up sccsid variables
[occt.git] / src / ExprIntrp / ExprIntrp.cxx
1 // Copyright:   Matra-Datavision 1992
2 // File:        ExprIntrp.cxx
3 // Created:     Mon Aug 17 18:40:44 1992
4 // Author:      Arnaud BOUZY
5 //              <adn>
6
7 #include <ExprIntrp.ixx>
8 #include <ExprIntrp_yaccintrf.hxx>
9 #include <ExprIntrp_yaccanal.hxx>
10 #include <Standard_ErrorHandler.hxx>
11 #include <ExprIntrp_SyntaxError.hxx>
12
13 TCollection_AsciiString ExprIntrp_thestring;
14 Standard_Integer ExprIntrp_thecurchar=0;
15
16 Standard_Boolean ExprIntrp::Parse(const Handle(ExprIntrp_Generator)& gen, const TCollection_AsciiString& str)
17 {
18   ExprIntrp_Recept.SetMaster(gen);
19   ExprIntrp_thecurchar = 0;
20   if (str.Length() == 0) return Standard_False;
21   ExprIntrp_thestring = str;
22   ExprIntrp_start_string(ExprIntrp_thestring.ToCString());
23
24   int kerror=1;
25
26   {
27     try {
28       OCC_CATCH_SIGNALS
29       while (kerror!=0) {
30         kerror = ExprIntrpparse();
31       }
32       ExprIntrp_stop_string();
33       return Standard_True;
34     }
35     catch (Standard_Failure) {}
36   }
37   ExprIntrp_stop_string();
38   return Standard_False;
39 }
40