2 |
7u83 |
1 |
/*
|
|
|
2 |
Crown Copyright (c) 1997
|
|
|
3 |
|
|
|
4 |
This TenDRA(r) Computer Program is subject to Copyright
|
|
|
5 |
owned by the United Kingdom Secretary of State for Defence
|
|
|
6 |
acting through the Defence Evaluation and Research Agency
|
|
|
7 |
(DERA). It is made available to Recipients with a
|
|
|
8 |
royalty-free licence for its use, reproduction, transfer
|
|
|
9 |
to other parties and amendment for any purpose not excluding
|
|
|
10 |
product development provided that any such use et cetera
|
|
|
11 |
shall be deemed to be acceptance of the following conditions:-
|
|
|
12 |
|
|
|
13 |
(1) Its Recipients shall ensure that this Notice is
|
|
|
14 |
reproduced upon any copies or amended versions of it;
|
|
|
15 |
|
|
|
16 |
(2) Any amended version of it shall be clearly marked to
|
|
|
17 |
show both the nature of and the organisation responsible
|
|
|
18 |
for the relevant amendment or amendments;
|
|
|
19 |
|
|
|
20 |
(3) Its onward transfer from a recipient to another
|
|
|
21 |
party shall be deemed to be that party's acceptance of
|
|
|
22 |
these conditions;
|
|
|
23 |
|
|
|
24 |
(4) DERA gives no warranty or assurance as to its
|
|
|
25 |
quality or suitability for any purpose and DERA accepts
|
|
|
26 |
no liability whatsoever in relation to any use to which
|
|
|
27 |
it may be put.
|
|
|
28 |
*/
|
|
|
29 |
|
|
|
30 |
|
|
|
31 |
/*
|
|
|
32 |
LEXICAL ANALYSER FOR MAKE_TDF
|
|
|
33 |
|
|
|
34 |
This file describes the lexical analyser used by make_tdf.
|
|
|
35 |
*/
|
|
|
36 |
|
|
|
37 |
/* Character groups */
|
|
|
38 |
GROUP white = " \t\n\r" ;
|
|
|
39 |
GROUP alpha = {A-Z} + {a-z} + "_~" ;
|
|
|
40 |
GROUP digit = {0-9} ;
|
|
|
41 |
GROUP alphanum = "[alpha][digit]" ;
|
|
|
42 |
|
|
|
43 |
/* Simple symbols */
|
|
|
44 |
TOKEN "\[" -> $open ;
|
|
|
45 |
TOKEN "]" -> $close ;
|
|
|
46 |
TOKEN "," -> $comma ;
|
|
|
47 |
TOKEN "\e" -> $eof ;
|
|
|
48 |
|
|
|
49 |
/* Comments, numbers and identifiers */
|
|
|
50 |
TOKEN "#" -> get_comment () ;
|
|
|
51 |
TOKEN "[digit]" -> get_number () ;
|
|
|
52 |
TOKEN "[alpha]" -> get_identifier () ;
|
|
|
53 |
|
|
|
54 |
/* Keywords */
|
|
|
55 |
KEYWORD "break" -> $break ;
|
|
|
56 |
KEYWORD "boundaries" -> $boundaries ;
|
|
|
57 |
KEYWORD "constructs" -> $constructs ;
|
|
|
58 |
KEYWORD "construct_name" -> $construct-name ;
|
|
|
59 |
KEYWORD "edge_constructor" -> $edge-constructor ;
|
|
|
60 |
KEYWORD "edge_sort" -> $edge-sort ;
|
|
|
61 |
KEYWORD "encoding" -> $encoding ;
|
|
|
62 |
KEYWORD "encoding_bits" -> $encoding-bits ;
|
|
|
63 |
KEYWORD "entity_identifier" -> $entity-identifier ;
|
|
|
64 |
KEYWORD "entity_sort" -> $entity-sort ;
|
|
|
65 |
KEYWORD "graph_edges" -> $graph-edges ;
|
|
|
66 |
KEYWORD "has_extension" -> $has-extension ;
|
|
|
67 |
KEYWORD "kinds_of_unit" -> $kinds-of-unit ;
|
|
|
68 |
KEYWORD "linkable_entities" -> $linkable-entities ;
|
|
|
69 |
KEYWORD "lists" -> $lists ;
|
|
|
70 |
KEYWORD "major_version" -> $major-version ;
|
|
|
71 |
KEYWORD "minor_version" -> $minor-version ;
|
|
|
72 |
KEYWORD "options" -> $options ;
|
|
|
73 |
KEYWORD "parameter_sorts" -> $parameter-sorts ;
|
|
|
74 |
KEYWORD "result_sort" -> $result-sort ;
|
|
|
75 |
KEYWORD "slists" -> $slists ;
|
|
|
76 |
KEYWORD "sortid" -> $sortid ;
|
|
|
77 |
KEYWORD "sorts" -> $sorts ;
|
|
|
78 |
KEYWORD "unit_elements" -> $unit-elements ;
|
|
|
79 |
KEYWORD "unit_identifier" -> $unit-identifier ;
|