#include <map>
#include <set>
+#include <cstdio>
#include <cstdlib>
#include "location.hh"
virtual void Output(CYOutput &out) const;
};
-struct CYContext :
- CYScope
-{
+struct CYContext {
apr_pool_t *pool_;
CYOptions &options_;
CYScope *scope_;
CYContext(apr_pool_t *pool, CYOptions &options) :
pool_(pool),
options_(options),
- scope_(this)
+ scope_(NULL)
{
}
CYProgram *program_;
Errors errors_;
+ bool auto_;
+
+ struct Context {
+ CYExpression *context_;
+
+ Context(CYExpression *context) :
+ context_(context)
+ {
+ }
+
+ typedef std::vector<CYWord *> Words;
+ Words words_;
+ };
+
+ typedef std::vector<Context> Contexts;
+ Contexts contexts_;
+
+ CYExpression *context_;
+
+ enum Mode {
+ AutoNone,
+ AutoPrimary,
+ AutoDirect,
+ AutoIndirect,
+ AutoMessage
+ } mode_;
+
private:
void ScannerInit();
void ScannerDestroy();
public:
- CYDriver(const std::string &filename);
+ CYDriver(apr_pool_t *pool = NULL, const std::string &filename = "");
~CYDriver();
Condition GetCondition();