15 #ifndef vtkMotionFXCFGGrammar_h 16 #define vtkMotionFXCFGGrammar_h 22 #include <vtk_pegtl.h> 25 #include <vtkpegtl/include/tao/pegtl/contrib/tracer.hpp> 35 struct Sign : sor<one<'+'>, one<'-'>> {};
36 struct Exponent : seq<sor<one<'e'>, one<'E'> >, opt<Sign>, plus<digit>> {};
38 sor<seq<plus<digit>, one<'.'>, star<digit>>,
39 seq<one<'.'>, plus<digit> >, plus<digit>>,
45 seq<star<space>, one<','>, star<space>>,
52 namespace LegacyPositionFile
54 using namespace Common;
58 : seq<star<space>, Number, Delimiter, Number, Delimiter, Number, Delimiter, Number,
59 Delimiter, Number, Delimiter, Number, Delimiter, Number, star<space>> {};
66 namespace OrientationsPositionFile
68 using namespace Common;
72 seq<star<space>, Number, Delimiter, Number, Delimiter, Number,
73 Delimiter, Number, Delimiter, Number, Delimiter, Number,
74 Delimiter, Number, Delimiter, Number, star<space>> {};
84 using namespace Common;
87 struct Comment : seq<string<';'>, until<eolf>> {};
90 struct WS : star<WS_Required> {};
92 struct Value : plus<not_one<';', '}', '\r', '\n'>> {};
95 struct Statement : seq<ParameterName, WS_Required, Value> {};
96 struct StatementOther : seq<ParameterName, WS_Required, plus<not_one<'}','{',';'>>> {};
98 struct Motion : seq<TAO_PEGTL_STRING("motion"), WS, one<'{'>, WS, list<Statement, WS>, WS, one<'}'>> {};
99 struct Motions : seq<TAO_PEGTL_STRING("motions"), WS, one<'{'>, WS, list<Motion, WS>, WS, one<'}'>> {};
101 struct OtherNonNested : seq<identifier, WS, one<'{'>, WS, list<StatementOther, WS>, WS, one<'}'>> {};
104 list<sor<OtherNonNested, StatementOther>, WS>,
107 struct Lines : sor<Comment, space, Motions, OtherNonNested, OtherNested> {};