From 07892f6f1a61440ccb4649ed15c2857e7cc63029 Mon Sep 17 00:00:00 2001 From: xscript Date: Fri, 29 Apr 2011 02:32:56 +0200 Subject: [PATCH] Move tests in cedet/semantic --- .../cedet/cedet/semantic/tests/gr-test.wy | 103 ++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 test/manual/cedet/cedet/semantic/tests/gr-test.wy 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 00000000000..029f11e16c9 --- /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 +;; Maintainer: David Ponce +;; 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 NUM + +;; Generate a string compare analyzer for punctuations +%type syntax "\\(\\s.\\|\\s$\\|\\s'\\)+" matchdatatype string + +%token NOT "!" +%token NOTEQ "!=" +%token MOD "%" +%token MODEQ "%=" +%token AND "&" +%token ANDAND "&&" +%token ANDEQ "&=" +%token MULT "*" +%token MULTEQ "*=" +%token PLUS "+" +%token PLUSPLUS "++" +%token PLUSEQ "+=" +%token COMMA "," +%token MINUS "-" +%token MINUSMINUS "--" +%token MINUSEQ "-=" +%token DOT "." +%token DIV "/" +%token DIVEQ "/=" +%token COLON ":" +%token SEMICOLON ";" +%token LT "<" +%token LSHIFT "<<" +%token LSHIFTEQ "<<=" +%token LTEQ "<=" +%token EQ "=" +%token EQEQ "==" +%token GT ">" +%token GTEQ ">=" +%token RSHIFT ">>" +%token RSHIFTEQ ">>=" +%token URSHIFT ">>>" +%token URSHIFTEQ ">>>=" +%token QUESTION "?" +%token XOR "^" +%token XOREQ "^=" +%token OR "|" +%token OREQ "|=" +%token OROR "||" +%token COMP "~" + +;; Generate a block analyzer for paren-like blocks +%type syntax "\\s(\\|\\s)" matchdatatype block + +%token LPAREN "(" +%token RPAREN ")" +%token LBRACE "{" +%token RBRACE "}" +%token LBRACK "[" +%token RBRACK "]" + +%token PAREN_BLOCK "(LPAREN RPAREN)" +%token BRACE_BLOCK "(LBRACE RBRACE)" +%token BRACK_BLOCK "(LBRACK RBRACK)" + +;; Generate a regexp match analyzer for symbols +%type syntax "\\(\\sw\\|\\s_\\)+" + +%token IDENTIFIER +%token DOLLARVAR "^[$]" + +%% + +;; Need at least one rule! +dummy: + ;;EMPTY + ; + +;;; gr-test.wy ends here -- 2.39.5