emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] scratch/merge-cedet-tests 07892f6 287/316: Move tests in c


From: Edward John Steere
Subject: [Emacs-diffs] scratch/merge-cedet-tests 07892f6 287/316: Move tests in cedet/semantic
Date: Fri, 27 Jan 2017 20:03:47 +0000 (UTC)

branch: scratch/merge-cedet-tests
commit 07892f6f1a61440ccb4649ed15c2857e7cc63029
Author: xscript <address@hidden>
Commit: Edward John Steere <address@hidden>

    Move tests in cedet/semantic
---
 test/manual/cedet/cedet/semantic/tests/gr-test.wy |  103 +++++++++++++++++++++
 1 file changed, 103 insertions(+)

diff --git a/test/manual/cedet/cedet/semantic/tests/gr-test.wy 
b/test/manual/cedet/cedet/semantic/tests/gr-test.wy
new file mode 100644
index 0000000..029f11e
--- /dev/null
+++ b/test/manual/cedet/cedet/semantic/tests/gr-test.wy
@@ -0,0 +1,103 @@
+;;; gr-test.wy -- Test grammar to generate lexical analyzers
+;;
+;; Copyright (C) 2004 David Ponce
+;;
+;; Author: David Ponce <address@hidden>
+;; Maintainer: David Ponce <address@hidden>
+;; Created: 13 Jan 2004
+;; Keywords: syntax
+;;
+;; This file is not part of GNU Emacs.
+;;
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 2, or (at
+;; your option) any later version.
+;;
+;; This software is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+%package gr-test-wy
+
+;; By default, don't generate analyzer (no `syntax' property)
+%token <number> NUM
+
+;; Generate a string compare analyzer for punctuations
+%type <punctuation> syntax "\\(\\s.\\|\\s$\\|\\s'\\)+" matchdatatype string
+
+%token <punctuation>   NOT             "!"
+%token <punctuation>   NOTEQ           "!="
+%token <punctuation>   MOD             "%"
+%token <punctuation>   MODEQ           "%="
+%token <punctuation>   AND        "&"
+%token <punctuation>   ANDAND     "&&"
+%token <punctuation>   ANDEQ      "&="
+%token <punctuation>   MULT       "*"
+%token <punctuation>   MULTEQ     "*="
+%token <punctuation>   PLUS       "+"
+%token <punctuation>   PLUSPLUS   "++"
+%token <punctuation>   PLUSEQ     "+="
+%token <punctuation>   COMMA      ","
+%token <punctuation>   MINUS      "-"
+%token <punctuation>   MINUSMINUS "--"
+%token <punctuation>   MINUSEQ    "-="
+%token <punctuation>   DOT        "."
+%token <punctuation>   DIV        "/"
+%token <punctuation>   DIVEQ      "/="
+%token <punctuation>   COLON      ":"
+%token <punctuation>   SEMICOLON  ";"
+%token <punctuation>   LT         "<"
+%token <punctuation>   LSHIFT     "<<"
+%token <punctuation>   LSHIFTEQ   "<<="
+%token <punctuation>   LTEQ       "<="
+%token <punctuation>   EQ         "="
+%token <punctuation>   EQEQ       "=="
+%token <punctuation>   GT         ">"
+%token <punctuation>   GTEQ       ">="
+%token <punctuation>   RSHIFT     ">>"
+%token <punctuation>   RSHIFTEQ   ">>="
+%token <punctuation>   URSHIFT    ">>>"
+%token <punctuation>   URSHIFTEQ  ">>>="
+%token <punctuation>   QUESTION   "?"
+%token <punctuation>   XOR        "^"
+%token <punctuation>   XOREQ      "^="
+%token <punctuation>   OR         "|"
+%token <punctuation>   OREQ       "|="
+%token <punctuation>   OROR       "||"
+%token <punctuation>   COMP       "~"
+
+;; Generate a block analyzer for paren-like blocks
+%type <block> syntax "\\s(\\|\\s)" matchdatatype block
+
+%token <open-paren>   LPAREN      "("
+%token <close-paren>  RPAREN      ")"
+%token <open-paren>   LBRACE      "{"
+%token <close-paren>  RBRACE      "}"
+%token <open-paren>   LBRACK      "["
+%token <close-paren>  RBRACK      "]"
+
+%token <block>        PAREN_BLOCK "(LPAREN RPAREN)"
+%token <block>        BRACE_BLOCK "(LBRACE RBRACE)"
+%token <block>        BRACK_BLOCK "(LBRACK RBRACK)"
+
+;; Generate a regexp match analyzer for symbols
+%type <symbol> syntax "\\(\\sw\\|\\s_\\)+"
+
+%token <symbol> IDENTIFIER
+%token <symbol> DOLLARVAR         "^[$]"
+
+%%
+
+;; Need at least one rule!
+dummy:
+ ;;EMPTY
+  ;
+
+;;; gr-test.wy ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]