Skip to content

Commit

Permalink
Removed conditional compiles from presentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
pgeerkens committed May 11, 2016
1 parent 130f42c commit 940deee
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions QABCIronyParser/QabcGrammar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public QabcGrammar() : base(false) {
var musicLine = new TransientNonTerminal("musicLine");
var musicBar = new TypedNonTerminal<MusicBarAstNode>();
var beam = new TypedNonTerminal<BeamAstNode>();
var bar = new TransientNonTerminal("bar");

var music = new TransientNonTerminal("music");
var direction = new TransientNonTerminal("direction");
Expand Down Expand Up @@ -101,13 +102,8 @@ public QabcGrammar() : base(false) {
musicLine.Rule = MakePlusList<QabcAstNode>(musicBar)
| WhiteSpace + musicLine;

#if InferBarAtEndOfLine
var bar = new TransientNonTerminal("bar");
musicBar.Rule = MakePlusList<MusicBarAstNode>(music) + bar;
bar.Rule = Bar | NewLine;
#else
musicBar.Rule = MakePlusList<MusicBarAstNode>(music) + (Bar | NewLine);
#endif
music.Rule = direction
| beam
| music + WhiteSpace
Expand Down Expand Up @@ -167,23 +163,19 @@ public QabcGrammar() : base(false) {
);
#endregion 4-Color Highlighting

#region Clear shift-reduce conflicts
#if ClearConflict_1
#region Clear shift-reduce conflicts
RegisterOperators(10, Associativity.Right, Length);
RegisterOperators(10, Associativity.Right, Mode);
RegisterOperators(10, Associativity.Right, Tempo);
RegisterOperators(10, Associativity.Right, Octave);
RegisterOperators(10, Associativity.Right, Shift);
RegisterOperators(10, Associativity.Right, ModePlay);
#endif
#if ClearConflict_2
RegisterOperators(10, Associativity.Right, Note);
RegisterOperators(10, Associativity.Right, NoteLetter);
RegisterOperators(10, Associativity.Right, Rest);
#endif
#endregion
#endregion

#if EliminateMusicList
#if !EliminateMusicList
MarkTransient(tune);
#endif
LanguageFlags = LanguageFlags.CreateAst | LanguageFlags.NewLineBeforeEOF;
Expand Down

0 comments on commit 940deee

Please sign in to comment.