mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-29 08:31:35 -08:00
63b04c11d5Fix copyright years by hand5c7dd8a783Update copyright year to 2018220a9ecba1Merge from Gnulib312c565566Don't add empty keyboard macro to macro ring (Bug#24992)39ca289a7aAllow customization of decoding of "man" commandf8240815ea* etc/NEWS: Add security consideration note on passphrase ...0c78822c70Fix subtle problem with scroll-down when scroll-margin is ...acd289c5a4Fix problems with indexing in User manualb240c7846b* lisp/help.el (describe-key): Only (copy-sequence elt) wh...e879a5444a* src/buffer.c (Frestore_buffer_modified_p): Fix bug#2984681b1028b63Improve documentation of 'inhibit-modification-hooks' and ...7175496d7aFix doc string of 'enable-recursive-minibuffers'5b38406491Fix documentation of delsel and of killing text # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex
174 lines
4.1 KiB
Text
174 lines
4.1 KiB
Text
;;; make.by -- BY notation for Makefiles.
|
|
|
|
;; Copyright (C) 1999-2018 Free Software Foundation, Inc.
|
|
;;
|
|
;; Author: Eric M. Ludlam <zappo@gnu.org>
|
|
;; David Ponce <david@dponce.com>
|
|
;; Klaus Berndl <klaus.berndl@sdm.de>
|
|
;;
|
|
;; 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 <https://www.gnu.org/licenses/>.
|
|
|
|
%package semantic-make-by
|
|
%provide semantic/bovine/make-by
|
|
|
|
%languagemode makefile-mode
|
|
%start Makefile
|
|
|
|
;; This was always a test case.
|
|
%quotemode backquote
|
|
|
|
%token IF "if"
|
|
%token IFDEF "ifdef"
|
|
%token IFNDEF "ifndef"
|
|
%token IFEQ "ifeq"
|
|
%token IFNEQ "ifneq"
|
|
%token ELSE "else"
|
|
%token ENDIF "endif"
|
|
%token INCLUDE "include"
|
|
|
|
%put { IF ELSE ENDIF } summary "Conditional: if (expression) ... else ... endif"
|
|
%put IFDEF summary "Conditional: ifdef (expression) ... else ... endif"
|
|
%put IFNDEF summary "Conditional: ifndef (expression) ... else ... endif"
|
|
%put IFEQ summary "Conditional: ifeq (expression) ... else ... endif"
|
|
%put IFNEQ summary "Conditional: ifneq (expression) ... else ... endif"
|
|
%put INCLUDE summary "Macro: include filename1 filename2 ..."
|
|
|
|
%token <punctuation> COLON "\\`[:]\\'"
|
|
%token <punctuation> PLUS "\\`[+]\\'"
|
|
%token <punctuation> EQUAL "\\`[=]\\'"
|
|
%token <punctuation> DOLLAR "\\`[$]\\'"
|
|
%token <punctuation> BACKSLASH "\\`[\\]\\'"
|
|
|
|
%%
|
|
|
|
;; Escape the ,@ below because the reader doesn't correctly detect
|
|
;; old-style backquotes for this case. The backslashes can be removed
|
|
;; once old-style backquotes are completely gone (probably in
|
|
;; Emacs 28).
|
|
|
|
Makefile : bol newline (nil)
|
|
| bol variable
|
|
( \,@$2 )
|
|
| bol rule
|
|
( \,@$2 )
|
|
| bol conditional
|
|
( \,@$2 )
|
|
| bol include
|
|
( \,@$2 )
|
|
| whitespace ( nil )
|
|
| newline ( nil )
|
|
;
|
|
|
|
variable: symbol opt-whitespace equals opt-whitespace element-list
|
|
(VARIABLE-TAG ,$1 nil ,$5)
|
|
;
|
|
|
|
rule: targets opt-whitespace colons opt-whitespace element-list commands
|
|
(FUNCTION-TAG ,$1 nil ,$5)
|
|
;
|
|
|
|
targets: target opt-whitespace targets
|
|
( (car ,$1) (car ,@$3) )
|
|
| target
|
|
( (car ,$1) )
|
|
;
|
|
|
|
target: sub-target target
|
|
( (concat (car ,$1) (car ,@$3) ) )
|
|
| sub-target
|
|
( (car ,$1) )
|
|
;
|
|
|
|
sub-target: symbol
|
|
| string
|
|
| varref
|
|
;
|
|
|
|
conditional: IF some-whitespace symbol newline
|
|
( nil )
|
|
| IFDEF some-whitespace symbol newline
|
|
( nil )
|
|
| IFNDEF some-whitespace symbol newline
|
|
( nil )
|
|
| IFEQ some-whitespace expression newline
|
|
( nil )
|
|
| IFNEQ some-whitespace expression newline
|
|
( nil )
|
|
| ELSE newline
|
|
( nil )
|
|
| ENDIF newline
|
|
( nil )
|
|
;
|
|
|
|
expression : semantic-list
|
|
;
|
|
|
|
include: INCLUDE some-whitespace element-list
|
|
(INCLUDE-TAG ,$3 nil)
|
|
;
|
|
|
|
equals: COLON EQUAL ()
|
|
| PLUS EQUAL ()
|
|
| EQUAL ()
|
|
;
|
|
|
|
colons: COLON COLON ()
|
|
| COLON ()
|
|
;
|
|
|
|
element-list: elements newline
|
|
( \,@$1 )
|
|
;
|
|
|
|
elements: element some-whitespace elements
|
|
( \,@$1 ,@$3 )
|
|
| element
|
|
( \,@$1 )
|
|
| ;;EMPTY
|
|
;
|
|
|
|
element: sub-element element
|
|
( (concat (car ,$1) (car ,$2)) )
|
|
| ;;EMPTY
|
|
;
|
|
|
|
sub-element: symbol
|
|
| string
|
|
| punctuation
|
|
| semantic-list
|
|
( (buffer-substring-no-properties
|
|
(identity start) (identity end)) )
|
|
;
|
|
|
|
varref: DOLLAR semantic-list
|
|
( (buffer-substring-no-properties (identity start) (identity end)) )
|
|
;
|
|
|
|
commands: bol shell-command newline commands
|
|
( ,$1 ,@$2 )
|
|
| ;;EMPTY
|
|
( )
|
|
;
|
|
|
|
opt-whitespace : some-whitespace ( nil )
|
|
| ;;EMPTY
|
|
;
|
|
|
|
some-whitespace : whitespace some-whitespace (nil)
|
|
| whitespace (nil)
|
|
;
|
|
|
|
;;; make.by ends here
|