|
RigsofRods
Soft-body Physics Simulation
|
Go to the documentation of this file.
70 #define E_OPTIONAL_SPACE "[[:blank:]]*"
74 #define E_TRAILING_WHITESPACE "[[:blank:]]*$"
76 #define E_LEADING_WHITESPACE "^[[:blank:]]*"
78 #define E_DELIMITER_SPACE "[[:blank:]]+"
80 #define E_DELIMITER_CLASSIC "[[:blank:],:|]+" // Separators: space/comma/colon/pipe, see also `IsSeparator()` in RigDef_Parser.cpp. This is what original parser did.
82 #define E_NODE_ID "[[:alnum:]_-]+"
89 #define E_CAPTURE(_REGEXP_) \
93 #define E_CAPTURE_OPTIONAL(_REGEXP_) \
97 #define E_KEYWORD_BLOCK(_NAME_) \
98 "(^" _NAME_ "[[:blank:]]*$)?"
101 #define E_KEYWORD_INLINE(_NAME_) \
102 "(^" _NAME_ E_DELIMITER_CLASSIC ".*$)?"
105 #define E_KEYWORD_INLINE_UNSEPARATED(_NAME_) \
109 #define DEFINE_REGEX(_NAME_,_REGEXP_) \
110 const std::regex _NAME_ = std::regex( _REGEXP_, std::regex::ECMAScript);
112 #define DEFINE_REGEX_IGNORECASE(_NAME_,_REGEXP_) \
113 const std::regex _NAME_ = std::regex( _REGEXP_, std::regex::ECMAScript | std::regex::icase);
120 #define IDENTIFY_KEYWORD_REGEX_STRING \
121 E_KEYWORD_INLINE("add_animation") \
122 E_KEYWORD_BLOCK("airbrakes") \
123 E_KEYWORD_BLOCK("animators") \
124 E_KEYWORD_INLINE("AntiLockBrakes") \
125 E_KEYWORD_BLOCK("assetpacks") \
126 E_KEYWORD_INLINE("author") \
127 E_KEYWORD_BLOCK("axles") \
128 E_KEYWORD_BLOCK("backmesh") \
129 E_KEYWORD_BLOCK("beams") \
130 E_KEYWORD_BLOCK("brakes") \
131 E_KEYWORD_BLOCK("cab") \
132 E_KEYWORD_BLOCK("camerarail") \
133 E_KEYWORD_BLOCK("cameras") \
134 E_KEYWORD_BLOCK("cinecam") \
135 E_KEYWORD_BLOCK("collisionboxes") \
136 E_KEYWORD_BLOCK("commands") \
137 E_KEYWORD_BLOCK("commands2") \
138 E_KEYWORD_BLOCK("comment") \
139 E_KEYWORD_BLOCK("contacters") \
140 E_KEYWORD_INLINE("cruisecontrol") \
141 E_KEYWORD_INLINE("default_skin") \
142 E_KEYWORD_BLOCK("description") \
143 E_KEYWORD_INLINE("detacher_group") \
144 E_KEYWORD_BLOCK("disabledefaultsounds") \
145 E_KEYWORD_BLOCK("enable_advanced_deformation") \
146 E_KEYWORD_BLOCK("end") \
147 E_KEYWORD_BLOCK("end_comment") \
148 E_KEYWORD_BLOCK("end_description") \
149 E_KEYWORD_BLOCK("end_section") \
150 E_KEYWORD_BLOCK("engine") \
151 E_KEYWORD_BLOCK("engoption") \
152 E_KEYWORD_BLOCK("engturbo") \
153 E_KEYWORD_BLOCK("envmap") \
154 E_KEYWORD_BLOCK("exhausts") \
155 E_KEYWORD_INLINE("extcamera") \
156 E_KEYWORD_INLINE("fileformatversion") \
157 E_KEYWORD_INLINE("fileinfo") \
158 E_KEYWORD_BLOCK("fixes") \
159 E_KEYWORD_BLOCK("flares") \
160 E_KEYWORD_BLOCK("flares2") \
161 E_KEYWORD_BLOCK("flares3") \
162 E_KEYWORD_BLOCK("flexbodies") \
163 E_KEYWORD_INLINE("flexbody_camera_mode") \
164 E_KEYWORD_BLOCK("flexbodywheels") \
165 E_KEYWORD_INLINE_UNSEPARATED("forset") \
166 E_KEYWORD_BLOCK("forwardcommands") \
167 E_KEYWORD_BLOCK("fusedrag") \
168 E_KEYWORD_BLOCK("globals") \
169 E_KEYWORD_INLINE("guid") \
170 E_KEYWORD_BLOCK("guisettings") \
171 E_KEYWORD_BLOCK("help") \
172 E_KEYWORD_BLOCK("hideInChooser") \
173 E_KEYWORD_BLOCK("hookgroup") \
174 E_KEYWORD_BLOCK("hooks") \
175 E_KEYWORD_BLOCK("hydros") \
176 E_KEYWORD_BLOCK("importcommands") \
177 E_KEYWORD_BLOCK("interaxles") \
178 E_KEYWORD_BLOCK("lockgroups") \
179 E_KEYWORD_BLOCK("lockgroup_default_nolock") \
180 E_KEYWORD_BLOCK("managedmaterials") \
181 E_KEYWORD_BLOCK("materialflarebindings") \
182 E_KEYWORD_BLOCK("meshwheels") \
183 E_KEYWORD_BLOCK("meshwheels2") \
184 E_KEYWORD_BLOCK("minimass") \
185 E_KEYWORD_BLOCK("nodecollision") \
186 E_KEYWORD_BLOCK("nodes") \
187 E_KEYWORD_BLOCK("nodes2") \
188 E_KEYWORD_BLOCK("particles") \
189 E_KEYWORD_BLOCK("pistonprops") \
190 E_KEYWORD_INLINE("prop_camera_mode") \
191 E_KEYWORD_BLOCK("props") \
192 E_KEYWORD_BLOCK("railgroups") \
193 E_KEYWORD_BLOCK("rescuer") \
194 E_KEYWORD_BLOCK("rigidifiers") \
195 E_KEYWORD_BLOCK("rollon") \
196 E_KEYWORD_BLOCK("ropables") \
197 E_KEYWORD_BLOCK("ropes") \
198 E_KEYWORD_BLOCK("rotators") \
199 E_KEYWORD_BLOCK("rotators2") \
200 E_KEYWORD_BLOCK("screwprops") \
201 E_KEYWORD_BLOCK("scripts") \
202 E_KEYWORD_INLINE("section") \
203 E_KEYWORD_INLINE("sectionconfig") \
204 E_KEYWORD_INLINE("set_beam_defaults") \
205 E_KEYWORD_INLINE("set_beam_defaults_scale") \
206 E_KEYWORD_INLINE("set_collision_range") \
207 E_KEYWORD_INLINE("set_default_minimass") \
208 E_KEYWORD_INLINE("set_inertia_defaults") \
209 E_KEYWORD_INLINE("set_managedmaterials_options") \
210 E_KEYWORD_INLINE("set_node_defaults") \
211 E_KEYWORD_BLOCK("set_shadows") \
212 E_KEYWORD_INLINE("set_skeleton_settings") \
213 E_KEYWORD_BLOCK("shocks") \
214 E_KEYWORD_BLOCK("shocks2") \
215 E_KEYWORD_BLOCK("shocks3") \
216 E_KEYWORD_BLOCK("slidenode_connect_instantly") \
217 E_KEYWORD_BLOCK("slidenodes") \
218 E_KEYWORD_INLINE("SlopeBrake") \
219 E_KEYWORD_BLOCK("soundsources") \
220 E_KEYWORD_BLOCK("soundsources2") \
221 E_KEYWORD_INLINE("speedlimiter") \
222 E_KEYWORD_BLOCK("submesh") \
223 E_KEYWORD_INLINE("submesh_groundmodel") \
224 E_KEYWORD_BLOCK("texcoords") \
225 E_KEYWORD_BLOCK("ties") \
226 E_KEYWORD_BLOCK("torquecurve") \
227 E_KEYWORD_INLINE("TractionControl") \
228 E_KEYWORD_BLOCK("transfercase") \
229 E_KEYWORD_BLOCK("triggers") \
230 E_KEYWORD_BLOCK("turbojets") \
231 E_KEYWORD_BLOCK("turboprops") \
232 E_KEYWORD_BLOCK("turboprops2") \
233 E_KEYWORD_BLOCK("videocamera") \
234 E_KEYWORD_BLOCK("wheeldetachers") \
235 E_KEYWORD_BLOCK("wheels") \
236 E_KEYWORD_BLOCK("wheels2") \
237 E_KEYWORD_BLOCK("wings")
241 #define E_2xCAPTURE_TRAILING_COMMENT \
243 E_CAPTURE_OPTIONAL( \
259 E_CAPTURE(
"throttle|rpm|aerotorq|aeropit|aerostatus" )
294 #undef E_TRAILING_WHITESPACE
295 #undef E_LEADING_WHITESPACE
296 #undef E_DELIMITER_SPACE
297 #undef E_OPTIONAL_SPACE
301 #undef E_CAPTURE_OPTIONAL
303 #undef E_2xCAPTURE_TRAILING_COMMENT
#define E_CAPTURE(_REGEXP_)
Encloses expression in 'capture' marks.
#define DEFINE_REGEX_IGNORECASE(_NAME_, _REGEXP_)
DEFINE_REGEX(PARSE_ANIMATORS_NUMBERED_KEYWORD, E_LEADING_WHITESPACE E_TRAILING_WHITESPACE)
#define E_DELIMITER_SPACE
#define IDENTIFY_KEYWORD_REGEX_STRING
#define E_2xCAPTURE_TRAILING_COMMENT
#define E_LEADING_WHITESPACE
#define E_TRAILING_WHITESPACE
#define E_CAPTURE_OPTIONAL(_REGEXP_)
Encloses expression in 'capture' marks with ? (zero or one time) mark.