Debian Codegraph @

progs/arm_frm.ads

raw
1 with ARM_Output,
2 ARM_Contents;
3 --private -- Ada 2005
4 with ARM_Input,
5 ARM_Database,
6 ARM_Subindex;
7 package ARM_Format is
8
9 --
10 -- Ada reference manual formatter (ARM_Form).
11 --
12 -- This package contains the routines to parse the input files, and
13 -- determine what to output.
14 --
15 -- ---------------------------------------
16 -- Copyright 2000, 2002, 2004, 2005, 2006, 2007, 2010, 2011, 2012, 2016,
17 -- 2017, 2019
18 -- AXE Consultants. All rights reserved.
19 -- P.O. Box 1512, Madison WI 53701
20 -- E-Mail: [email protected]
21 --
22 -- ARM_Form is free software: you can redistribute it and/or modify
23 -- it under the terms of the GNU General Public License version 3
24 -- as published by the Free Software Foundation.
25 --
26 -- AXE CONSULTANTS MAKES THIS TOOL AND SOURCE CODE AVAILABLE ON AN "AS IS"
27 -- BASIS AND MAKES NO WARRANTY, EXPRESS OR IMPLIED, AS TO THE ACCURACY,
28 -- CAPABILITY, EFFICIENCY, MERCHANTABILITY, OR FUNCTIONING OF THIS TOOL.
29 -- IN NO EVENT WILL AXE CONSULTANTS BE LIABLE FOR ANY GENERAL,
30 -- CONSEQUENTIAL, INDIRECT, INCIDENTAL, EXEMPLARY, OR SPECIAL DAMAGES,
31 -- EVEN IF AXE CONSULTANTS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
32 -- DAMAGES.
33 --
34 -- A copy of the GNU General Public License is available in the file
35 -- gpl-3-0.txt in the standard distribution of the ARM_Form tool.
36 -- Otherwise, see <http://www.gnu.org/licenses/>.
37 --
38 -- If the GPLv3 license is not satisfactory for your needs, a commercial
39 -- use license is available for this tool. Contact Randy at AXE Consultants
40 -- for more information.
41 --
42 -- ---------------------------------------
43 --
44 -- Edit History:
45 --
46 -- 4/14/00 - RLB - Created base package.
47 -- 4/18/00 - RLB - Added additional information to Object;
48 -- added Scan.
49 -- 4/24/00 - RLB - Added Change_Kind and Display_Index_Entries.
50 -- - RLB - Added Change format.
51 -- 4/25/00 - RLB - Added Size.
52 -- 4/26/00 - RLB - Added paragraph formats.
53 -- 5/10/00 - RLB - Added additional paragraph kinds.
54 -- 5/11/00 - RLB - Added numbers for enumerated paragraphs.
55 -- 5/12/00 - RLB - Added attribute prefix text.
56 -- 5/15/00 - RLB - Split input from parsing/formatting.
57 -- 5/16/00 - RLB - Added database objects and Destroy.
58 -- 5/23/00 - RLB - Added tab stops.
59 -- 5/24/00 - RLB - Implemented subscript/superscript commands.
60 -- 5/28/00 - RLB - Implemented index operations.
61 -- 6/ 2/00 - RLB - Added Unit.
62 -- 8/ 2/00 - RLB - Added Leading and Syntax_Leading styles.
63 -- 8/ 4/00 - RLB - Added more new styles.
64 -- 8/ 7/00 - RLB - Added Leading flag, removed Leading styles.
65 -- 8/ 8/00 - RLB - Added Attr_Leading flag.
66 -- 8/16/00 - RLB - Added No_Para_Num flag, removed No_Pnum formats.
67 -- 8/17/00 - RLB - Changed Leading flag to Space_After.
68 -- 8/28/00 - RLB - Added flags for ChgAttribute and ChgImpldef commands.
69 -- 8/31/00 - RLB - Added the New_Changes change kind.
70 -- 9/26/00 - RLB - Added Syntax_Display format.
71 -- 6/17/02 - RLB - Added Ada95 changes sections.
72 -- 7/18/02 - RLB - Moved document type here.
73 -- - RLB - Added Changes_Only and versioning for individual changes.
74 -- 9/10/04 - RLB - Added support for nested changes.
75 -- 9/14/04 - RLB - Moved Change_Version_Type to ARM_Contents.
76 -- 11/03/04 - RLB - Added Nested_X2_Bulleted.
77 -- 11/16/04 - RLB - Added Attr_Prefix_Text_Change_Kind.
78 -- 12/06/04 - RLB - Added reference chain for Format_Type.
79 -- 12/11/04 - RLB - Increased Syntax_NT length.
80 -- 10/17/05 - RLB - Added Glossary change items.
81 -- 10/28/05 - RLB - Added Language-Define subindexes.
82 -- 1/12/06 - RLB - Replaced "Document" with a number of new more general
83 -- properties.
84 -- 1/16/06 - RLB - Added "Unnumbered_Section" counter, so we can assign
85 -- names without special cases.
86 -- 1/18/06 - RLB - Added "Example_Font".
87 -- 9/22/06 - RLB - Added "Use_ISO_2004_Note_Format".
88 -- - RLB - Revised to use Clause_Number_Type.
89 -- 9/25/06 - RLB - Added "Use_ISO_2004_Contents_Format".
90 -- 10/04/06 - RLB - Added "Use_ISO_2004_List_Format".
91 -- 2/ 5/07 - RLB - Added Usage_Note for ASIS, and renamed Wide paragraph
92 -- kinds.
93 -- 2/13/07 - RLB - Redid output formating to use an explict indent;
94 -- added ChildExample.
95 -- 2/16/07 - RLB - Added Indent.
96 -- 2/19/07 - RLB - Added Title format.
97 -- 4/23/10 - RLB - Added Ada 2005 header.
98 -- 8/ 8/11 - RLB - Added Aspect DB.
99 -- 10/18/11 - RLB - Changed to GPLv3 license.
100 -- 3/12/12 - RLB - Lengthened unit name so
101 -- "Ada.Strings.Wide_Wide_Unbounded.Wide_Wide_Equal_Case_Insensitive"
102 -- would fit (have we lost our minds??).
103 -- 8/31/12 - RLB - Put glossary components into a subrecord to prevent
104 -- inappropriate usage.
105 -- 10/18/12 - RLB - Put impdef components into a subrecord to prevent
106 -- inappropriate usage.
107 -- - RLB - Added more specific hanging_indent formats, along with
108 -- small.
109 -- 11/26/12 - RLB - Added subdivision names.
110 -- 12/17/12 - RLB - Added Ada 2012 AARM sections.
111 -- 3/17/16 - RLB - Removed Changes_Only, added Base_Change_Version.
112 -- 7/21/17 - RLB - Changed the prefix length.
113 -- 1/27/19 - RLB - Changed the attribute length so that the reduce
114 -- attributes will fit.
115 -- 2/15/19 - RLB - Added Attr_Omit to the attribut parameters.
116
117 type Format_Type is tagged limited private;
118
119 type Change_Kind is (Old_Only, New_Only, Show_Changes, New_Changes);
120 -- Which changes to show?
121 -- If Old_Only, we will get the original Ada Reference Manual or AARM.
122 -- If New_Only, we will get the reference documents with the updates
123 -- up to the Change_Version specified included.
124 -- If Show_Changes, we will get the reference documents with the
125 -- updates up to the Base_Change_Version specified included; and
126 -- insertions and deletions will be shown for versions
127 -- Base_Change_Version .. Change_Version.
128 -- If New_Changes, original RM text removed, but new RM text will be
129 -- shown as inserted, up to and including the Change_Version specified.
130 -- In all cases, changes with versions newer than Change_Version are
131 -- ignored. Thus Change_Version = '0' is the same as Old_Only no
132 -- matter what command is given.
133 --
134 -- Note: Previous versions of this tool had Changes_Only as well;
135 -- that is the same as Show_Changes with Base_Change_Version =
136 -- Change_Version. (The previous version's Show_Changes is
137 -- equivalent to this version's Show_Changes with
138 -- Base_Change_Version = 1.)
139
140 procedure Create (Format_Object : in out Format_Type;
141 Changes : in ARM_Format.Change_Kind;
142 Change_Version : in ARM_Contents.Change_Version_Type;
143 Base_Change_Version : in ARM_Contents.Change_Version_Type;
144 Display_Index_Entries : in Boolean;
145 Include_Annotations : in Boolean;
146 Include_ISO : in Boolean;
147 Link_Non_Terminals : in Boolean;
148 Number_Paragraphs : in Boolean;
149 Examples_Font : in ARM_Output.Font_Family_Type;
150 Use_ISO_2004_Note_Format : in Boolean;
151 Use_ISO_2004_Contents_Format : in Boolean;
152 Use_ISO_2004_List_Format : in Boolean;
153 Top_Level_Subdivision_Name : in ARM_Output.Top_Level_Subdivision_Name_Kind);
154 -- Initialize an input object. Changes, Change_Version, and
155 -- Base_Change_Version determine
156 -- which changes should be displayed. If Display_Index_Entries is True,
157 -- index entries will be printed in the document; otherwise, they
158 -- will not generate any visible text (although they might generate
159 -- a link anchor). If Include_Annotations is True, annotations (AARM
160 -- text) will be included in the output; otherwise it will not be.
161 -- If Include_ISO is True, ISOOnly text will be included in the output
162 -- (and NotISO text will not); otherwise the reverse is true.
163 -- If Link_Non_Terminals is True, links will be generated for
164 -- each Non_Terminal, linking it to its definition.
165 -- If Number_Paragraphs is true, paragraphs will be numbered (per
166 -- subclause); otherwise they will not be.
167 -- Example_Font specifies the font that examples will be set in.
168 -- If Use_ISO_2004_Note_Format is true, that format will be used;
169 -- else the Ada95 standard's format will be used for notes.
170 -- If Use_ISO_2004_Contents_Format is true, that format will be used;
171 -- else the Ada95 standard's format will be used for the table of contents.
172 -- If Use_ISO_2004_List_Format is true, then lists will be lettered;
173 -- else the Ada95 standard's numbering format will be used for
174 -- enumerated lists.
175 -- The top-level (and other) subdivision names are as specified
176 -- in Top_Level_Subdivision_Name.
177
178 procedure Destroy (Format_Object : in out Format_Type);
179 -- Destroy a format object, releasing any resources.
180
181 procedure Scan (Format_Object : in out Format_Type;
182 File_Name : in String;
183 Section_Number : in ARM_Contents.Section_Number_Type;
184 Starts_New_Section : in Boolean);
185 -- Scans the contents for File_Name, determining the table of contents
186 -- for the section. The results are written to the contents package.
187 -- Starts_New_Section is True if the file starts a new section.
188 -- Section_Number is the number (or letter) of the section.
189 -- Note: We need this scanning pass so we can process @SeeSec,
190 -- @SeeSecNum, and similar commands. For that, we need the full names
191 -- of the sections and clauses.
192
193 procedure Write_Table_of_Contents (
194 Format_Object : in out Format_Type;
195 Output_Object : in out ARM_Output.Output_Type'Class);
196 -- Writes the table of contents for the document. (It will have
197 -- a section name of "TOC").
198
199 procedure Process (Format_Object : in out Format_Type;
200 File_Name : in String;
201 Output_Object : in out ARM_Output.Output_Type'Class;
202 Section_Name : in String;
203 Section_Number : in ARM_Contents.Section_Number_Type;
204 Starts_New_Section : in Boolean);
205 -- Process the contents for File_Name, writing the results to
206 -- Output_Object. (Output_Object uses dispatching calls to provide
207 -- the correct formatting). Section_Name is the name of the section
208 -- for this file. Starts_New_Section is True if the file starts
209 -- a new section. Section_Number is the number (or letter) of the
210 -- section. Values > 20 represent annex letters (21 => A, 22 => B, etc.)
211
212 procedure Format (Format_Object : in out Format_Type;
213 Text : in String;
214 Output_Object : in out ARM_Output.Output_Type'Class;
215 Text_Name : in String;
216 No_Annotations : in Boolean);
217 -- Format the contents of Text, writing the results to
218 -- Output_Object. (Output_Object uses dispatching calls to provide
219 -- the correct formatting). Text is assumed to be a component of
220 -- a larger section. Text_Name is an identifying name for error messages.
221 -- If No_Annotations is true, we don't want any annotations even if we
222 -- are generating a document with annotations.
223
224 private
225 type Paragraph_Type is (Plain, Introduction,
226 Language_Design, -- AARM-only.
227 Syntax, Resolution, Legality,
228 Static_Semantics, Link_Time, Run_Time, Bounded_Errors,
229 Erroneous, Requirements, Documentation, Metrics, Permissions, Advice,
230 Notes, Single_Note, Examples,
231 Ada83_Inconsistencies, Ada83_Incompatibilities, -- AARM-only.
232 Ada83_Extensions, Ada83_Wording, -- AARM-only.
233 Ada95_Inconsistencies, Ada95_Incompatibilities, -- AARM-only.
234 Ada95_Extensions, Ada95_Wording, -- AARM-only.
235 Ada2005_Inconsistencies, Ada2005_Incompatibilities, -- AARM-only.
236 Ada2005_Extensions, Ada2005_Wording, -- AARM-only.
237 Ada2012_Inconsistencies, Ada2012_Incompatibilities, -- AARM-only.
238 Ada2012_Extensions, Ada2012_Wording, -- AARM-only.
239 Element_Ref, Child_Ref, Usage_Note, -- For ASIS (AASIS-only).
240 -- AARM annotations (no headers)
241 Reason, Ramification, Proof, Imp_Note, Corr_Change, Discussion,
242 Honest, Glossary_Marker, Bare_Annotation,
243 -- Format only:
244 Wide_Above, Example_Text, Child_Example_Text,
245 Indented_Example_Text, Code_Indented, Indent, Bulleted, Nested_Bulleted,
246 Nested_X2_Bulleted,
247 Display, Syntax_Display, Syntax_Indented, Syntax_Production,
248 Enumerated, Nested_Enumerated,
249 Hanging_Indented_1, Hanging_Indented_2, Hanging_Indented_3,
250 Hanging_Indented_4, Small, Title, In_Table);
251
252 type Reference;
253 type Reference_Ptr is access Reference;
254 type Reference is record
255 Ref_Name : ARM_Input.Command_Name_Type;
256 Ref_Len : Natural; -- Length of the reference.
257 Is_DR_Ref : Boolean; -- True for a DR reference; False for an AI reference.
258 Next : Reference_Ptr;
259 end record;
260
261 type Glossary_Info_Type (Active : Boolean := False;
262 Change_Kind : ARM_Database.Paragraph_Change_Kind_Type := ARM_Database.None) is record
263 -- The Change_Kind of ToGlossary.
264 case Active is
265 when False => null; -- No glossary entry in use.
266 when True =>
267 -- Glossary actively being processed; used only when
268 -- processing [Chg]ToGlossary[Also] commands.
269 Term : String (1..50); -- Glossary term.
270 Term_Len : Natural := 0;
271 Add_to_Glossary : Boolean;
272 -- Add this item to the Glossary. (Not the same
273 -- as "Active"; when generating older versions
274 -- of a document, this would be False for a
275 -- new glossary entry.)
276 Displayed : Boolean;
277 -- The text was displayed in the document.
278 case Change_Kind is
279 when ARM_Database.None => null;
280 when others =>
281 Version : ARM_Contents.Change_Version_Type;
282 -- The version number of the changed paragraph.
283 end case;
284 end case;
285 end record;
286
287 type Impdef_Command_Type is (None, Aspect, Impdef, Docreq, ImplAdv);
288
289 type Impdef_Info_Type (Command : Impdef_Command_Type := None) is record
290 case Command is
291 when None => null; -- No impdef, docreq, impladv, aspectdesc in use.
292 when others =>
293 -- Impdef, Docreq, Impladv, Aspectdesc actively being processed;
294 -- used only when processing ImplDef, ChgImplDef,
295 -- ChgDocReq, ChgImplAdv, and ChgAspectDesc.
296 Change_Kind : ARM_Database.Paragraph_Change_Kind_Type := ARM_Database.None;
297 -- The Change_Kind of the command.
298 Version : ARM_Contents.Change_Version_Type;
299 -- If the kind is not "None", this is the version
300 -- number of the changed paragraph.
301 Initial_Version : ARM_Contents.Change_Version_Type;
302 -- This is the version number of the original paragraph.
303 Paragraph_String : String (1 .. 10); -- Paragraph number.
304 Paragraph_Len : Natural;
305 Add_to_DB : Boolean;
306 -- Add this item to the appropriate DB. (Not the same
307 -- as "Active"; when generating older versions
308 -- of a document, this would be False for a
309 -- new impdef, docreq, etc. entry.)
310 case Command is
311 when Aspect =>
312 Aspect_Name : String (1..30); -- Aspect name text
313 Aspect_Name_Len : Natural := 0;
314 when others => null;
315 end case;
316 end case;
317 end record;
318
319 MAX_PREFIX : constant := 250; -- Maximum length of a prefix.
320
321 type Format_Type is tagged limited record
322 -- Document information:
323 Changes : ARM_Format.Change_Kind; -- No Both here.
324 Change_Version : ARM_Contents.Change_Version_Type;
325 Base_Change_Version : ARM_Contents.Change_Version_Type;
326 Display_Index_Entries : Boolean;
327 Include_Annotations : Boolean;
328 Include_ISO : Boolean;
329 Link_Non_Terminals : Boolean;
330 Number_Paragraphs : Boolean;
331 Examples_Font : ARM_Output.Font_Family_Type;
332 Use_ISO_2004_Note_Format : Boolean;
333 Use_ISO_2004_Contents_Format : Boolean;
334 Use_ISO_2004_List_Format : Boolean;
335 Top_Level_Subdivision_Name : ARM_Output.Top_Level_Subdivision_Name_Kind;
336
337 -- Clause numbers:
338 Clause_Number : ARM_Contents.Clause_Number_Type;
339 -- The current clause number (Section, clause, subclause, subsubclause).
340 Unnumbered_Section : Natural; -- The current (if any) clause number
341 -- for unnumbered sections.
342
343 -- Paragraph format info:
344 Next_Paragraph_Change_Kind : ARM_Database.Paragraph_Change_Kind_Type;
345 -- The change kind of the next paragraph. This is
346 -- reset to none after each paragraph.
347 Next_Paragraph_Version : ARM_Contents.Change_Version_Type;
348 -- If the kind is not "None", this is the version
349 -- number of the changed paragraph.
350 Last_Paragraph_Subhead_Type : Paragraph_Type;
351 -- The last paragraph subhead generated.
352 Next_Paragraph_Subhead_Type : Paragraph_Type;
353 -- The next paragraph subhead to generate (not
354 -- necessarily the same as Next_Paragraph_Format_Type).
355 -- This indicates the current paragraph type.
356 Next_Paragraph_Format_Type : Paragraph_Type;
357 -- The format type of the next paragraph to
358 -- generate. We keep this separately so that the
359 -- first paragraph of a grouping can be in a
360 -- different format than the standard one, and
361 -- still generate a subheading.
362 Paragraph_Tab_Stops : ARM_Output.Tab_Info := ARM_Output.NO_TABS;
363 -- The tab stops for the next paragraph.
364 In_Bundle : Boolean := False;
365 -- Are we in a bundle?
366 References : Reference_Ptr := null;
367 -- Any references to generate at the start of the
368 -- next paragraph.
369
370 -- Paragraph numbering info:
371 Next_Note : Natural; -- The number of the next note. These are
372 -- per-section, not per-clause (unless ISO 2004 is set).
373 Next_Paragraph : Positive; -- The number of the next paragraph. These
374 -- are per-(sub)clause.
375 Next_Insert_Para : Positive; -- The subnumber of the next inserted
376 -- paragraph.
377 Next_AARM_Sub : Character; -- The letter of the next AARM subclause.
378 -- These are reset when the paragraph number
379 -- changes.
380 Next_AARM_Insert_Para : Positive; -- The subnumber of the next inserted
381 -- AARM paragraph.
382 Next_Enumerated_Num : Positive;
383 -- If the format is enumerated, this is the
384 -- number of the next paragraph.
385 Enumerated_Level : Natural;
386 -- Number of enumerated formats that we're in.
387 Current_Paragraph_String : String (1 .. 10);
388 -- The current paragraph number string (only
389 -- valid if In_Paragraph is True).
390 Current_Paragraph_Len : Natural;
391
392 -- Text format info:
393 Text_Format : ARM_Output.Format_Type; -- Holds the current text format.
394
395 Style : ARM_Output.Paragraph_Style_Type; -- What is the current paragraph style?
396 Indent : ARM_Output.Paragraph_Indent_Type; -- What is the current paragraph indent?
397 In_Paragraph : Boolean; -- Are we currently in a paragraph?
398 No_Start_Paragraph : Boolean; -- Did we suppress "Start_Paragraph"?
399 No_Prefix : Boolean; -- Should we suppress any prefix on the next paragraph?
400 No_Para_Num : Boolean; -- Should we suppress the paragraph number on the next paragraph?
401 Keep_with_Next : Boolean; -- Should we force this paragraph to bind to the next
402 -- (disallowing a page break between)?
403 Space_After : ARM_Output.Space_After_Type; -- Space following this
404 -- paragraph.
405 No_Breaks : Boolean; -- Should we allow page breaks in this paragraph?
406 In_Change : Boolean; -- Are we in a change region?
407 Last_Non_Space : Boolean; -- Is the last character written into the
408 -- paragraph a non-space? (If nothing has been
409 -- written into the paragraph, then this is False).
410
411 -- Indexing:
412 Unit : String (1..72); -- Unit for predefined definitions. Used only
413 -- by a handful of indexing commands.
414 Unit_Len : Natural := 0;
415
416 -- Syntax:
417 Syntax_NT : String (1..80); -- Syntax non-terminal; used only during the
418 -- processing of the Syn command.
419 Syntax_NT_Len : Natural := 0;
420 Syntax_Tab : String (1..40); -- Syntax tab string; used only during the
421 -- processing of the Syn command.
422 Syntax_Tab_Len : Natural := 0;
423
424 -- Attributes:
425 Prefix_Text : String (1..MAX_PREFIX) := "@b{NONE!}" & (10..MAX_PREFIX => ' ');
426 -- This text is used as part of the attribute list text.
427 -- It is shared between multiple attributes, which is why it is
428 -- handled this way.
429 Prefix_Text_Len : Natural := 9;
430
431 Attr_Prefix : String (1..10); -- Attribute prefix text
432 Attr_Prefix_Len : Natural := 0;
433 Attr_Prefix_Change_Kind : ARM_Database.Paragraph_Change_Kind_Type;
434 Attr_Prefix_Version : ARM_Contents.Change_Version_Type;
435 Attr_Name : String (1..55); -- Attribute name text
436 Attr_Name_Len : Natural := 0;
437 Attr_Leading : Boolean := False; -- Attribute leading flag
438 Attr_Change_Kind : ARM_Database.Paragraph_Change_Kind_Type;
439 Attr_Prefix_Text_Change_Kind : ARM_Database.Paragraph_Change_Kind_Type;
440 Attr_Version : ARM_Contents.Change_Version_Type;
441 Attr_Initial_Version : ARM_Contents.Change_Version_Type;
442 Attr_Omit : Boolean := False; -- Omit Attr from the attribute annex.
443 -- The above ten items are used only when processing Attribute
444 -- and Attribute_Leading commands.
445
446 Attr_DB : ARM_Database.Database_Type;
447
448 -- Pragmas:
449 Pragma_DB : ARM_Database.Database_Type;
450
451 -- Glossary:
452 Glossary_Info : Glossary_Info_Type;
453 Glossary_DB : ARM_Database.Database_Type;
454
455 -- Aspects:
456 Aspect_DB : ARM_Database.Database_Type;
457 -- Also see Impdef_Info, below.
458
459 -- Implementation advice:
460 Impladv_DB : ARM_Database.Database_Type;
461 -- Also see Impdef_Info, below.
462
463 -- Documentation requirements:
464 Docreq_DB : ARM_Database.Database_Type;
465 -- Also see Impdef_Info, below.
466
467 -- Implementation-defined:
468 Impdef_DB : ARM_Database.Database_Type;
469 -- Also see Impdef_Info, below.
470
471 -- For all of the above four:
472 Impdef_Info : Impdef_Info_Type;
473 -- Used only during processing of ImplDef, ChgImplDef,
474 -- ChgDocReq, ChgImplAdv, and ChgAspectDesc.
475
476 -- Language-Defined entity subindexes:
477 Package_Index : ARM_Subindex.Subindex_Type;
478 Type_Index : ARM_Subindex.Subindex_Type;
479 Subprogram_Index : ARM_Subindex.Subindex_Type;
480 Exception_Index : ARM_Subindex.Subindex_Type;
481 Object_Index : ARM_Subindex.Subindex_Type;
482
483 end record;
484 end ARM_Format;