diff --git a/QABCIronyParser/QabcGrammar.cs b/QABCIronyParser/QabcGrammar.cs index c0de244..41d8341 100644 --- a/QABCIronyParser/QabcGrammar.cs +++ b/QABCIronyParser/QabcGrammar.cs @@ -6,6 +6,7 @@ //#define KeySpec using System; using System.Collections.Generic; +using Irony.Parsing; using PGSoftwareSolutionsInc.PGIrony; using PGSoftwareSolutionsInc.Music; @@ -159,6 +160,8 @@ public QabcGrammar() : base(false) { new List() {Tempo,Length,Octave,Shift} ); #endregion 4-Color Highlighting + + LanguageFlags = LanguageFlags.CreateAst | LanguageFlags.NewLineBeforeEOF; } /// Whitespace is part of this grammar, so we override the routine that skips it. diff --git a/QABCIronyParser/QabcIronyParser.cs b/QABCIronyParser/QabcIronyParser.cs index c93cb6e..c99ae98 100644 --- a/QABCIronyParser/QabcIronyParser.cs +++ b/QABCIronyParser/QabcIronyParser.cs @@ -28,7 +28,6 @@ public QabcIronyParser() : base(new QabcGrammar()) {} ParseTree _parseTree; if (GCFirst) { _parseTree = null; GC.Collect(); } - Language.Grammar.LanguageFlags = LanguageFlags.CreateAst; Parse(music, ""); _parseTree = Context.CurrentParseTree; Errors = _parseTree.ParserMessages;