diff --git a/Sources/Sdf/variableExpressionParser.cpp b/Sources/Sdf/variableExpressionParser.cpp index 281ca6eba..43f923e7c 100644 --- a/Sources/Sdf/variableExpressionParser.cpp +++ b/Sources/Sdf/variableExpressionParser.cpp @@ -22,6 +22,8 @@ PXR_NAMESPACE_OPEN_SCOPE namespace { +using namespace PXR_PEGTL_NAMESPACE; + namespace Impl = Sdf_VariableExpressionImpl; // Node creators ----------------------------------------------- @@ -281,13 +283,13 @@ void _ThrowParseError(const Input &in, const std::string &msg) // missing "}". This is because it recognizes everything up to the // illegal character as the variable and expects to find the // closing "}" after it. It'd be nice to fix this. -struct VariableStart : PXR_PEGTL_NAMESPACE::ascii::string<'$', '{'> {}; +struct VariableStart : string<'$', '{'> {}; -struct VariableEnd : PXR_PEGTL_NAMESPACE::ascii::string<'}'> {}; +struct VariableEnd : string<'}'> {}; template struct VariableName : identifier {}; -template struct VariableImpl : PXR_PEGTL_NAMESPACE::internal::if_must, VariableEnd> { +template struct VariableImpl : if_must, VariableEnd> { using Name = VariableName; }; @@ -304,23 +306,23 @@ template struct QuotedStringEscapedChar : one<'`', '$', '\\', Qu // Sequence of allowed characters in a quoted string. template -struct QuotedStringChars : PXR_PEGTL_NAMESPACE::internal::plus, QuotedStringEscapedChar>, + seq, QuotedStringEscapedChar>, // Any other characters that aren't the start of a stage // variable or the quote character, since those are handled // by different rules. - PXR_PEGTL_NAMESPACE::internal::seq>>, any>>> {}; + seq>>, any>>> {}; -template struct QuotedStringStart : PXR_PEGTL_NAMESPACE::ascii::string {}; +template struct QuotedStringStart : string {}; -template struct QuotedStringEnd : PXR_PEGTL_NAMESPACE::ascii::string {}; +template struct QuotedStringEnd : string {}; template -struct QuotedStringBody : PXR_PEGTL_NAMESPACE::internal::star>> {}; +struct QuotedStringBody : star>> {}; template -struct QuotedString : PXR_PEGTL_NAMESPACE::internal::if_must, +struct QuotedString : if_must, QuotedStringBody, QuotedStringEnd> { using Start = QuotedStringStart; @@ -333,7 +335,7 @@ using SingleQuotedString = QuotedString<'\''>; // ---------------------------------------- -struct Integer : PXR_PEGTL_NAMESPACE::internal::seq>, PXR_PEGTL_NAMESPACE::internal::plus> {}; +struct Integer : seq>, plus> {}; // ---------------------------------------- @@ -341,15 +343,15 @@ struct Integer : PXR_PEGTL_NAMESPACE::internal::seq {}; +struct BooleanTrue : sor {}; -struct BooleanFalse : PXR_PEGTL_NAMESPACE::internal::sor {}; +struct BooleanFalse : sor {}; -struct Boolean : PXR_PEGTL_NAMESPACE::internal::sor {}; +struct Boolean : sor {}; // ---------------------------------------- -struct None : PXR_PEGTL_NAMESPACE::internal::sor {}; +struct None : sor {}; // ---------------------------------------- @@ -358,9 +360,9 @@ struct ExpressionBody; struct FunctionName : identifier {}; -struct FunctionArgumentStart : PXR_PEGTL_NAMESPACE::internal::pad, one<' '>> {}; +struct FunctionArgumentStart : pad, one<' '>> {}; -struct FunctionArgumentEnd : PXR_PEGTL_NAMESPACE::internal::pad, one<' '>> {}; +struct FunctionArgumentEnd : pad, one<' '>> {}; // A function argument can be any valid expression. We can't directly // derive from ExpressionBody because doing so would require ExpressionBody @@ -371,15 +373,15 @@ template struct FunctionArgumentWrapper : public Base {}; using FunctionArgument = FunctionArgumentWrapper; // Function arguments are zero or more comma-separated arguments. -struct FunctionArguments : PXR_PEGTL_NAMESPACE::internal::sor, one<' '>>, PXR_PEGTL_NAMESPACE::internal::star>> {}; +struct FunctionArguments : sor, one<' '>>, star>> {}; struct Function - : PXR_PEGTL_NAMESPACE::internal::if_must, FunctionArguments, FunctionArgumentEnd> {}; + : if_must, FunctionArguments, FunctionArgumentEnd> {}; // ---------------------------------------- struct ScalarExpression - : PXR_PEGTL_NAMESPACE::internal::sor {}; + : sor {}; // ---------------------------------------- @@ -389,19 +391,19 @@ struct ListEnd : one<']'> {}; struct ListElement : public ScalarExpression {}; -struct ListElements : PXR_PEGTL_NAMESPACE::internal::sor, one<' '>>, PXR_PEGTL_NAMESPACE::internal::star>> {}; +struct ListElements : sor, one<' '>>, star>> {}; -struct ListExpression : PXR_PEGTL_NAMESPACE::internal::if_must {}; +struct ListExpression : if_must {}; // ---------------------------------------- -struct ExpressionStart : PXR_PEGTL_NAMESPACE::ascii::string<'`'> {}; +struct ExpressionStart : string<'`'> {}; -struct ExpressionEnd : PXR_PEGTL_NAMESPACE::ascii::string<'`'> {}; +struct ExpressionEnd : string<'`'> {}; -struct ExpressionBody : PXR_PEGTL_NAMESPACE::internal::sor {}; +struct ExpressionBody : sor {}; -struct Expression : PXR_PEGTL_NAMESPACE::internal::must {}; +struct Expression : must {}; // Parser actions --------------------------------------------- // Objects that define the actions to take when a parsing rule