From: Eric Ludlam Date: Wed, 26 Nov 2014 15:42:46 +0000 (-0500) Subject: Tests for completiong symbols in wisent grammars. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cdfb2f7a0a45d9210e9e6bcf3c38b118974eaee6;p=emacs.git Tests for completiong symbols in wisent grammars. --- diff --git a/test/manual/cedet/cedet/semantic/tests/testwisent.wy b/test/manual/cedet/cedet/semantic/tests/testwisent.wy new file mode 100644 index 00000000000..4ee2c1c60af --- /dev/null +++ b/test/manual/cedet/cedet/semantic/tests/testwisent.wy @@ -0,0 +1,82 @@ +;; testwisent.wy --- +;; +;; Copyright (C) 2014 Eric Ludlam +;; +;; Author: Eric Ludlam +;; +;; 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 3 of the +;; License, or (at your option) any later version. + +;; This program 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 this program. If not, see http://www.gnu.org/licenses/. + +;;; Commentary: +;; +;; Parser for nothing in particular mode + +%languagemode nothing-mode +%parsetable wisent-nothing-parser-tables +%keywordtable wisent-nothing-keywords +%tokentable wisent-nothing-tokens +%languagemode nothing-mode +%setupfunction wisent-nothing-default-setup + +%start goal + +;;; Punctuation +%type ;;syntax "\\(\\s.\\|\\s$\\|\\s'\\)+" matchdatatype string + +%token DOT "." +%token COMA "," +%token COLONCOLON "::" +%token COLON ":" +%token SEMICOLON ";" + +;;; KEYWORDS +%type + +%keyword COLONOSCOPY "colonoscopy" +%keyword SEMISOMETHING "semisomething" + +%% + +goal + : COLON ;; -1- + ;; #1# ( "COLONCOLON" "COLON" "COLONOSCOPY" ) + | SEMI ;; -2- + ;; #2# ( "SEMI_useless_rule" "SEMICOLON" "SEMISOMETHING" ) + | thing ;; -3- + ;; #3# ( "thing_term_1" "thing_term_2" ) + ; + +SEMI_useless_rule + : + ; + +thing_term_1 + : + ; + +thing_term_2 + : + ; + +%% +(define-lex wisent-nothing-lexer + "Lexical analyzer to handle nothing in particular buffers." + ;; semantic-lex-newline + semantic-lex-ignore-whitespace + semantic-lex-ignore-newline + semantic-lex-ignore-comments + + semantic-lex-default-action + ) + +;; testwisent.wy ends here \ No newline at end of file