namespace PGSoftwareSolutionsInc.Util.PlayWaveLib {
   public class MyAstContext : PGIrony.AstContext {
      public MyAstContext(LanguageData language) : base(language) {}
   }


   [Language("StatementList", "1.0", "Simple Statement-List grammar example")]
   public class AstGrammarTest : PGIrony.Grammar<MyAstContext> {
      public AstGrammarTest() : base(false,LanguageFlags.CreateAst) {
         GrammarComments = 
            @"Simple Statement-List grammar example, showing use of PGIrony library.";

      }
      /// <summary>Provide MyGrammar with appropriate AstContext.</summary>
      protected override MyAstContext GetContext(LanguageData language) {
         return new MyAstContext(language);
      }
   }
}

Last edited Nov 7, 2012 at 5:12 PM by pgeerkens, version 6

Comments

No comments yet.