view lisp/cedet/semantic/bovine/make-by.el @ 109744:fdbd24f8d999

Fix warnings produced by compiling with -Wwrite_strings (i.e. use const char *). * b2m.c (concat, fatal): Use const char*. (main): Don't assign labels a string literal. * ebrowse.c (struct member): filename, def_filename is const. (struct sym): filename, sfilename is const. (struct kw): name is const. (add_sym, yyerror, token_string, insert_keyword, main): Use const char*. * emacsclient.c (message, sock_err_message, send_to_emacs) (quote_argument, set_local_socket) (start_daemon_and_retry_set_socket): Use const char*. * etags.c (compressor, language, Ada_suffix, Ada_help, Asm_suffixes) (Asm_help, default_C_suffixes, default_C_help, Cplusplus_suffixes) (Cplusplus_help, Cjava_suffixes, Cobol_suffixes, Cstar_suffixes) (Erlang_suffixes, Erlang_help, Forth_suffixes, Forth_help) (Fortran_suffixes, Fortran_help, HTML_suffixes, HTML_help) (Lisp_suffixes, Lisp_help, Lua_suffixes, Lua_help) (Makefile_filenames, Makefile_help, Objc_suffixes, Objc_help) (Pascal_suffixes, Pascal_help, Perl_suffixes, Perl_interpreters) (Perl_help, PHP_suffixes, PHP_help, plain_C_suffixses, PS_suffixes) (PS_help, Prolog_suffixes, Prolog_help, Python_suffixes, Python_help) (Scheme_suffixes, Scheme_help, TeX_suffixes, TeX_help, Texinfo_suffixes) (Texinfo_help, Yacc_suffixes, Yacc_help, auto_help, none_help) (no_lang_help, print_language_names) (get_language_from_interpreter, get_language_from_filename) (init, make_tag, struct C_stab_entry, write_classname, TEX_defenv) (TEX_decode_env, nocase_tail, savestr, savenstr, fatal, pfatal) (concat): Use const char*. * make-docfile.c (error, fatal, scan_c_file, scan_lisp_file): Use const char *. * movemail.c (fatal, error, concat): Use const char *. * pop.c (pop_multi_first, socket_connection, sendline): Use conat char*. * pop.h (pop_multi_first): Use const char *. (_ARGS): Remove. * sorted-doc.c (error, fatal, states): Use const char *. * update-game-score.c (get_prefix, write_scores, main): Use const char*.
author Jan D <jan.h.d@swipnet.se>
date Wed, 11 Aug 2010 10:20:34 +0200
parents 1d1d5d9bd884
children 376148b31b5e
line wrap: on
line source

;;; semantic/bovine/make-by.el --- Generated parser support file

;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2008, 2009, 2010
;;   Free Software Foundation, Inc.

;; This file is part of GNU Emacs.

;; GNU Emacs 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.

;; GNU Emacs 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.  If not, see <http://www.gnu.org/licenses/>.

;;; Commentary:
;;
;; This file was generated from the grammar file
;; semantic/bovine/make.by in the CEDET repository.

;;; Code:

(require 'semantic/lex)
(eval-when-compile (require 'semantic/bovine))


;;; Prologue
;;

;;; Declarations
;;
(defconst semantic-make-by--keyword-table
  (semantic-lex-make-keyword-table
   '(("if" . IF)
     ("ifdef" . IFDEF)
     ("ifndef" . IFNDEF)
     ("ifeq" . IFEQ)
     ("ifneq" . IFNEQ)
     ("else" . ELSE)
     ("endif" . ENDIF)
     ("include" . INCLUDE))
   '(("include" summary "Macro: include filename1 filename2 ...")
     ("ifneq" summary "Conditional: ifneq (expression) ... else ... endif")
     ("ifeq" summary "Conditional: ifeq (expression) ... else ... endif")
     ("ifndef" summary "Conditional: ifndef (expression) ... else ... endif")
     ("ifdef" summary "Conditional: ifdef (expression) ... else ... endif")
     ("endif" summary "Conditional: if (expression) ... else ... endif")
     ("else" summary "Conditional: if (expression) ... else ... endif")
     ("if" summary "Conditional: if (expression) ... else ... endif")))
  "Table of language keywords.")

(defconst semantic-make-by--token-table
  (semantic-lex-make-type-table
   '(("punctuation"
      (BACKSLASH . "\\`[\\]\\'")
      (DOLLAR . "\\`[$]\\'")
      (EQUAL . "\\`[=]\\'")
      (PLUS . "\\`[+]\\'")
      (COLON . "\\`[:]\\'")))
   'nil)
  "Table of lexical tokens.")

