X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/c15969fd0a6280c60d2f35876b5343004fed2b11..8964aa089c709fbf370be623d75a204480b26b3c:/Parser.hpp diff --git a/Parser.hpp b/Parser.hpp index 9dbb9b9..2102091 100644 --- a/Parser.hpp +++ b/Parser.hpp @@ -24,7 +24,6 @@ #include -#include #include #include #include @@ -33,8 +32,6 @@ #include #include -#include "location.hh" - #include "List.hpp" #include "Pooling.hpp" #include "Options.hpp" @@ -463,12 +460,6 @@ struct CYBlock : virtual void Output(CYOutput &out, CYFlags flags) const; }; -enum CYState { - CYClear, - CYRestricted, - CYNewLine -}; - class CYStream : public std::istream { @@ -490,87 +481,6 @@ class CYStream : } }; -class CYDriver { - public: - void *scanner_; - - CYState state_; - std::stack in_; - - struct { - bool AtImplementation; - bool Function; - bool OpenBrace; - } no_; - - std::istream &data_; - - bool strict_; - bool commented_; - - enum Condition { - RegExpCondition, - XMLContentCondition, - XMLTagCondition, - }; - - std::string filename_; - - struct Error { - bool warning_; - cy::location location_; - std::string message_; - }; - - typedef std::vector Errors; - - CYProgram *program_; - Errors errors_; - - bool auto_; - - struct Context { - CYExpression *context_; - - Context(CYExpression *context) : - context_(context) - { - } - - typedef std::vector Words; - Words words_; - }; - - typedef std::vector Contexts; - Contexts contexts_; - - CYExpression *context_; - - enum Mode { - AutoNone, - AutoPrimary, - AutoDirect, - AutoIndirect, - AutoMessage - } mode_; - - private: - void ScannerInit(); - void ScannerDestroy(); - - public: - CYDriver(std::istream &data, const std::string &filename = ""); - ~CYDriver(); - - Condition GetCondition(); - void SetCondition(Condition condition); - - void PushCondition(Condition condition); - void PopCondition(); - - void Warning(const cy::location &location, const char *message); -}; - struct CYForInitialiser { virtual ~CYForInitialiser() { }