[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/last-cedet-merge fb127f2 34/50: semantic: C gramma
From: |
David Engster |
Subject: |
[Emacs-diffs] scratch/last-cedet-merge fb127f2 34/50: semantic: C grammar fixes |
Date: |
Wed, 25 Jan 2017 22:15:22 +0000 (UTC) |
branch: scratch/last-cedet-merge
commit fb127f25742c949dbf287a49f26cf8386c08dbf3
Author: Eric Ludlam <address@hidden>
Commit: David Engster <address@hidden>
semantic: C grammar fixes
* admin/grammars/c.by (constexpr, noexcept): New.
(cvdeclmod, metadeclmod,post-fcn-modifiers): Add ocurences of
above.
(expr-start): Allow to be empty.
(expression): Delete - simplify to just find unaryexpression followed
by more.
(opt-more-expression): New - has specifics originally in expression.
(unaryexpression): Simplified a couple bits around lists and unary
expressions.
---
admin/grammars/c.by | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/admin/grammars/c.by b/admin/grammars/c.by
index 38a33f9..7488c75 100644
--- a/admin/grammars/c.by
+++ b/admin/grammars/c.by
@@ -94,6 +94,7 @@
%put STATIC summary "Declaration Modifier: static <type> <name> ..."
%token CONST "const"
%put CONST summary "Declaration Modifier: const <type> <name> ..."
+%token CONSTEXPR "constexpr"
%token VOLATILE "volatile"
%put VOLATILE summary "Declaration Modifier: volatile <type> <name> ..."
%token REGISTER "register"
@@ -150,6 +151,7 @@
%token TRY "try"
%token CATCH "catch"
%put { TRY CATCH } summary "try { <body> } catch { <catch code> }"
+%token NOEXCEPT "noexcept"
;; Leave these alone for now.
%token OPERATOR "operator"
@@ -680,6 +682,7 @@ metadeclmod
CVDECLMOD
: CONST
+ | CONSTEXPR
| VOLATILE
;
@@ -695,6 +698,7 @@ cv-declmods
METADECLMOD
: VIRTUAL
| MUTABLE
+ | EXPLICIT
;
;; C++: A type can be modified into a reference by "&"
@@ -858,6 +862,7 @@ post-fcn-modifiers
| CONST
| OVERRIDE
| FINAL
+ | NOEXCEPT
;
opt-throw
@@ -1203,6 +1208,7 @@ expr-start
| PLUS
| STAR
| AMPERSAND
+ | ;; EMPTY
;
expr-binop
@@ -1221,12 +1227,14 @@ expr-binop
;; Use expression for parsing only. Don't actually return anything
;; for now. Hopefully we can fix this later.
expression
- : unaryexpression QUESTION unaryexpression COLON unaryexpression
- ( (identity start) (identity end) )
- | unaryexpression expr-binop unaryexpression
- ( (identity start) (identity end) )
- | unaryexpression
- ( (identity start) (identity end) )
+ : expr-start unaryexpression opt-more-expression
+ ( (identity start) (- end 1) )
+ ;
+
+opt-more-expression
+ : QUESTION unaryexpression COLON unaryexpression
+ | expr-binop unaryexpression
+ | ;; EMPTY
;
unaryexpression
@@ -1240,9 +1248,9 @@ unaryexpression
| string-seq
| type-cast expression ;; A cast to some other type
;; Casting the results of one expression to something else.
- | semantic-list expression
+ | semantic-list unaryexpression
| semantic-list
- | expr-start expression
+ ;;| expr-start expression
;
;;; c.by ends here
- [Emacs-diffs] scratch/last-cedet-merge fdd5968 15/50: semantic: New function to calculate scope around tag, (continued)
- [Emacs-diffs] scratch/last-cedet-merge fdd5968 15/50: semantic: New function to calculate scope around tag, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge ebc59a5 19/50: semantic: Accept FLAGS parameter for srecode-template-mode, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 47471b9 12/50: EDE: Add missing require and silence byte compiler, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 7308eaf 18/50: semantic: Accept FLAGS parameter for makefile-mode for analyzing completions, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge b4d1399 14/50: EDE: Rework config file detection, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 95f8a69 29/50: semantic: More C grammar optimizations, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge deaa8c9 24/50: semantic: New function to find library with macro definition, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 0391760 13/50: semantic: Do not strip '*' from operator, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 6ca095c 21/50: semantic: Add autoload for Add autoload for `semantic-analyze-debug-assist', David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge f3674d0 33/50: semantic: Parse C++ override/final correctly, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge fb127f2 34/50: semantic: C grammar fixes,
David Engster <=
- [Emacs-diffs] scratch/last-cedet-merge cc30b46 11/50: EDE: Move ede-global-list-sanity-check to ede/files.el, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 5cb7aed 22/50: semantic: New c-mode override for analyzing tag type members, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge c2d4ad8 23/50: semantic: Update keybinings for grammar mode, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 03c5f0d 25/50: semantic: Add more syntax modifications for scheme lexer, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 6b57c5b 20/50: semantic: Introduce `semantic-analyze-tag-type-members', David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 02644fe 36/50: semantic: Add missing save-excursion for scope calculation, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 50139fb 45/50: semantic: Fix scope calculation for 'enum', David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 03bb495 44/50: semantic: Fix for Python lexer, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 3cbb968 47/50: semantic: Use file name for grammar name instead of %package token, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 6d6b045 27/50: EDE: Improve Emacs project type, David Engster, 2017/01/25