1 # Skeleton for creating BNF files.
3 # Copyright (C) 2001 Eric M. Ludlam
6 # X-RCS: $Id: skeleton.bnf,v 1.1 2001/10/08 20:34:56 zappo 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., 59 Temple Place - Suite 330,
21 # Boston, MA 02111-1307, USA.
25 # Replace occurance of "skeleton" with the name of your language.
27 # Replace start, and scopestart names with something apropriate for
31 %scopestart start_scope_rule
32 %outputfile semantic-skel.el
33 %parsetable semantic-toplevel-skeleton-bovine-table
34 %keywordtable semantic-skeleton-keyword-table
35 %languagemode skeleton-mode
36 %setupfunction semantic-default-skeleton-setup
38 # Commented out lines below are generally considered optional
39 # See the Emacs Doc for the symbols used below
40 %(setq semantic-symbol->name-assoc-list '( (variable . "Variables")
42 (function . "Functions")
43 (include . "Includes")
44 (package . "Exports"))
45 #semantic-expand-nonterminal 'semantic-expand-skeleton-nonterminal
46 #semantic-flex-extensions semantic-flex-skeleton-extensions
47 #semantic-dependency-include-path semantic-default-skeleton-path
48 imenu-create-index-function 'semantic-create-imenu-index
49 semantic-type-relation-separator-character '(".")
50 semantic-command-separation-character ";"
51 document-comment-start "/*"
52 document-comment-line-prefix " *"
53 document-comment-end " */"
54 ;; Semantic navigation inside 'type children
55 senator-step-at-token-ids '(function variable)
58 # Make common keywords into tokens returned by the lexer.
59 # This improves accuracy, makes this file more readable.
60 # Use SOMETHING in your rules as a terminal
61 %token SOMETHING "something"
62 # Adding a summary help's `eldoc' mode display useful information
64 %put SOMETHING summary "Describe something"
66 # Turn common punctuation elements into tokens.
67 # This does not effect lexical analysis or accuracy,
68 # but does make your file more readable.
69 %token PERIOD punctuation "."
71 starting_rule : something
74 start_scope_rule : something_else
81 # Examples from c.bnf:
83 opt-expression : expression
87 # This expression parses over expressions, but doesn't return
97 | punctuation "[-+*/%^|&]" expression