1 ;;; skeleton.by -- Skeleton for creating BY files.
3 ;; Copyright (C) 2001, 2003 Eric M. Ludlam
6 ;; X-RCS: $Id: skeleton.by,v 1.1 2007-11-26 15:11:59 michaels Exp $
8 ;; .bnf is free software; you can redistribute it and/or modify
9 ;; it under the terms of the GNU General Public License as published by
10 ;; the Free Software Foundation; either version 2, or (at your option)
13 ;; This software is distributed in the hope that it will be useful,
14 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;; GNU General Public License for more details.
18 ;; You should have received a copy of the GNU General Public License
19 ;; along with GNU Emacs; see the file COPYING. If not, write to the
20 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 ;; Boston, MA 02110-1301, USA.
24 ;; Replace occurance of "skeleton" with the name of your language.
26 ;; Replace start, and scopestart names with something apropriate for
29 %package semantic-skeleton-by
31 %languagemode skeleton-mode
33 %scopestart start_scope_rule
35 ;; Make common keywords into tokens returned by the lexer.
36 ;; This improves accuracy, makes this file more readable.
37 ;; Use SOMETHING in your rules as a terminal
38 %token SOMETHING "something"
39 ;; Adding a summary help's `eldoc' mode display useful information
41 %put SOMETHING summary "Describe something"
43 ;; Turn common punctuation elements into tokens.
44 ;; This does not effect lexical analysis or accuracy,
45 ;; but does make your file more readable.
46 %token <punctuation> PERIOD "\\`[.]\\'"
47 %token <punctuation> OPERATORS "[-+*/%^|&]"
51 starting_rule : something
54 start_scope_rule : something_else
61 ;; Examples from c.by:
63 opt-expression : expression
67 ;; This expression parses over expressions, but doesn't return
77 | OPERATORS expression
81 ;;; skeleton.by ends here