--- a/cmajor++/Cm/Cm.Debugger/GdbReply.cpp
+++ b/cmajor++/Cm/Cm.Debugger/GdbReply.cpp
@@ -120,16 +120,16 @@
 void BacktraceReplyGrammar::GetReferencedGrammars()
 {
     ParsingDomainPtr parsingDomain = GetParsingDomain();
-    GrammarPtr grammar0 = parsingDomain->GetGrammar("Cm.Debugger.GdbReplyGrammar");
+    GrammarPtr grammar0 = parsingDomain->GetGrammar("Soul.Parsing.stdlib");
     if (!grammar0)
     {
-        grammar0 = Cm::Debugger::GdbReplyGrammar::Create(parsingDomain);
+        grammar0 = Soul::Parsing::stdlib::Create(parsingDomain);
     }
     AddGrammarReference(grammar0);
-    GrammarPtr grammar1 = parsingDomain->GetGrammar("Soul.Parsing.stdlib");
+    GrammarPtr grammar1 = parsingDomain->GetGrammar("Cm.Debugger.GdbReplyGrammar");
     if (!grammar1)
     {
-        grammar1 = Soul::Parsing::stdlib::Create(parsingDomain);
+        grammar1 = Cm::Debugger::GdbReplyGrammar::Create(parsingDomain);
     }
     AddGrammarReference(grammar1);
 }
