3 .\" The Sod module syntax
5 .\" (c) 2015 Straylight/Edgeware
8 .\"----- Licensing notice ---------------------------------------------------
10 .\" This file is part of the Sensible Object Design, an object system for C.
12 .\" SOD is free software; you can redistribute it and/or modify
13 .\" it under the terms of the GNU General Public License as published by
14 .\" the Free Software Foundation; either version 2 of the License, or
15 .\" (at your option) any later version.
17 .\" SOD is distributed in the hope that it will be useful,
18 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
19 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 .\" GNU General Public License for more details.
22 .\" You should have received a copy of the GNU General Public License
23 .\" along with SOD; if not, write to the Free Software Foundation,
24 .\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 .\" Highlight using terminal escapes, rather than overstriking.
29 .\" String definitions and font selection.
38 .\" .hP TEXT -- start an indented paragraph with TEXT hanging off to the left
41 \h'-\w'\fB\\$1\ \fP'u'\fB\\$1\ \fP\c
47 . ds ^ \v'-.3m'\s'\\n(.s*7/10'
49 . ds _ \v'.3m'\s'\\n(.s*7/10'
77 .\"--------------------------------------------------------------------------
78 .TH sod 5 "11 October 2015" "Straylight/Edgeware" "Sensible Object Design"
81 sod-module \- Sensible Object Design module syntax
83 .\"--------------------------------------------------------------------------
85 This manual page provides a highly compressed description of the
87 For full details, consult the main manual.
90 Anywhere a simple nonterminal name
92 may appear in the grammar,
100 On the left-hand side of a production rule,
105 are variables which vary over all nonterminal and terminal symbols,
106 and the variables may also appear on the right-hand side
107 in place of a nonterminal.
108 Such a rule stands for a family of rules,
109 in each variable is replaced by
110 each possible simple nonterminal or terminal symbol.
112 The letter \*e denotes the empty nonterminal
117 The following indexed productions are used throughout the grammar, some often
118 enough that they deserve special notation.
123 denoting an optional occurrence of
138 .IR zero-or-more [ x ],
139 denoting a sequence of zero or more occurrences of
145 .IR zero-or-more [ x ]
155 .IR one-or-more [ x ]
156 denoting a sequence of one or more occurrences of
162 .IR one-or-more [ x ]
169 denotes a sequence of one or more occurrences of
183 .SS Special nonterminals
186 an S-expression, as parsed by the Lisp reader
190 a sequence of C tokens, with matching brackets
192 .\"--------------------------------------------------------------------------
240 .I extended-alpha-char
246 .I nonzero-digit-char
248 .I nonzero-digit-char
256 The characters matched by
257 .I extended-alpha-char
258 depend on the locale and the host Lisp system.
260 .SS String and character literals
264 .IR string-literal-char \**
270 .IR char-literal-char \**
273 .I string-literal-char
275 any character other than
285 any character other than
308 .I nonzero-digit-char
315 .IR binary-digit-char \*+
327 .IR octal-digit-char \*+
341 .IR hex-digit-char \*+
374 any non-alphanumeric character
405 any character other than
410 any character other than
427 any character other than newline
429 .\"--------------------------------------------------------------------------
444 .I typename-definition
450 .SS Simple definitions
469 .I typename-definition
472 .IR list [ identifier ]
475 .SS Literal code fragments
492 .IR list [ constraint ]
507 .SS Class definitions
511 .I class-forward-declaration
513 .I full-class-definition
515 .I class-forward-declaration
521 .I full-class-definition
528 .IR list [ identifier ]
531 .IR properties-class-item \**
534 .I properties-class-item
552 .IR declaration-specifier \*+
553 .IR list [ init-declarator ]
565 .IR list [ slot-initializer ]
585 .IR declaration-specifier \*+
592 .IR declaration-specifier \*+
593 .IR declarator [ dotted-name ]
609 .IR list [ property ]
671 .I declaration-specifier
735 .IR declaration-specifier \*+
736 .I abstract-declarator
764 are defined in the built-in module.
774 Declaration specifiers may appear in any order.
775 However, not all combinations are permitted.
776 A declaration specifier must consist of
780 .IR storage-specifier s,
781 and one of the following, up to reordering.
795 .BR "unsigned char" ,
799 .BR "unsigned short" ,
803 .BR "unsigned short int" ,
804 .B "signed short int"
813 .BR "unsigned long" ,
817 .BR "unsigned long int" ,
821 .BR "unsigned long long" ,
822 .B "signed long long"
824 .BR "long long int" ,
825 .BR "unsigned long long int" ,
826 .B "signed long long int"
832 .BR "float _Imaginary" ,
833 .BR "double _Imaginary" ,
834 .B "long double _Imaginary"
836 .BR "float imaginary" ,
837 .BR "double imaginary" ,
838 .B "long double imaginary"
840 .BR "float _Complex" ,
841 .BR "double _Complex" ,
842 .B "long double _Complex"
844 .BR "float complex" ,
845 .BR "double complex" ,
846 .B "long double complex"
851 .IR primary-declarator [ k ]
853 .IR primary-declarator [ k ]
858 .IR primary-declarator [ k ]
861 .IR primary-declarator [ k ]
862 .IR declarator-suffix
884 .IR list [ argument ]
890 .IR declaration-specifier \*+
891 .I argument-declarator
893 .I abstract-declarator
897 .I argument-declarator
899 .IR declarator [ identifier " | \*e]"
903 .IR declarator [ identifier ]
911 .\"--------------------------------------------------------------------------
917 .\"--------------------------------------------------------------------------
919 Mark Wooding, <mdw@distorted.org.uk>
921 .\"----- That's all, folks --------------------------------------------------