107 unsigned nr_functions;
109 bool generate_output;
110 bool content_is_external;
113 const std::string* content;
114 std::string file_name;
115 std::vector<cgv::utils::line> lines;
116 std::vector<command_token> commands;
119 std::vector<std::string>* inserted_shader_file_names;
121 unsigned int get_line_number(
const token& loc)
const;
122 void error(
const std::string& text,
const token& loc,
unsigned int error_number = 0);
123 bool check_evaluation_error(
unsigned int i,
unsigned int ei);
125 bool process(
unsigned int i,
unsigned int j);
127 bool parse_without_special(
unsigned nr_skip = 0);
129 static std::string my_getenv(
const char* name);
130 std::string find_include_file(
const std::string& fn,
bool local)
const;
132 bool process_include(
unsigned int i,
bool is_cinclude =
false,
bool insert =
false);
133 bool process_list(
unsigned int i);
135 bool debug_reflection;
137 enum ReflectionParenthesis { RP_COMPOUND, RP_NAMESPACE };
138 std::vector<ReflectionParenthesis> rp_stack;
139 std::vector<std::string> namespace_stack;
140 std::vector<variant*> compound_stack;
141 std::vector<std::string> compound_access_type_stack;
142 variant construct_namespace_list()
const;
143 std::string construct_namespace_sequence()
const;
144 void ensure_reflect_info();
145 bool reflect(
const token& code,
const token& comment);
147 bool recursive_dir(std::string rel_directory,
148 std::string actual_directory, std::string filter,
149 bool rel_path,
variant& desc_list,
bool recursive);
150 std::string additional_include_path;
151 bool search_recursive;
153 ph_processor(
const std::string& _additional_include_path =
"",
bool _search_recursive =
false,
char _special =
'@');
157 char get_special()
const {
return special; }
158 void configure_insert_to_shader(std::vector<std::string>* _inserted_shader_file_names);
161 void set_error_stream(std::ostream& error_stream);
163 bool parse_string(
const std::string& text);
164 bool parse_file(
const std::string& file_name);
166 bool process_to_string(std::string& output);
167 int process_to_file(
const std::string& _file_name,
long long last_write_time = 0);
168 bool process_without_output();