]>
git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_codesigning/antlr2/src/CommonAST.cpp
1 /* ANTLR Translator Generator
2 * Project led by Terence Parr at http://www.jGuru.com
3 * Software rights: http://www.antlr.org/license.html
5 * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/CommonAST.cpp#2 $
7 #include "antlr/config.hpp"
12 #include "antlr/CommonAST.hpp"
13 #include "antlr/ANTLRUtil.hpp"
15 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
19 const char* const CommonAST::TYPE_NAME
= "CommonAST";
21 #ifdef ANTLR_SUPPORT_XML
22 void CommonAST::initialize( ANTLR_USE_NAMESPACE(std
)istream
& in
)
24 ANTLR_USE_NAMESPACE(std
)string t1
, t2
, text
;
27 read_AttributeNValue( in
, t1
, text
);
29 read_AttributeNValue( in
, t1
, t2
);
30 #ifdef ANTLR_ATOI_IN_STD
31 int type
= ANTLR_USE_NAMESPACE(std
)atoi(t2
.c_str());
33 int type
= atoi(t2
.c_str());
36 // initialize first part of AST.
37 this->initialize( type
, text
);
41 RefAST
CommonAST::factory()
43 return RefAST(new CommonAST
);
46 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE