Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
728 lines (587 sloc) 16.8 KB
;; Copyright (C) 1997,1998,1999,2000,2001 Peter Milliken
;;
;; Author: Peter Milliken <peterm@resmed.com.au>,
;; <peter.milliken@exemail.com.au>
;; $Date: 2003/06/22 22:48:16 $
;;
;; Keywords: language sensitive abbreviation template placeholder token
;;
;; 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 2, 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; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
DELETE LANGUAGE "C" -
DEFINE LANGUAGE "C" -
/INITIAL_STRING="{compilation_unit}" -
/PUNCTUATION_CHARACTERS=",;:()" -
/SELF_INSERT_CHARACTERS=" `~!@#$%^&*(),.<>/?;:'[]{}=\-+|""
/VALID_IDENTIFIER_CHARACTERS="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789"
/INDENT_SIZE=2
/VERSION=1.8
END DEFINE
DELETE PLACEHOLDER COMPILATION_UNIT -
/LANGUAGE="C" -
DEFINE PLACEHOLDER COMPILATION_UNIT -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION=""
/DUPLICATION=CONTEXT_DEPENDENT -
/SEPARATOR="" -
/TYPE=NONTERMINAL -
"[module_level_comments]"
"[include_files]"
""
"[function_declaration]..."
""
"[function_definition]..."
END DEFINE
DELETE PLACEHOLDER MODULE_LEVEL_COMMENTS -
/LANGUAGE="C" -
DEFINE PLACEHOLDER MODULE_LEVEL_COMMENTS -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION=""
/DUPLICATION=CONTEXT_DEPENDENT -
/SEPARATOR="" -
/TYPE=NONTERMINAL -
"/*"
"**"
"** FILE NAME : {file_tbs}"
"**"
"** CSCI : {CSCI_names}"
"**"
"** CSC : {CSC_name}"
"**"
"** PREPARED BY : FERRANTI COMPUTER SYSTEMS (AUSTRALIA) PTY LIMITED under"
"** contract {contract_number} for {customer}"
"**"
"** DESCRIPTION : {description_text}"
"[more_text]..."
"**"
"** AUTHOR : {author_tbs}"
"**"
"** CONTENTS : {contents_tbs}"
"**"
"** DEPENDENCIES : {dependencies_tbs}"
"**"
"** HISTORY : ISSUE REFERENCES DATE DESCRIPTION"
"** ----- ---------- -------- ----------------------"
"[more_text]..."
"**"
"**"
"*/"
END DEFINE
DELETE PLACEHOLDER FILE_TBS -
/LANGUAGE="C" -
DEFINE PLACEHOLDER FILE_TBS -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION=""
/DUPLICATION=CONTEXT_DEPENDENT -
/SEPARATOR="" -
/TYPE=TERMINAL -
"Name of this file, excluding path"
END DEFINE
DELETE PLACEHOLDER CSCI_NAMES -
/LANGUAGE="C" -
DEFINE PLACEHOLDER CSCI_NAMES -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION=""
/DUPLICATION=CONTEXT_DEPENDENT -
/SEPARATOR="" -
/TYPE=TERMINAL -
"The name of the CSCI(s) to which this file belongs"
END DEFINE
DELETE PLACEHOLDER CSC_NAME -
/LANGUAGE="C" -
DEFINE PLACEHOLDER CSC_NAME -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION=""
/DUPLICATION=CONTEXT_DEPENDENT -
/SEPARATOR="" -
/TYPE=TERMINAL -
"The name of the CSC to which this file belongs"
END DEFINE
DELETE PLACEHOLDER CONTRACT_NUMBER -
/LANGUAGE="C" -
DEFINE PLACEHOLDER CONTRACT_NUMBER -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION=""
/DUPLICATION=CONTEXT_DEPENDENT -
/SEPARATOR="" -
/TYPE=NONTERMINAL -
"89012"
END DEFINE
DELETE PLACEHOLDER CUSTOMER -
/LANGUAGE="C" -
DEFINE PLACEHOLDER CUSTOMER -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION=""
/DUPLICATION=CONTEXT_DEPENDENT -
/SEPARATOR="" -
/TYPE=NONTERMINAL -
"STATE RAIL AUTHORITY of New South Wales."
END DEFINE
DELETE PLACEHOLDER DESCRIPTION_TEXT -
/LANGUAGE="C" -
DEFINE PLACEHOLDER DESCRIPTION_TEXT -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION=""
/DUPLICATION=CONTEXT_DEPENDENT -
/SEPARATOR="" -
/TYPE=TERMINAL -
"A brief functional description of what the Compilation unit does and "
"how it accomplishes it."
END DEFINE
DELETE PLACEHOLDER MORE_TEXT -
/LANGUAGE="C" -
DEFINE PLACEHOLDER MORE_TEXT -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION=""
/DUPLICATION=CONTEXT_DEPENDENT -
/SEPARATOR="" -
/TYPE=NONTERMINAL -
"** [text]"
END DEFINE
DELETE PLACEHOLDER AUTHOR_TBS -
/LANGUAGE="C" -
DEFINE PLACEHOLDER AUTHOR_TBS -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION=""
/DUPLICATION=CONTEXT_DEPENDENT -
/SEPARATOR="" -
/TYPE=TERMINAL -
"By author, department"
END DEFINE
DELETE PLACEHOLDER CONTENTS_TBS -
/LANGUAGE="C" -
DEFINE PLACEHOLDER CONTENTS_TBS -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION=""
/DUPLICATION=CONTEXT_DEPENDENT -
/SEPARATOR="" -
/TYPE=TERMINAL -
"Function Names"
END DEFINE
DELETE PLACEHOLDER DEPENDENCIES_TBS -
/LANGUAGE="C" -
DEFINE PLACEHOLDER DEPENDENCIES_TBS -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION=""
/DUPLICATION=CONTEXT_DEPENDENT -
/SEPARATOR="" -
/TYPE=TERMINAL -
"None or a description of the use of any special features, including any"
"machine, compiler or runtime aspects that affect the Compilation Unit."
"This field shall be used to record any significent assumptions or design"
"constraints which also affect the Compilation Unit."
END DEFINE
DELETE PLACEHOLDER STATEMENT -
/LANGUAGE="C" -
DEFINE PLACEHOLDER STATEMENT -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION="expression,compound,if,while,do,for,switch,break,continue,return,goto,labeled,null"
/DUPLICATION=VERTICAL -
/SEPARATOR="" -
/TYPE=MENU -
"{expression};"
"compound_statement"/TOKEN
"if"/TOKEN
"while"/TOKEN
"do"/TOKEN
"for"/TOKEN
"switch"/TOKEN
"break"/TOKEN
"continue"/TOKEN
"return"/TOKEN
"comment"/PLACEHOLDER
";"
END DEFINE
DELETE TOKEN IF -
/LANGUAGE="C" -
DEFINE TOKEN IF -
/LANGUAGE="C" -
/DESCRIPTION="tests an expression and establishes actions"
"if ({expression})"
"{"
" {statement}..."
"}"
"[else statement]"
END DEFINE
DELETE PLACEHOLDER "ELSE STATEMENT" -
/LANGUAGE="C" -
DEFINE PLACEHOLDER "ELSE STATEMENT" -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION="else {statement}"
/DUPLICATION=CONTEXT_DEPENDENT -
/SEPARATOR="" -
/TYPE=NONTERMINAL -
"else"
"{"
" {statement}..."
"}"
END DEFINE
DELETE PLACEHOLDER EXPRESSION -
/LANGUAGE="C" -
DEFINE PLACEHOLDER EXPRESSION -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION="primary, unary, binary, conditional, assignment, expression list"
/DUPLICATION=CONTEXT_DEPENDENT -
/SEPARATOR="" -
/TYPE=TERMINAL -
"primary, unary, binary, conditional, assignment, expression list"
END DEFINE
DELETE PLACEHOLDER COMMENT -
/LANGUAGE="C" -
DEFINE PLACEHOLDER COMMENT -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION=""
/DUPLICATION=CONTEXT_DEPENDENT -
/SEPARATOR="" -
/TYPE=NONTERMINAL -
"/* {text} */"
END DEFINE
DELETE PLACEHOLDER TEXT -
/LANGUAGE="C" -
DEFINE PLACEHOLDER TEXT -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION=""
/DUPLICATION=CONTEXT_DEPENDENT -
/SEPARATOR="" -
/TYPE=TERMINAL -
"type something, anything but this"
END DEFINE
DELETE TOKEN WHILE -
/LANGUAGE="C" -
DEFINE TOKEN WHILE -
/LANGUAGE="C" -
/DESCRIPTION="executes a statement as long as a particular condition is satisfied"
"while ({expression})"
"{"
" {statement}..."
"}"
END DEFINE
DELETE TOKEN DO -
/LANGUAGE="C" -
DEFINE TOKEN DO -
/LANGUAGE="C" -
/DESCRIPTION="executes a statement as long as a particular condition is satisfied"
"do"
"{"
" {statement}..."
"} while ({expression});"
END DEFINE
DELETE TOKEN FOR -
/LANGUAGE="C" -
DEFINE TOKEN FOR -
/LANGUAGE="C" -
/DESCRIPTION="executes a statement as long as a particular condition is satisfied"
"for ([expression]; [expression]; [expression])"
"{"
" {statement}..."
"}"
END DEFINE
DELETE TOKEN SWITCH -
/LANGUAGE="C" -
DEFINE TOKEN SWITCH -
/LANGUAGE="C" -
/DESCRIPTION="transfers control to one of a list of cases"
"switch ({expression})"
"{"
" [block_decl]..."
""
" {case constant_expression: statement}..."
" [default: statement]"
"}"
END DEFINE
DELETE PLACEHOLDER "CASE CONSTANT_EXPRESSION: STATEMENT" -
/LANGUAGE="C" -
DEFINE PLACEHOLDER "CASE CONSTANT_EXPRESSION: STATEMENT" -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION="case {constant_expression}: {statement}"
/DUPLICATION=VERTICAL -
/SEPARATOR="" -
/TYPE=NONTERMINAL -
"{case constant_expression:}..."
" {statement}..."
END DEFINE
DELETE PLACEHOLDER "CASE CONSTANT_EXPRESSION:" -
/LANGUAGE="C" -
DEFINE PLACEHOLDER "CASE CONSTANT_EXPRESSION:" -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION="case {constant_expression}:"
/DUPLICATION=VERTICAL -
/SEPARATOR="" -
/TYPE=NONTERMINAL -
"case {constant_expression}:"
END DEFINE
DELETE PLACEHOLDER CONSTANT_EXPRESSION -
/LANGUAGE="C" -
DEFINE PLACEHOLDER CONSTANT_EXPRESSION -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION=""
/DUPLICATION=CONTEXT_DEPENDENT -
/SEPARATOR="" -
/TYPE=TERMINAL -
"An expression involves integer constants, character constants, and"
"size of expressions, grouped by the parentheses (), connected by the"
"binary operators + - * / % & | ^ << >> == != < > <= >= or by the"
"unary operators - ~ or by the ternary operator ?:"
END DEFINE
DELETE PLACEHOLDER "DEFAULT: STATEMENT" -
/LANGUAGE="C" -
DEFINE PLACEHOLDER "DEFAULT: STATEMENT" -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION="default: {statement}"
/DUPLICATION=CONTEXT_DEPENDENT -
/SEPARATOR="" -
/TYPE=NONTERMINAL -
"default:"
" {statement}..."
END DEFINE
DELETE TOKEN CONTINUE -
/LANGUAGE="C" -
DEFINE TOKEN CONTINUE -
/LANGUAGE="C" -
/DESCRIPTION="passes control to the bottom of the smallest enclosing while,do,for statement"
"continue;"
END DEFINE
DELETE TOKEN BREAK -
/LANGUAGE="C" -
DEFINE TOKEN BREAK -
/LANGUAGE="C" -
/DESCRIPTION="transfers control out of the smallest enclosing while,do,for,switch statement"
"break;"
END DEFINE
DELETE TOKEN RETURN -
/LANGUAGE="C" -
DEFINE TOKEN RETURN -
/LANGUAGE="C" -
/DESCRIPTION="transfers control to the caller function (with a return value)"
"return [expression];"
END DEFINE
DELETE PLACEHOLDER FUNCTION_DEFINITION -
/LANGUAGE="C" -
DEFINE PLACEHOLDER FUNCTION_DEFINITION -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION="defines a function"
/DUPLICATION=VERTICAL -
/SEPARATOR="" -
/TYPE=MENU -
"function_def"/PLACEHOLDER
"main_function_def"/TOKEN
END DEFINE
DELETE PLACEHOLDER FUNCTION_DEF -
/LANGUAGE="C" -
DEFINE PLACEHOLDER FUNCTION_DEF -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION="defines a function without a variable-length argument list"
/DUPLICATION=CONTEXT_DEPENDENT -
/SEPARATOR="" -
/TYPE=NONTERMINAL -
"[function_level_comments]"
"[data_type] {function_name}([param_decl]...)"
"{"
" [block_decl]..."
""
" {statement}..."
"}"
END DEFINE
DELETE TOKEN MAIN_FUNCTION_DEF -
/LANGUAGE="C" -
DEFINE TOKEN MAIN_FUNCTION_DEF -
/LANGUAGE="C" -
/DESCRIPTION="defines a main function"
"[function_level_comments]"
"{main() OR main function that accept arguments from the command line}"
"{"
" [block_decl]..."
""
" {statement}..."
"}"
END DEFINE
DELETE PLACEHOLDER FUNCTION_LEVEL_COMMENTS -
/LANGUAGE="C" -
DEFINE PLACEHOLDER FUNCTION_LEVEL_COMMENTS -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION=""
/DUPLICATION=CONTEXT_DEPENDENT -
/SEPARATOR="" -
/TYPE=NONTERMINAL -
"/*"
"** FUNCTION NAME : {identifier}"
"**"
"** DESCRIPTION : {description_text}"
"[more_text]..."
"**"
"** INPUTS:"
"**"
"** OUTPUTS:"
"[more_text]..."
"**"
"** PDL:"
"[PDL Segment]"
"**"
"*/"
END DEFINE
DELETE PLACEHOLDER IDENTIFIER -
/LANGUAGE="C" -
DEFINE PLACEHOLDER IDENTIFIER -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION="a sequence of letters, digits, _, and $"
/DUPLICATION=CONTEXT_DEPENDENT -
/SEPARATOR="" -
/TYPE=TERMINAL -
"enter a valid identifier"
END DEFINE
DELETE PLACEHOLDER "MAIN() OR MAIN FUNCTION THAT ACCEPT ARGUMENTS FROM THE COMMAND LINE" -
/LANGUAGE="C" -
DEFINE PLACEHOLDER "MAIN() OR MAIN FUNCTION THAT ACCEPT ARGUMENTS FROM THE COMMAND LINE" -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION="defines a main function"
/DUPLICATION=CONTEXT_DEPENDENT -
/SEPARATOR="" -
/TYPE=MENU -
"main()"
"main(argc, argv)"/PLACEHOLDER
END DEFINE
DELETE PLACEHOLDER "MAIN(ARGC, ARGV)" -
/LANGUAGE="C" -
DEFINE PLACEHOLDER "MAIN(ARGC, ARGV)" -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION=""
/DUPLICATION=CONTEXT_DEPENDENT -
/SEPARATOR="" -
/TYPE=NONTERMINAL -
"main(int argc, char *argv[])"
END DEFINE
DELETE PLACEHOLDER BLOCK_DECL -
/LANGUAGE="C" -
DEFINE PLACEHOLDER BLOCK_DECL -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION="declares variables that are used inside a block"
/DUPLICATION=VERTICAL -
/SEPARATOR="" -
/TYPE=TERMINAL -
"Sorry, not definition just enter a declaration"
END DEFINE
DELETE PLACEHOLDER DATA_TYPE -
/LANGUAGE="C" -
DEFINE PLACEHOLDER DATA_TYPE -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION=""
/DUPLICATION=CONTEXT_DEPENDENT -
/SEPARATOR="" -
/TYPE=TERMINAL -
"not implemented, enter a return data type."
END DEFINE
DELETE PLACEHOLDER PARAM_DECL -
/LANGUAGE="C" -
DEFINE PLACEHOLDER PARAM_DECL -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION=""
/DUPLICATION=CONTEXT_DEPENDENT -
/SEPARATOR=", " -
/TYPE=NONTERMINAL -
"[data_type] {declarator}"
END DEFINE
DELETE PLACEHOLDER DECLARATOR -
/LANGUAGE="C" -
DEFINE PLACEHOLDER DECLARATOR -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION=""
/DUPLICATION=HORIZONTAL -
/SEPARATOR=", " -
/TYPE=TERMINAL -
"not implemented, enter a valid declarator"
END DEFINE
DELETE PLACEHOLDER INCLUDE_FILES -
/LANGUAGE="C" -
DEFINE PLACEHOLDER INCLUDE_FILES -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION=""
/DUPLICATION=CONTEXT_DEPENDENT -
/SEPARATOR="" -
/TYPE=NONTERMINAL -
"{#include}..."
END DEFINE
DELETE PLACEHOLDER #INCLUDE -
/LANGUAGE="C" -
DEFINE PLACEHOLDER #INCLUDE -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION="file inclusion (include the contents of the file)"
/DUPLICATION=VERTICAL -
/SEPARATOR="" -
/TYPE=MENU -
"#include <{file_spec}>"
"#include "{file_spec}""
END DEFINE
DELETE PLACEHOLDER FILE_SPEC -
/LANGUAGE="C" -
DEFINE PLACEHOLDER FILE_SPEC -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION=""
/DUPLICATION=CONTEXT_DEPENDENT -
/SEPARATOR="" -
/TYPE=TERMINAL -
"a file name"
END DEFINE
DELETE PLACEHOLDER FUNCTION_NAME -
/LANGUAGE="C" -
DEFINE PLACEHOLDER FUNCTION_NAME -
/LANGUAGE="C" -
/NOAUTO_SUBSTITUTE -
/DESCRIPTION=""
/DUPLICATION=CONTEXT_DEPENDENT -
/SEPARATOR="" -
/TYPE=NONTERMINAL -
"{declarator}()"
END DEFINE
DELETE TOKEN COMPOUND_STATEMENT -
/LANGUAGE="C" -
DEFINE TOKEN COMPOUND_STATEMENT -
/LANGUAGE="C" -
/DESCRIPTION="" -
"{"
" {statement}..."
"}"
END DEFINE