(defconst semantic-make-by--parse-table
  `(
    (bovine-toplevel
     (Makefile)
     ) ;; end bovine-toplevel

    (Makefile
     (bol
      newline
      ,(semantic-lambda
	(list nil))
      )
     (bol
      variable
      ,(semantic-lambda
	(nth 1 vals))
      )
     (bol
      rule
      ,(semantic-lambda
	(nth 1 vals))
      )
     (bol
      conditional
      ,(semantic-lambda
	(nth 1 vals))
      )
     (bol
      include
      ,(semantic-lambda
	(nth 1 vals))
      )
     (whitespace
      ,(semantic-lambda
	(list nil))
      )
     (newline
      ,(semantic-lambda
	(list nil))
      )
     ) ;; end Makefile

    (variable
     (symbol
      opt-whitespace
      equals
      opt-whitespace
      element-list
      ,(semantic-lambda
	(semantic-tag-new-variable
	 (nth 0 vals) nil
	 (nth 4 vals)))
      )
     ) ;; end variable

    (rule
     (targets
      opt-whitespace
      colons
      opt-whitespace
      element-list
      commands
      ,(semantic-lambda
	(semantic-tag-new-function
	 (nth 0 vals) nil
	 (nth 4 vals)))
      )
     ) ;; end rule

    (targets
     (target
      opt-whitespace
      targets
      ,(semantic-lambda
	(list
	 (car
	  (nth 0 vals))
	 (car
	  (nth 2 vals))))
      )
     (target
      ,(semantic-lambda
	(list
	 (car
	  (nth 0 vals))))
      )
     ) ;; end targets

    (target
     (sub-target
      target
      ,(semantic-lambda
	(list
	 (concat
	  (car
	   (nth 0 vals))
	  (car
	   (nth 2 vals)))))
      )
     (sub-target
      ,(semantic-lambda
	(list
	 (car
	  (nth 0 vals))))
      )
     ) ;; end target

    (sub-target
     (symbol)
     (string)
     (varref)
     ) ;; end sub-target

    (conditional
     (IF
      some-whitespace
      symbol
      newline
      ,(semantic-lambda
	(list nil))
      )
     (IFDEF
      some-whitespace
      symbol
      newline
      ,(semantic-lambda
	(list nil))
      )
     (IFNDEF
      some-whitespace
      symbol
      newline
      ,(semantic-lambda
	(list nil))
      )
     (IFEQ
      some-whitespace
      expression
      newline
      ,(semantic-lambda
	(list nil))
      )
     (IFNEQ
      some-whitespace
      expression
      newline
      ,(semantic-lambda
	(list nil))
      )
     (ELSE
      newline
      ,(semantic-lambda
	(list nil))
      )
     (ENDIF
      newline
      ,(semantic-lambda
	(list nil))
      )
     ) ;; end conditional

    (expression
     (semantic-list)
     ) ;; end expression

    (include
     (INCLUDE
      some-whitespace
      element-list
      ,(semantic-lambda
	(semantic-tag-new-include
	 (nth 2 vals) nil))
      )
     ) ;; end include

    (equals
     (punctuation
      "\\`[:]\\'"
      punctuation
      "\\`[=]\\'"
      ,(semantic-lambda)
      )
     (punctuation
      "\\`[+]\\'"
      punctuation
      "\\`[=]\\'"
      ,(semantic-lambda)
      )
     (punctuation
      "\\`[=]\\'"
      ,(semantic-lambda)
      )
     ) ;; end equals

    (colons
     (punctuation
      "\\`[:]\\'"
      punctuation
      "\\`[:]\\'"
      ,(semantic-lambda)
      )
     (punctuation
      "\\`[:]\\'"
      ,(semantic-lambda)
      )
     ) ;; end colons

    (element-list
     (elements
      newline
      ,(semantic-lambda
	(nth 0 vals))
      )
     ) ;; end element-list

    (elements
     (element
      some-whitespace
      elements
      ,(semantic-lambda
	(nth 0 vals)
	(nth 2 vals))
      )
     (element
      ,(semantic-lambda
	(nth 0 vals))
      )
     ( ;;EMPTY
      )
     ) ;; end elements

    (element
     (sub-element
      element
      ,(semantic-lambda
	(list
	 (concat
	  (car
	   (nth 0 vals))
	  (car
	   (nth 1 vals)))))
      )
     ( ;;EMPTY
      )
     ) ;; end element

    (sub-element
     (symbol)
     (string)
     (punctuation)
     (semantic-list
      ,(semantic-lambda
	(list
	 (buffer-substring-no-properties
	  (identity start)
	  (identity end))))
      )
     ) ;; end sub-element

    (varref
     (punctuation
      "\\`[$]\\'"
      semantic-list
      ,(semantic-lambda
	(list
	 (buffer-substring-no-properties
	  (identity start)
	  (identity end))))
      )
     ) ;; end varref

    (commands
     (bol
      shell-command
      newline
      commands
      ,(semantic-lambda
	(list
	 (nth 0 vals))
	(nth 1 vals))
      )
     ( ;;EMPTY
      ,(semantic-lambda)
      )
     ) ;; end commands

    (opt-whitespace
     (some-whitespace
      ,(semantic-lambda
	(list nil))
      )
     ( ;;EMPTY
      )
     ) ;; end opt-whitespace

    (some-whitespace
     (whitespace
      some-whitespace
      ,(semantic-lambda
	(list nil))
      )
     (whitespace
      ,(semantic-lambda
	(list nil))
      )
     ) ;; end some-whitespace
    )
  "Parser table.")

(defun semantic-make-by--install-parser ()
  "Setup the Semantic Parser."
  (setq semantic--parse-table semantic-make-by--parse-table
	semantic-debug-parser-source "make.by"
	semantic-debug-parser-class 'semantic-bovine-debug-parser
	semantic-flex-keywords-obarray semantic-make-by--keyword-table
	))

(provide 'semantic/bovine/make-by)

;; arch-tag: 8c3749b8-7b19-46e0-af01-2a4d02fd0352
;;; semantic/bovine/make-by.el ends here