@@ -252,24 +252,24 @@
 void BreakReplyGrammar::GetReferencedGrammars()
 {
     ParsingDomainPtr parsingDomain = GetParsingDomain();
-    GrammarPtr grammar0 = parsingDomain->GetGrammar("Cm.Debugger.GdbReplyGrammar");
+    GrammarPtr grammar0 = parsingDomain->GetGrammar("Soul.Parsing.stdlib");
     if (!grammar0)
     {
-        grammar0 = Cm::Debugger::GdbReplyGrammar::Create(parsingDomain);
+        grammar0 = Soul::Parsing::stdlib::Create(parsingDomain);
     }
     AddGrammarReference(grammar0);
-    GrammarPtr grammar1 = parsingDomain->GetGrammar("Soul.Parsing.stdlib");
+    GrammarPtr grammar1 = parsingDomain->GetGrammar("Cm.Debugger.GdbReplyGrammar");
     if (!grammar1)
     {
-        grammar1 = Soul::Parsing::stdlib::Create(parsingDomain);
+        grammar1 = Cm::Debugger::GdbReplyGrammar::Create(parsingDomain);
     }
     AddGrammarReference(grammar1);
 }
 
 void BreakReplyGrammar::CreateRules()
 {
+    AddRuleLink(RuleLinkPtr(new RuleLink("SetBreakpointReply", std::static_pointer_cast<Grammar>(GetPtr()), "GdbReplyGrammar.SetBreakpointReply")));
     AddRuleLink(RuleLinkPtr(new RuleLink("spaces", std::static_pointer_cast<Grammar>(GetPtr()), "Soul.Parsing.stdlib.spaces")));
-    AddRuleLink(RuleLinkPtr(new RuleLink("SetBreakpointReply", std::static_pointer_cast<Grammar>(GetPtr()), "GdbReplyGrammar.SetBreakpointReply")));
     AddRule(RulePtr(new BreakReplyRule("BreakReply", GetScope(),
         ParserPtr(new ActionParser("A0",
             ParserPtr(new NonterminalParser("SetBreakpointReply", "SetBreakpointReply", 0)))))));
@@ -384,24 +384,24 @@
 void ClearReplyGrammar::GetReferencedGrammars()
 {
     ParsingDomainPtr parsingDomain = GetParsingDomain();
-    GrammarPtr grammar0 = parsingDomain->GetGrammar("Cm.Debugger.GdbReplyGrammar");
+    GrammarPtr grammar0 = parsingDomain->GetGrammar("Soul.Parsing.stdlib");
     if (!grammar0)
     {
-        grammar0 = Cm::Debugger::GdbReplyGrammar::Create(parsingDomain);
+        grammar0 = Soul::Parsing::stdlib::Create(parsingDomain);
     }
     AddGrammarReference(grammar0);
-    GrammarPtr grammar1 = parsingDomain->GetGrammar("Soul.Parsing.stdlib");
+    GrammarPtr grammar1 = parsingDomain->GetGrammar("Cm.Debugger.GdbReplyGrammar");
     if (!grammar1)
     {
-        grammar1 = Soul::Parsing::stdlib::Create(parsingDomain);
+        grammar1 = Cm::Debugger::GdbReplyGrammar::Create(parsingDomain);
     }
     AddGrammarReference(grammar1);
 }
 
 void ClearReplyGrammar::CreateRules()
 {
+    AddRuleLink(RuleLinkPtr(new RuleLink("spaces", std::static_pointer_cast<Grammar>(GetPtr()), "Soul.Parsing.stdlib.spaces")));
     AddRuleLink(RuleLinkPtr(new RuleLink("ClearBreakpointReply", std::static_pointer_cast<Grammar>(GetPtr()), "GdbReplyGrammar.ClearBreakpointReply")));
-    AddRuleLink(RuleLinkPtr(new RuleLink("spaces", std::static_pointer_cast<Grammar>(GetPtr()), "Soul.Parsing.stdlib.spaces")));
     AddRule(RulePtr(new ClearReplyRule("ClearReply", GetScope(),
         ParserPtr(new ActionParser("A0",
             ParserPtr(new NonterminalParser("ClearBreakpointReply", "ClearBreakpointReply", 0)))))));
@@ -516,16 +516,16 @@
 void FrameReplyGrammar::GetReferencedGrammars()
 {
     ParsingDomainPtr parsingDomain = GetParsingDomain();
-    GrammarPtr grammar0 = parsingDomain->GetGrammar("Cm.Debugger.GdbReplyGrammar");
+    GrammarPtr grammar0 = parsingDomain->GetGrammar("Soul.Parsing.stdlib");
     if (!grammar0)
     {
-        grammar0 = Cm::Debugger::GdbReplyGrammar::Create(parsingDomain);
+        grammar0 = Soul::Parsing::stdlib::Create(parsingDomain);
     }
     AddGrammarReference(grammar0);
-    GrammarPtr grammar1 = parsingDomain->GetGrammar("Soul.Parsing.stdlib");
+    GrammarPtr grammar1 = parsingDomain->GetGrammar("Cm.Debugger.GdbReplyGrammar");
     if (!grammar1)
     {
-        grammar1 = Soul::Parsing::stdlib::Create(parsingDomain);
+        grammar1 = Cm::Debugger::GdbReplyGrammar::Create(parsingDomain);
     }
     AddGrammarReference(grammar1);
 }
@@ -1908,12 +1908,12 @@
 void GdbReplyGrammar::CreateRules()
 {
     AddRuleLink(RuleLinkPtr(new RuleLink("int", std::static_pointer_cast<Grammar>(GetPtr()), "Soul.Parsing.stdlib.int")));
-    AddRuleLink(RuleLinkPtr(new RuleLink("string", std::static_pointer_cast<Grammar>(GetPtr()), "Soul.Parsing.stdlib.string")));
+    AddRuleLink(RuleLinkPtr(new RuleLink("identifier", std::static_pointer_cast<Grammar>(GetPtr()), "Soul.Parsing.stdlib.identifier")));
+    AddRuleLink(RuleLinkPtr(new RuleLink("newline", std::static_pointer_cast<Grammar>(GetPtr()), "Soul.Parsing.stdlib.newline")));
+    AddRuleLink(RuleLinkPtr(new RuleLink("real", std::static_pointer_cast<Grammar>(GetPtr()), "Soul.Parsing.stdlib.real")));
     AddRuleLink(RuleLinkPtr(new RuleLink("char", std::static_pointer_cast<Grammar>(GetPtr()), "Soul.Parsing.stdlib.char")));
     AddRuleLink(RuleLinkPtr(new RuleLink("bool", std::static_pointer_cast<Grammar>(GetPtr()), "Soul.Parsing.stdlib.bool")));
-    AddRuleLink(RuleLinkPtr(new RuleLink("newline", std::static_pointer_cast<Grammar>(GetPtr()), "Soul.Parsing.stdlib.newline")));
-    AddRuleLink(RuleLinkPtr(new RuleLink("identifier", std::static_pointer_cast<Grammar>(GetPtr()), "Soul.Parsing.stdlib.identifier")));
-    AddRuleLink(RuleLinkPtr(new RuleLink("real", std::static_pointer_cast<Grammar>(GetPtr()), "Soul.Parsing.stdlib.real")));
+    AddRuleLink(RuleLinkPtr(new RuleLink("string", std::static_pointer_cast<Grammar>(GetPtr()), "Soul.Parsing.stdlib.string")));
     AddRule(RulePtr(new SetBreakpointReplyRule("SetBreakpointReply", GetScope(),
         ParserPtr(new AlternativeParser(
             ParserPtr(new SequenceParser(