OSDN Git Service

pegtl::seq<> でパーサーをラップ
authorstarg <starg@users.osdn.me>
Sat, 13 Aug 2016 04:38:34 +0000 (13:38 +0900)
committerstarg <starg@users.osdn.me>
Sat, 13 Aug 2016 04:38:34 +0000 (13:38 +0900)
src/parser/action_state_phrase.hpp
src/parser/parser_literal.hpp
src/parser/parser_phrase.hpp

index 7e81c82..4fc8b97 100644 (file)
@@ -481,6 +481,10 @@ public:
 class NoteNameState
 {
 public:
+    NoteNameState() : ASTNode{}
+    {
+    }
+
     template<typename TParentState, typename... TCommonStates>
     void success(TParentState& st, TCommonStates&...)
     {
index 4f423bb..1f11959 100644 (file)
@@ -22,7 +22,7 @@ class UnsignedIntegerBase
 {
 };
 
-class UnsignedInteger : public UnsignedIntegerBase
+class UnsignedInteger : public pegtl::seq<UnsignedIntegerBase>
 {
 };
 
index 202aa0f..3add525 100644 (file)
@@ -33,7 +33,7 @@ class NoteName : public pegtl::seq<NoteNameBase, pegtl::opt<NoteNameKey>>
 {
 };
 
-class NoteOctave : public SignedInteger
+class NoteOctave : public pegtl::seq<SignedInteger>
 {
 };
 
@@ -45,11 +45,11 @@ class SimpleChord : public pegtl::list_must<NoteNumber, pegtl::one<'&'>, Separat
 {
 };
 
-class SimpleDuration : public UnsignedInteger
+class SimpleDuration : public pegtl::seq<UnsignedInteger>
 {
 };
 
-class SimpleDurationModifier : public UnsignedInteger
+class SimpleDurationModifier : public pegtl::seq<UnsignedInteger>
 {
 };