aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorLars Ingebrigtsen2019-06-19 13:47:22 +0200
committerLars Ingebrigtsen2019-06-19 13:48:49 +0200
commit390b4bc1e25fe691548d7ec982eb2f7027fe26a3 (patch)
tree3355d4c19e87fbe9814339a7f82cb30bd458fadd /admin
parenteef48e124da251605ea05579aac196f2f8e2f534 (diff)
downloademacs-390b4bc1e25fe691548d7ec982eb2f7027fe26a3.tar.gz
emacs-390b4bc1e25fe691548d7ec982eb2f7027fe26a3.zip
Allow specifying the expected number of shift/reduce conflicts
* admin/grammars/grammar.wy: Add %expectedconflicts. * lisp/cedet/semantic/grammar-wy.el (semantic-grammar-wy--keyword-table): Ditto. * lisp/cedet/semantic/grammar.el (semantic-grammar-expected-conflicts): New function. (semantic-grammar-insert-defconst-with-eval): New function. (semantic-grammar-create-package): Output the number of expected shift/reduce conflicts. * lisp/cedet/semantic/wisent/comp.el (wisent-total-conflicts): Don't output the warning if the number of shift/reduce conflicts is expected. (wisent-expected-conflicts): Made obsolete.
Diffstat (limited to 'admin')
-rw-r--r--admin/grammars/grammar.wy7
-rw-r--r--admin/grammars/python.wy1
2 files changed, 8 insertions, 0 deletions
diff --git a/admin/grammars/grammar.wy b/admin/grammars/grammar.wy
index 5b06917d7db..81fd1b0b79c 100644
--- a/admin/grammars/grammar.wy
+++ b/admin/grammars/grammar.wy
@@ -52,6 +52,7 @@
52%keyword LEFT "%left" 52%keyword LEFT "%left"
53%keyword NONASSOC "%nonassoc" 53%keyword NONASSOC "%nonassoc"
54%keyword PACKAGE "%package" 54%keyword PACKAGE "%package"
55%keyword EXPECTEDCONFLICTS "%expectedconflicts"
55%keyword PROVIDE "%provide" 56%keyword PROVIDE "%provide"
56%keyword PREC "%prec" 57%keyword PREC "%prec"
57%keyword PUT "%put" 58%keyword PUT "%put"
@@ -135,6 +136,7 @@ decl:
135 | no_default_prec_decl 136 | no_default_prec_decl
136 | languagemode_decl 137 | languagemode_decl
137 | package_decl 138 | package_decl
139 | expectedconflicts_decl
138 | provide_decl 140 | provide_decl
139 | precedence_decl 141 | precedence_decl
140 | put_decl 142 | put_decl
@@ -167,6 +169,11 @@ package_decl:
167 `(PACKAGE-TAG ',$2 nil) 169 `(PACKAGE-TAG ',$2 nil)
168 ; 170 ;
169 171
172expectedconflicts_decl:
173 EXPECTEDCONFLICTS symbols
174 `(TAG ',(car $2) 'expectedconflicts :rest ',(cdr $2))
175 ;
176
170provide_decl: 177provide_decl:
171 PROVIDE SYMBOL 178 PROVIDE SYMBOL
172 `(TAG ',$2 'provide) 179 `(TAG ',$2 'provide)
diff --git a/admin/grammars/python.wy b/admin/grammars/python.wy
index 082850df59c..0e926ad3636 100644
--- a/admin/grammars/python.wy
+++ b/admin/grammars/python.wy
@@ -88,6 +88,7 @@
88 88
89%package wisent-python-wy 89%package wisent-python-wy
90%provide semantic/wisent/python-wy 90%provide semantic/wisent/python-wy
91%expectedconflicts 4
91 92
92%{ 93%{
93(declare-function wisent-python-reconstitute-function-tag 94(declare-function wisent-python-reconstitute-function-tag