Skip to content

Commit 4919a0e

Browse files
committed
(temp) init grammar and restore one dummy rule - for release
1 parent f39cabd commit 4919a0e

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/basics.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,8 @@ static QList<GrammarRule> initGrammarFullRules()
482482
<< GrammarRule(N_BRANCHING, EmptyTokenList()
483483
<< K_IF << S_ROUND_OPEN << N_EXPRESSION << S_ROUND_CLOSE << N_BLOCK)
484484
<< GrammarRule(N_BRANCHING, EmptyTokenList() << K_IF << S_ROUND_OPEN << N_EXPRESSION << S_ROUND_CLOSE
485-
<< N_BLOCK << K_ELSE << N_BLOCK);
485+
<< N_BLOCK << K_ELSE << N_BLOCK)
486+
<< GrammarRule(N_EXPRESSION, EmptyTokenList() << N_OP_9);
486487

487488
return list;
488489
}

src/mainwindow.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,9 @@ void MainWindow::initLogic()
261261

262262
grammar_active_rules_.clear();
263263
grammar_active_rules_ << 0; // rule #0 must be always active
264-
//grammar_active_rules_ << 1 << 6 << 40 << 48 << 49 << 50 << 51 << 53 << 54 << 55 << 58 << 59 << 97 << 98 << 101
265-
// << 102 << 103 << 104 << 105 << 106 << 134;
266-
//grammar_active_rules_ << 1 << 2 << 5 << 6 << 40 << 41 << 42 << 43 << 44 << 45 << 46 << 47 << 48 << 49 << 50 << 51
267-
// << 52 << 53 << 54 << 55 << 58 << 59 << 97 << 98 << 101 << 102 << 103 << 104 << 105 << 106
268-
// << 109 << 111 << 113 << 114 << 115 << 116 << 120 << 121 << 134;
264+
grammar_active_rules_ << 1 << 2 << 5 << 6 << 37 << 38 << 39 << 40 << 41 << 42 << 43 << 44 << 45 << 46 << 47 << 48
265+
<< 49 << 50 << 51 << 52 << 55 << 56 << 94 << 95 << 98 << 99 << 100 << 101 << 102 << 103 << 106
266+
<< 108 << 110 << 111 << 112 << 113 << 117 << 118 << 131;
269267
grammar_ = setGrammarRules(grammar_active_rules_);
270268

271269
updateSyntTables(); // init checkboxes

0 commit comments

Comments
 (0)