1
\documentstyle[makeidx, psfig]{book}
5
%%%%%%%%%%%%%%%%%%%%%%%%
10
\oddsidemargin -0.40cm
13
\newcommand{\CiF}{\sf Clif}
16
\newcommand{\mybasel}{\baselineskip 9pt}
17
\newcommand{\myver}{0.93
20
\title{The Interpreter \CiF \\ Programmer's Guide}
21
\author{\v{L}. Kore\v{n} and T. Hr\'{u}z%\thanks{
22
%\protect \input{adr0.tex}}
24
\date{For version \myver\\
25
Last updated June 25, 2000}
33
Copyright \copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
39
Permission is granted to make and distribute verbatim copies of
40
this manual provided the copyright notice and this permission notice
41
are preserved on all copies.
45
Permission is granted to copy and distribute modified versions of this
46
manual under the conditions for verbatim copying, provided also that
47
the sections entitled ``GNU General Public License'' is included
48
exactly as in the original, and provided that the entire resulting
49
derived work is distributed under the terms of a permission notice
50
identical to this one.
54
Permission is granted to copy and distribute translations of this
55
manual into another language, under the above conditions for modified
56
versions, except that the section entitled ``GNU General Public
57
License,'' and this permission notice, may be included in translations
58
approved by the Free Software Foundation instead of in the original
62
\chapter*{GNU GENERAL PUBLIC LICENSE}
63
\addcontentsline{toc}{chapter}{GNU GENERAL PUBLIC LICENSE}
68
Copyright \copyright 1989, 1991 Free Software Foundation, Inc.\\
69
675 Mass Ave, Cambridge, MA 02139, USA\\
72
Everyone is permitted to copy and distribute verbatim copies\\
73
of this license document, but changing it is not allowed.\\
76
\addcontentsline{toc}{section}{Preamble}
78
The licenses for most software are designed to take away your
79
freedom to share and change it. By contrast, the GNU General Public
80
License is intended to guarantee your freedom to share and change free
81
software--to make sure the software is free for all its users. This
82
General Public License applies to most of the Free Software
83
Foundation's software and to any other program whose authors commit to
84
using it. (Some other Free Software Foundation software is covered by
85
the GNU Library General Public License instead.) You can apply it to
88
When we speak of free software, we are referring to freedom, not
89
price. Our General Public Licenses are designed to make sure that you
90
have the freedom to distribute copies of free software (and charge for
91
this service if you wish), that you receive source code or can get it
92
if you want it, that you can change the software or use pieces of it
93
in new free programs; and that you know you can do these things.
95
To protect your rights, we need to make restrictions that forbid
96
anyone to deny you these rights or to ask you to surrender the rights.
97
These restrictions translate to certain responsibilities for you if you
98
distribute copies of the software, or if you modify it.
100
For example, if you distribute copies of such a program, whether
101
gratis or for a fee, you must give the recipients all the rights that
102
you have. You must make sure that they, too, receive or can get the
103
source code. And you must show them these terms so they know their
106
We protect your rights with two steps: (1) copyright the software, and
107
(2) offer you this license which gives you legal permission to copy,
108
distribute and/or modify the software.
110
Also, for each author's protection and ours, we want to make certain
111
that everyone understands that there is no warranty for this free
112
software. If the software is modified by someone else and passed on, we
113
want its recipients to know that what they have is not the original, so
114
that any problems introduced by others will not reflect on the original
115
authors' reputations.
117
Finally, any free program is threatened constantly by software
118
patents. We wish to avoid the danger that redistributors of a free
119
program will individually obtain patent licenses, in effect making the
120
program proprietary. To prevent this, we have made it clear that any
121
patent must be licensed for everyone's free use or not licensed at all.
123
The precise terms and conditions for copying, distribution and
127
GNU GENERAL PUBLIC LICENSE\\
128
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\\
130
\addcontentsline{toc}{section}{GNU GENERAL PUBLIC LICENSE
131
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION}
134
\setcounter{enumi}{-1}
137
\item This License applies to any program or other work which contains
138
a notice placed by the copyright holder saying it may be distributed
139
under the terms of this General Public License. The "Program", below,
140
refers to any such program or work, and a "work based on the Program"
141
means either the Program or any derivative work under copyright law:
142
that is to say, a work containing the Program or a portion of it,
143
either verbatim or with modifications and/or translated into another
144
language. (Hereinafter, translation is included without limitation in
145
the term "modification".) Each licensee is addressed as "you".
147
Activities other than copying, distribution and modification are not
148
covered by this License; they are outside its scope. The act of
149
running the Program is not restricted, and the output from the Program
150
is covered only if its contents constitute a work based on the
151
Program (independent of having been made by running the Program).
152
Whether that is true depends on what the Program does.
155
\item You may copy and distribute verbatim copies of the Program's
156
source code as you receive it, in any medium, provided that you
157
conspicuously and appropriately publish on each copy an appropriate
158
copyright notice and disclaimer of warranty; keep intact all the
159
notices that refer to this License and to the absence of any warranty;
160
and give any other recipients of the Program a copy of this License
161
along with the Program.
163
You may charge a fee for the physical act of transferring a copy, and
164
you may at your option offer warranty protection in exchange for a fee.
167
\item You may modify your copy or copies of the Program or any portion
168
of it, thus forming a work based on the Program, and copy and
169
distribute such modifications or work under the terms of Section 1
170
above, provided that you also meet all of these conditions:
173
\item You must cause the modified files to carry prominent notices
174
stating that you changed the files and the date of any change.
176
\item You must cause any work that you distribute or publish, that in
177
whole or in part contains or is derived from the Program or any
178
part thereof, to be licensed as a whole at no charge to all third
179
parties under the terms of this License.
181
\item If the modified program normally reads commands interactively
182
when run, you must cause it, when started running for such
183
interactive use in the most ordinary way, to print or display an
184
announcement including an appropriate copyright notice and a
185
notice that there is no warranty (or else, saying that you provide
186
a warranty) and that users may redistribute the program under
187
these conditions, and telling the user how to view a copy of this
188
License. (Exception: if the Program itself is interactive but
189
does not normally print such an announcement, your work based on
190
the Program is not required to print an announcement.)
193
These requirements apply to the modified work as a whole. If
194
identifiable sections of that work are not derived from the Program,
195
and can be reasonably considered independent and separate works in
196
themselves, then this License, and its terms, do not apply to those
197
sections when you distribute them as separate works. But when you
198
distribute the same sections as part of a whole which is a work based
199
on the Program, the distribution of the whole must be on the terms of
200
this License, whose permissions for other licensees extend to the
201
entire whole, and thus to each and every part regardless of who wrote it.
203
Thus, it is not the intent of this section to claim rights or contest
204
your rights to work written entirely by you; rather, the intent is to
205
exercise the right to control the distribution of derivative or
206
collective works based on the Program.
208
In addition, mere aggregation of another work not based on the Program
209
with the Program (or with a work based on the Program) on a volume of
210
a storage or distribution medium does not bring the other work under
211
the scope of this License.
213
\item You may copy and distribute the Program (or a work based on it,
214
under Section 2) in object code or executable form under the terms of
215
Sections 1 and 2 above provided that you also do one of the following:
218
\item Accompany it with the complete corresponding machine-readable
219
source code, which must be distributed under the terms of Sections
220
1 and 2 above on a medium customarily used for software interchange; or,
222
\item Accompany it with a written offer, valid for at least three
223
years, to give any third party, for a charge no more than your
224
cost of physically performing source distribution, a complete
225
machine-readable copy of the corresponding source code, to be
226
distributed under the terms of Sections 1 and 2 above on a medium
227
customarily used for software interchange; or,
229
\item Accompany it with the information you received as to the offer
230
to distribute corresponding source code. (This alternative is
231
allowed only for noncommercial distribution and only if you
232
received the program in object code or executable form with such
233
an offer, in accord with Subsection b above.)
236
The source code for a work means the preferred form of the work for
237
making modifications to it. For an executable work, complete source
238
code means all the source code for all modules it contains, plus any
239
associated interface definition files, plus the scripts used to
240
control compilation and installation of the executable. However, as a
241
special exception, the source code distributed need not include
242
anything that is normally distributed (in either source or binary
243
form) with the major components (compiler, kernel, and so on) of the
244
operating system on which the executable runs, unless that component
245
itself accompanies the executable.
247
If distribution of executable or object code is made by offering
248
access to copy from a designated place, then offering equivalent
249
access to copy the source code from the same place counts as
250
distribution of the source code, even though third parties are not
251
compelled to copy the source along with the object code.
253
\item You may not copy, modify, sublicense, or distribute the Program
254
except as expressly provided under this License. Any attempt
255
otherwise to copy, modify, sublicense or distribute the Program is
256
void, and will automatically terminate your rights under this License.
257
However, parties who have received copies, or rights, from you under
258
this License will not have their licenses terminated so long as such
259
parties remain in full compliance.
261
\item You are not required to accept this License, since you have not
262
signed it. However, nothing else grants you permission to modify or
263
distribute the Program or its derivative works. These actions are
264
prohibited by law if you do not accept this License. Therefore, by
265
modifying or distributing the Program (or any work based on the
266
Program), you indicate your acceptance of this License to do so, and
267
all its terms and conditions for copying, distributing or modifying
268
the Program or works based on it.
270
\item Each time you redistribute the Program (or any work based on the
271
Program), the recipient automatically receives a license from the
272
original licensor to copy, distribute or modify the Program subject to
273
these terms and conditions. You may not impose any further
274
restrictions on the recipients' exercise of the rights granted herein.
275
You are not responsible for enforcing compliance by third parties to
278
\item If, as a consequence of a court judgment or allegation of patent
279
infringement or for any other reason (not limited to patent issues),
280
conditions are imposed on you (whether by court order, agreement or
281
otherwise) that contradict the conditions of this License, they do not
282
excuse you from the conditions of this License. If you cannot
283
distribute so as to satisfy simultaneously your obligations under this
284
License and any other pertinent obligations, then as a consequence you
285
may not distribute the Program at all. For example, if a patent
286
license would not permit royalty-free redistribution of the Program by
287
all those who receive copies directly or indirectly through you, then
288
the only way you could satisfy both it and this License would be to
289
refrain entirely from distribution of the Program.
291
If any portion of this section is held invalid or unenforceable under
292
any particular circumstance, the balance of the section is intended to
293
apply and the section as a whole is intended to apply in other
296
It is not the purpose of this section to induce you to infringe any
297
patents or other property right claims or to contest validity of any
298
such claims; this section has the sole purpose of protecting the
299
integrity of the free software distribution system, which is
300
implemented by public license practices. Many people have made
301
generous contributions to the wide range of software distributed
302
through that system in reliance on consistent application of that
303
system; it is up to the author/donor to decide if he or she is willing
304
to distribute software through any other system and a licensee cannot
307
This section is intended to make thoroughly clear what is believed to
308
be a consequence of the rest of this License.
310
\item If the distribution and/or use of the Program is restricted in
311
certain countries either by patents or by copyrighted interfaces, the
312
original copyright holder who places the Program under this License
313
may add an explicit geographical distribution limitation excluding
314
those countries, so that distribution is permitted only in or among
315
countries not thus excluded. In such case, this License incorporates
316
the limitation as if written in the body of this License.
318
\item The Free Software Foundation may publish revised and/or new versions
319
of the General Public License from time to time. Such new versions will
320
be similar in spirit to the present version, but may differ in detail to
321
address new problems or concerns.
323
Each version is given a distinguishing version number. If the Program
324
specifies a version number of this License which applies to it and "any
325
later version", you have the option of following the terms and conditions
326
either of that version or of any later version published by the Free
327
Software Foundation. If the Program does not specify a version number of
328
this License, you may choose any version ever published by the Free Software
331
\item If you wish to incorporate parts of the Program into other free
332
programs whose distribution conditions are different, write to the author
333
to ask for permission. For software which is copyrighted by the Free
334
Software Foundation, write to the Free Software Foundation; we sometimes
335
make exceptions for this. Our decision will be guided by the two goals
336
of preserving the free status of all derivatives of our free software and
337
of promoting the sharing and reuse of software generally.
346
\item BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
347
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
348
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
349
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
350
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
351
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
352
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
353
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
354
REPAIR OR CORRECTION.
356
\item IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
357
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
358
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
359
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
360
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
361
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
362
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
363
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
364
POSSIBILITY OF SUCH DAMAGES.
368
END OF TERMS AND CONDITIONS
372
\section*{ How to Apply These Terms to Your New Programs}
373
\addcontentsline{toc}{section}{How to Apply These Terms to Your New
376
If you develop a new program, and you want it to be of the greatest
377
possible use to the public, the best way to achieve this is to make it
378
free software which everyone can redistribute and change under these terms.
380
To do so, attach the following notices to the program. It is safest
381
to attach them to the start of each source file to most effectively
382
convey the exclusion of warranty; and each file should have at least
383
the "copyright" line and a pointer to where the full notice is found.
386
<one line to give the program's name and a brief idea of what it does.>
387
Copyright (C) 19yy <name of author>
389
This program is free software; you can redistribute it and/or modify
390
it under the terms of the GNU General Public License as published by
391
the Free Software Foundation; either version 2 of the License, or
392
(at your option) any later version.
394
This program is distributed in the hope that it will be useful,
395
but WITHOUT ANY WARRANTY; without even the implied warranty of
396
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
397
GNU General Public License for more details.
399
You should have received a copy of the GNU General Public License
400
along with this program; if not, write to the Free Software
401
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
403
Also add information on how to contact you by electronic and paper mail.
405
If the program is interactive, make it output a short notice like this
406
when it starts in an interactive mode:
408
Gnomovision version 69, Copyright (C) 19yy name of author
409
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
410
This is free software, and you are welcome to redistribute it
411
under certain conditions; type `show c' for details.
413
The hypothetical commands `show w' and `show c' should show the appropriate
414
parts of the General Public License. Of course, the commands you use may
415
be called something other than `show w' and `show c'; they could even be
416
mouse-clicks or menu items--whatever suits your program.
418
You should also get your employer (if you work as a programmer) or your
419
school, if any, to sign a "copyright disclaimer" for the program, if
420
necessary. Here is a sample; alter the names:
422
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
423
`Gnomovision' (which makes passes at compilers) written by James Hacker.
425
<signature of Ty Coon>, 1 April 1989
426
Ty Coon, President of Vice
428
This General Public License does not permit incorporating your program into
429
proprietary programs. If your program is a subroutine library, you may
430
consider it more useful to permit linking proprietary applications with the
431
library. If this is what you want to do, use the GNU Library General
432
Public License instead of this License.
438
The document explains, comments and shows some decisions, programming
439
techniques and solutions in \CiF. Its purpose is to highlight some
440
important parts of the implementation and to help with possible
441
extensions for new users.
443
The document also helps authors to have the latest form of the
444
implementation details in comprehensible form, as a commented manual.
446
The document consists of the \CiF\ grammar in BNF form, description of
447
the main interpreter organization, possibilities for including new
448
library functions and conditions for extending the language of \CiF.
450
Interrupt services as an option for debugging are also described.
451
Optional graphical interface with graphic primitives is a part of the
454
The substantial part of the document is devoted to the internal
455
representation of types in \CiF. The chapter will be interesting for
456
users, who want to extend the \CiF\ with new non atomary data types.
458
%The appendix is substantial part of the parser source code of the
459
%\CiF. It is provided with comments to help the reader in better
460
%orientation in the environment.
461
\chapter*{Contributors to the \CiF}
462
\addcontentsline{toc}{chapter}{Contributors to the \CiF}
464
In addition to \v{L}udov\'{\i}t Kore\v{n} several people contributed
468
\item Tom\'{a}\v{s} Hr\'{u}z principal planning decisions, overall
469
design and many ideas for implementation
470
\item Jozef Repisk\'{y} first basic (and very restricted)
474
\chapter{Compiling options}\label{compiling_options}
476
There are several additional options, that are supported during a run
477
of {\sf configure}\index{configure@{\sf configure}} script. They are
478
described in the following sections.
480
\section{Option --enable-CONTROL}
481
If a command line option {\sf --enable-CONTROL} was specified, the
482
synchronous and asynchronous interrupts are enabled
483
(see~\ref{int_service}).
485
\section{Option --enable-CODE}
486
If a command line option {\sf --enable-CODE} was specified, the output
487
of the virtual machine code is enabled. The output file name is {\sf
490
\section{Option --enable-DEBUG}
491
If a command line option {\sf --enable-DEBUG} was specified, the debug
492
output is enabled on the {\sf stderr}.
494
\section{Option --enable-CHKSTACK}
495
If a command line option {\sf --enable-CHKSTACK} was specified, the
496
run-time check of stack and code area is done. I.e. each instruction
497
which grows the stack, assures that the stack does not interfere with
501
\chapter{Invoking \CiF}\index{Clif@{\CiF}!invoking}
503
\section{Options summary}
506
\item[-bc] Size of the memory in 512-Byte pages.
507
\item[-c] Compile only. (Not fully supported yet.)
508
\item[-copying] Show copying.
509
\item[Options controlling \CiF\ behavior.]
511
-fcall-by-reference, -fno-call-by-reference, -fcall-by-value,
512
-fno-call-by-value, -fhandle-main
514
\item[Debugging options.]
518
\item[-help] Show short help.
519
\item[-v] Show version.
520
\item[-version] Show version.
521
\item[-verbose] Verbose.
522
\item[-warranty] Show warranty.
523
\item[Warning options.]
525
-w, -Wcomment, -Wformat, -Wimplicit, -Wreturn-type, -Wtrigraphs,
526
-Wuninitialized, -Wall All of the above warnings.
528
-W, -Waggregate-return, -Wunused
532
\section{Memory size options}
537
option specifies number of 512-Byte pages for the \CiF\ environment
538
main memory. The arithmetical and temporary stack is multiple of this
541
\section{Options controlling \CiF\ behavior}
544
\item[-fcall-by-reference] call by reference parameter passing
546
\item[-fno-call-by-reference] do not pass parameters by reference.
547
\item[-fcall-by-value] call by value parameter passing mechanism.
548
\item[-fno-call-by-value] do not pass parameters by value.
550
From the above mentioned options, only one should be specified in
551
positive form and one in negative form.
553
\item[-fhandle-main] simulate compiler-like behavior. The files on
554
the command line and included files are compiled. The `main'
555
function must be defined. After parsing pass, the generated code is
556
executed. The main function is the beginning of execution.
559
\section{Debugging options}
562
\item[-g] produce debugging information. The source lines are output
563
during virtual machine code execution.\index{virtual machine}
564
\item[-dy] dump debugging information during parsing to standard
569
\section{Warning options}
572
\item[-w] Inhibit all warning messages.
573
\item[-Wcomment] Warn when a comment-start sequence `/*' appears in a
575
\item[-Wformat] Check calls to `printf' and `scanf', etc., to make
576
sure that the arguments supplied have types appropriate to the
577
specified format string.
578
\item[-Wimplicit] Warn if a function or parameter is implicitly
580
\item[-Wreturn-type] Warn if the return statement is without return
581
value in non-void function, or with a value in `void' function.
582
\item[-Wtrigraphs] Warn about trigraphs usage.
583
\item[-Wuninitialized] An automatic variable is used without first
585
\item[-Wall] All of the above warnings.
586
\item[-W] Print extra warning messages.
587
\item[-Waggregate-return] Warn if any functions that return structures
588
or unions are defined or called.
589
\item[-Wunused] Warn whenever a variable is unused aside from its
595
\section{\CiF\ error messages}
597
In this chapter is a list of \CiF\ error messages.
599
\subsection{Syntax error messages}
606
ERROR_FULL_INFO(line_counter);
608
"variable `%s' isn't declared\n",
612
ERROR_FULL_INFO(line_counter);
614
"variable `%s' was already declared\n",
618
ERROR_FULL_INFO(line_counter);
620
"remote procedure %s is not declared\n",
621
proc_name_text[proc]);
626
"local variable `%s' was already declared\n",
630
print_source_line ();
631
ERROR_FULL_INFO(line_counter);
633
"at the %d-th char, near the `%s'\n",
634
char_counter, yytext);
637
print_source_line ();
638
ERROR_FULL_INFO(line_counter);
640
"invalid type of the operand, %d-th character\n",
646
"remote function `%s' already declared\n",
650
ERROR_FULL_INFO(line_counter);
652
"remote function isn't declared\n");
655
ERROR_FULL_INFO(line_counter);
657
"remote functions are not in the load table\n");
660
ERROR_FULL_INFO(line_counter);
662
"`void' type in expression\n");
665
ERROR_FULL_INFO(line_counter);
667
"`void' type assigned to l_value\n");
670
ERROR_FULL_INFO(line_counter);
672
"load can't open file `%s'\n",
676
ERROR_FULL_INFO(line_counter);
678
"variable or field `%s' declared void\n",
682
ERROR_FULL_INFO(line_counter);
684
"switch quantity not an integer\n");
687
ERROR_FULL_INFO(line_counter);
689
"case label does not reduce to an integer constant\n");
692
ERROR_FULL_INFO(tmp_c->line_number);
694
"duplicate case value\n");
695
ERROR_FULL_INFO(tmp_m->line_number);
697
"this is the first entry for that value\n");
700
ERROR_FULL_INFO(line_counter);
702
"case label not within a switch statement\n");
705
ERROR_FULL_INFO(line_counter);
707
"struct tag `%s' was already declared\n",
711
ERROR_FULL_INFO(line_counter);
713
"union tag `%s' was already declared\n",
717
ERROR_FULL_INFO(line_counter);
719
"enum tag `%s' was already declared\n",
723
ERROR_FULL_INFO(line_counter);
725
"conversion to non-scalar type requested\n");
728
ERROR_FULL_INFO(line_counter);
730
"invalid type argument of `->'\n");
733
ERROR_FULL_INFO(line_counter);
735
"invalid lvalue in unary `&'\n");
738
ERROR_FULL_INFO(line_counter);
740
"storage size of `%s' isn't known\n",
744
ERROR_FULL_INFO(line_counter);
746
"parameter `%s' has incomplete type\n",
754
\subsection{\CiF\ compilation error messages}
760
print_source_line ();
761
ERROR_FULL_INFO(line_counter);
763
"invalid number of subscripts\n");
766
ERROR_FULL_INFO(line_counter);
768
"`%s' is not an array variable\n",
772
print_source_line ();
773
ERROR_FULL_INFO(line_counter);
775
"invalid type of array subscript\n");
778
print_source_line ();
779
ERROR_FULL_INFO(line_counter);
781
"type of formal parameter does not match previous declaration\n");
784
ERROR_FULL_INFO(line_counter);
786
"number of formal parameters does not match previous declaration\n");
789
print_source_line ();
790
ERROR_FULL_INFO(line_counter);
792
"name of formal paramter does not match previous declaration\n");
795
print_source_line ();
796
ERROR_FULL_INFO(line_counter);
798
"size of array subscript of formal parameter does not match previous declaration\n");
801
print_source_line ();
802
ERROR_FULL_INFO(line_counter);
804
"number of array subscripts of formal parameter does not match previous declaration\n");
807
ERROR_FULL_INFO(line_counter);
809
"structure has no member named `%s'\n",
813
ERROR_FULL_INFO(line_counter);
815
"request for member `%s' in something not a structure or union\n",
823
\subsection{\CiF\ control statement error messages}
829
ERROR_FULL_INFO(line_counter);
831
"`break' outside loop or switch\n");
834
ERROR_FULL_INFO(line_counter);
836
"bad used `continue'\n");
839
ERROR_FULL_INFO(line_counter);
841
"default label not within a switch statement\n");
844
ERROR_FULL_INFO(line_counter);
846
"multiple default labels in one switch\n");
847
ERROR_FULL_INFO(fixp->switch1.def_use.line_number);
849
"this is the first default label\n");
852
ERROR_FULL_INFO(line_counter);
854
"duplicate label `%s'\n",
858
ERROR_FULL_INFO(error_line_number);
860
"label `%s' used but not defined\n",
864
ERROR_FULL_INFO(error_line_number);
866
"invalid lvalue in assignment\n");
873
\subsection{\CiF\ run-time error messages}
882
"interpreter: full memory\n");
887
"interpreter: stack overflow\n");
892
"operating system out of memory\n");
898
\subsection{\CiF\ fatal error messages}
909
"Interpreter Internal Error (unknown operand type) in line %d e-mail: %s\n",
910
line_counter, EMAIL);
911
print_source_line ();
918
" Internal Interpreter Error (unknown instruction) e-mail: %s\n",
920
print_source_line ();
927
" Interpreter Internal Error (error in book-keeping) in line %d e-mail: %s\n",
928
line_counter, EMAIL);
929
print_source_line ();
936
" Internal Interpreter Error (error in operand type) in line %d e-mail: %s\n",
937
line_counter, EMAIL);
938
print_source_line ();
945
\subsection{\CiF\ warning messages}
954
ERROR_FULL_INFO(line_counter);
956
"remote function %s already declared\n",
963
ERROR_FULL_INFO(line_counter);
965
"`return' with no value, in function returning non-void\n");
971
ERROR_FULL_INFO(line_counter);
973
"`return' with a value, in function returning void\n");
983
" In function `%s':",
984
proc_name_text[proc]);
987
"unused variable `%s'\n",
994
" In block finishing at line %d:\n",
998
"unused variable `%s'\n",
1006
ERROR_FULL_INFO(error_line_number);
1008
"label `%s' defined but not used\n",
1017
" `/*' within comment\n");
1027
" In function `%s':",
1028
proc_name_text[proc]);
1031
"`%s' might be used uninitialized in this function\n",
1038
" In block finishing at line %d:",
1042
"`%s' might be used uninitialized in the block\n",
1052
" In function `%s':",
1053
proc_name_text[proc]);
1056
"number of locals is greater than the ANSI allows\n");
1064
" In function `%s':\n",
1065
proc_name_text[proc]);
1068
"number of params is greater than the ANSI allows\n");
1074
char *tmp_line, *beg, *end, *com;
1076
n = strlen(line_buf);
1077
tmp_line = malloc(n+1);
1078
if (NULL == tmp_line)
1084
strcpy (tmp_line, line_buf);
1085
beg = strrchr (tmp_line, '(');
1093
com = strrchr (beg, ',');
1096
for (; *beg == ' ' || *beg == '\t'; beg++);
1098
end = strrchr (beg, ' ');
1099
com = strchr (beg, ' ');
1103
tmp_line[n - 1] = '\0';
1107
"`%s' declared inside parameter list its scope is only this definition or declaration, which is probably not what you want.\n",
1117
\subsection{\CiF\ initialization error messages}
1124
print_error_number (err_no);
1126
"in run-string and/or in `clif.ini' file\n");
1129
print_error_number (err_no);
1131
"interpreter: can't open file %s\n",
1132
argvv[argc_counter]);
1135
fprintfx (stderr, "Fatal error invalid error number (%d) e-mail: %s\n", err_no, EMAIL);
1142
\chapter{Syntax of the language} \label{syntax}
1144
\newcommand{\s}{\mbox{$\longrightarrow$}}
1145
\newcommand{\cs}{\mbox{$\mid$}}
1146
\newcommand{\cl}{\mbox{$<$}}
1147
\newcommand{\r}{\mbox{$>$}}
1148
\newcommand{\h}{\hspace{.7in}}
1151
\cl list\_stat\_0 \r ::= \cl list\_stat\_0 \r \cl stat\_0 \r \\
1158
\cl list\_stat \r ::= \cl list\_stat \r \cl stat\_1 \r \\
1165
\cl stat\_0 \r ::= \cl declarations \r\\
1166
\h \cs \cl statement \r\\
1169
\h \cs \cl error \r ';'\\
1175
\cl stat\_1 \r ::= \cl statement \r\\
1176
\h \cs GOTO IDENT ';' \\
1178
\h \cs \cl error \r '\}'\\
1179
\h \cs \cl error \r ';'\\
1186
\cl jump\_statement \r\\
1189
\h \cs CONTINUE ';'\\
1191
\h \cs RETURN \cl expression \r ';'\\
1200
\cl declaration\_specifiers \r\\
1201
::= \cl storage\_class\_specifier \r\\
1202
\h \cs \cl storage\_class\_specifier \r \cl declaration\_specifiers \r\\
1203
\h \cs \cl type\_specifier \r\\
1204
\h \cs \cl type\_specifier \r \cl declaration\_specifiers \r\\
1205
\h \cs \cl type\_qualifier \r\\
1206
\h \cs \cl type\_qualifier \r \cl declaration\_specifiers \r\\
1214
\cl declarations \r ::=\\
1215
M \cl declaration\_specifiers \r \cl first\_dekl \r\\
1216
\h \cs REMOTE '\{' INTRINSIC ',' STRINGC '\}' IDENT ';' \\
1218
\h \cs REMOTE '\{' RPC ',' STRINGC '\}' IDENT ';'\\
1219
\h \cs UNLOAD IDENT ';'\\
1226
\cl statement \r ::= \cl labeled\_statement \r\\
1227
\h \cs \cl compound\_statement \r\\
1230
\cl expression \r ';'\\
1232
\h \cs \cl selection\_statement \r\\
1233
\h \cs \cl iteration\_statement \r\\
1234
\h \cs \cl jump\_statement \r\\
1236
\h \cs CSUSPEND ';'\\
1243
\cl selection\_statement \r\\
1244
::= IF '(' \cl expression \r ')'\\
1246
\h \cs SWITCH '(' \cl expression \r ')' \\
1247
\cl switch\_body \r\\
1254
\cl iteration\_statement \r\\
1256
'(' \cl expression \r ')'\\
1257
\cl while\_stat \r\\
1259
\cl do\_while\_stat \r\\
1260
WHILE '(' \cl expression \r ')' ';'\\
1262
\h \cs FOR \cl for \r \cl for\_stat \r\\
1268
\cl while\_stat \r ::= \cl stat\_1 \r\\
1274
\cl do\_while\_stat \r \\
1275
::= \cl stat\_1 \r\\
1281
\cl for\_stat \r ::= \cl stat\_1 \r\\
1287
\cl for \r ::= '(' \cl expression \r ';'\\
1296
\cl for\_expr1 \r::= \cl expression \r ';'\\
1306
\cl for\_expr2 \r::= \cl expression \r ')'\\
1315
\cl type\_specifier \r ::= INT \\
1328
\h \cs \cl struct\_or\_union\_specifier \r\\
1329
\h \cs \cl enum\_specifier \r\\
1336
\cl type\_qualifier \r\\
1347
\h \cs '$\ast$' \cl type\_qualifier\_list \r\\
1348
\h \cs '$\ast$' \cl pointer \r\\
1349
\h \cs '$\ast$' \cl type\_qualifier\_list \r \cl pointer \r\\
1355
\cl type\_qualifier\_list \r\\
1356
::= \cl type\_qualifier \r\\
1357
\h \cs \cl type\_qualifier\_list \r \cl type\_qualifier \r\\
1363
\cl struct\_or\_union\_specifier \r\\
1364
::= \cl struct\_or\_union \r IDENT \\
1365
'\{' \cl struct\_declaration\_list \r '\}' \\
1366
\h \cs \cl struct\_or\_union \r \\
1367
'\{' \cl struct\_declaration\_list \r '\}'\\
1368
\h \cs \cl struct\_or\_union \r IDENT\\
1374
\cl struct\_or\_union \r\\
1383
\cl struct\_declaration\_list \r\\
1384
::= \cl struct\_declaration \r \\
1385
\h \cs \cl struct\_declaration\_list \r \cl struct\_declaration \r\\
1391
\cl struct\_declaration \r\\
1392
::= M \cl specifier\_qualifier\_list \r \cl struct\_declarator\_list \r ';'\\
1398
\cl specifier\_qualifier\_list \r\\
1399
::= \cl type\_specifier \r\\
1400
\h \cs \cl type\_specifier \r \cl specifier\_qualifier\_list \r\\
1401
\h \cs \cl type\_qualifier \r \\
1402
\h \cs \cl type\_qualifier \r \cl specifier\_qualifier\_list \r\\
1408
\cl struct\_declarator\_list \r\\
1409
::= \cl struct\_declarator \r\\
1410
\h \cs \cl struct\_declarator\_list \r ',' \cl struct\_declarator \r\\
1416
\cl struct\_declarator \r\\
1417
::= \cl declarator \r\\
1418
\h \cs ':' \cl constant\_expression \r\\
1419
\h \cs \cl declarator \r ':' \cl constant\_expression \r\\
1425
\cl enum\_specifier \r\\
1427
\cl enumerator\_list \r '\}'\\
1429
\h \cs ENUM IDENT '\{' \\
1430
\cl enumerator\_list \r '\}'\\
1432
\h \cs ENUM IDENT \\
1438
\cl enumerator\_list \r\\
1439
::= \cl enumerator \r\\
1440
\h \cs \cl enumerator\_list \r ',' \cl enumerator \r\\
1448
\h \cs IDENT '=' \cl constant\_expression \r\\
1455
::= \cl pointer \r \cl direct\_declarator \r\\
1456
\h \cs \cl direct\_declarator \r\\
1462
\cl direct\_declarator \r\\
1464
\h \cs IDENT \cl list\_dim \r\\
1470
\cl initializer \r\\
1471
::= \cl assignment\_expression \r\\
1473
\cl initializer\_list\_complete \r\\
1479
\cl initializer\_list\_complete \r\\
1480
::= \cl initializer\_list \r '\}'\\
1482
\h \cs \cl initializer\_list \r ',' '\}'\\
1488
\cl initializer\_list \r\\
1489
::= \cl initializer \r\\
1490
\h \cs \cl initializer\_list \r ','\\
1491
\cl initializer \r\\
1498
::= M \cl specifier\_qualifier\_list \r\\
1499
\h \cs M \cl specifier\_qualifier\_list \r \cl abstract\_declarator \r\\
1505
\cl abstract\_declarator \r\\
1506
::= \cl pointer \r\\
1507
\h \cs \cl direct\_abstract\_declarator \r\\
1508
\h \cs \cl pointer \r \cl direct\_abstract\_declarator \r\\
1514
\cl direct\_abstract\_declarator \r\\
1515
::= '(' \cl abstract\_declarator \r ')'\\
1516
\h \cs '$[$' '$]$'\\
1517
\h \cs \cl direct\_abstract\_declarator \r '$[$' '$]$'\\
1518
\h \cs '$[$' \cl constant\_expression \r '$]$'\\
1519
\h \cs \cl direct\_abstract\_declarator \r '$[$' \cl constant\_expression \r '$]$'\\
1521
\h \cs \cl direct\_abstract\_declarator \r '(' ')'\\
1522
\h \cs '(' \cl list\_type\_spec \r ')'\\
1523
\h \cs \cl direct\_abstract\_declarator \r '(' \cl list\_type\_spec \r ')'\\
1529
\cl storage\_class\_specifier \r\\
1544
\cl list\_type\_spec \r ::= M \cl declaration\_specifiers \r\\
1546
\h \cs M \cl declaration\_specifiers \r ','\\
1547
\cl list\_type\_spec \r\\
1548
\h \cs M \cl declaration\_specifiers \r \cl list\_dim\_or\_pointer \r\\
1549
\h \cs M \cl declaration\_specifiers \r \cl list\_dim\_or\_pointer \r ',' \\
1550
\cl list\_type\_spec \r\\
1556
\cl list\_dim\_or\_pointer \r ::= \cl list\_dim \r\\
1558
\h \cs \cl pointer \r\\
1560
\h \cs '(' \cl pointer \r ')' '(' ')'\\
1562
\h \cs '(' \cl pointer \r ')' '(' \cl list\_type\_spec \r ')'\\
1564
\h \cs '(' \cl pointer \r ')' \cl list\_dim \r\\
1571
\cl first\_dekl \r ::= IDENT \\
1572
\cl initializer\_optional \r \\
1573
\h \cs IDENT \cl list\_dim \r\\
1574
\cl initializer\_optional \r\\
1575
\h \cs \cl pointer \r IDENT\\
1576
\cl initializer\_optional \r\\
1577
\h \cs \cl pointer \r IDENT \cl list\_dim \r\\
1578
\cl initializer\_optional \r\\
1580
\cl func\_first \r\\
1581
\h \cs \cl pointer \r IDENT '('\\
1582
\cl func\_first \r\\
1589
\cl func\_first \r ::= ')' \\
1590
\cl initializer\_optional \r\\
1591
\h \cs \cl list\_type\_spec \r ')'\\
1592
\cl initializer\_optional \r\\
1593
\h \cs \cl list\_form\_param \r ')'\\
1594
\cl initializer\_optional \r\\
1595
\h \cs \cl list\_form\_param \r ')'\\
1596
\cl compound\_statement \r\\
1599
\cl compound\_statement \r\\
1605
\cl func\_rest \r ::= ')'\\
1606
\cl initializer\_optional \r\\
1607
\h \cs \cl list\_type\_spec \r ')'\\
1608
\cl initializer\_optional \r\\
1609
\h \cs \cl list\_form\_param \r ')'\\
1610
\cl initializer\_optional \r\\
1611
\h \cs \cl error \r '\{'\\
1618
\cl list\_dekl \r ::= IDENT\\
1619
\cl initializer\_optional \r\\
1620
\h \cs IDENT \cl list\_dim \r\\
1621
\cl initializer\_optional \r\\
1624
\h \cs \cl pointer \r IDENT\\
1625
\cl initializer\_optional \r\\
1626
\h \cs \cl pointer \r IDENT \cl list\_dim \r\\
1627
\cl initializer\_optional \r\\
1628
\h \cs \cl pointer \r IDENT '('\\
1635
\cl initializer\_optional \r\\
1637
\h \cs \cl initialization \r ';'\\
1638
\h \cs ',' R \cl list\_dekl \r\\
1639
\h \cs \cl initialization \r\\
1640
',' \cl list\_dekl \r\\
1648
\cl initialization \r\\
1649
::= '=' \cl initializer \r\\
1657
\cl then \r ::= \cl stat\_1 \r\\
1658
ELSE \cl stat\_1 \r\\
1660
\h \cs \cl stat\_1 \r\\
1666
\cl switch\_body \r ::= \cl stat\_1 \r\\
1673
\cl labeled\_statement \r \\
1677
\cl constant\_expression \r \\
1678
':' \cl stat\_1 \r\\
1679
\h \cs DEFAULT ':' \\
1687
\cl compound\_statement \r\\
1688
::= '\{' N \cl list\_stat \r '\}'\\
1689
\h \cs '\{' N \cl list\_loc\_dekl \r \\
1690
\cl list\_stat \r '\}'\\
1699
\cl list\_form\_param \r \\
1700
::= M \cl declaration\_specifiers \r IDENT\\
1702
\h \cs M \cl declaration\_specifiers \r IDENT ','\\
1703
\cl list\_form\_param \r\\
1704
\h \cs M \cl declaration\_specifiers \r IDENT \cl list\_dim \r\\
1706
\h \cs M \cl declaration\_specifiers \r IDENT \cl list\_dim \r ',' \\
1707
\cl list\_form\_param \r\\
1708
\h \cs M \cl declaration\_specifiers \r \cl pointer \r IDENT\\
1710
\h \cs M \cl declaration\_specifiers \r \cl pointer \r IDENT ','\\
1711
\cl list\_form\_param \r\\
1712
\h \cs M \cl declaration\_specifiers \r \cl pointer \r IDENT \cl list\_dim \r\\
1714
\h \cs M \cl declaration\_specifiers \r \cl pointer \r IDENT \cl list\_dim \r ',' \\
1715
\cl list\_form\_param \r\\
1721
\cl list\_dim \r ::= '$[$' '$]$'\\
1723
\h \cs '$[$' NUMBERI '$]$'\\
1725
\h \cs \cl list\_dim \r '$[$' NUMBERI '$]$'\\
1731
\cl list\_loc\_dekl \r\\
1732
::= M \cl declaration\_specifiers \r \cl list\_loc\_dekl\_1 \r\\
1733
\h \cs M \cl declaration\_specifiers \r ';'\\
1734
\h \cs M \cl declaration\_specifiers \r ';' \\
1735
\cl list\_loc\_dekl \r\\
1741
\cl list\_loc\_dekl\_1 \r\\
1743
\cl initializer\_optional\_loc \r\\
1744
\h \cs IDENT \cl list\_dim \r\\
1745
\cl initializer\_optional\_loc \r\\
1746
\h \cs IDENT '(' ')'\\
1747
\cl initializer\_optional\_loc \r\\
1748
\h \cs IDENT '(' \cl list\_type\_spec \r ')'\\
1749
\cl initializer\_optional\_loc \r\\
1750
\h \cs IDENT '(' \cl list\_form\_param \r ')'\\
1751
\cl initializer\_optional\_loc \r\\
1752
\h \cs \cl pointer \r IDENT\\
1753
\cl initializer\_optional\_loc \r\\
1754
\h \cs \cl pointer \r IDENT \cl list\_dim \r\\
1755
\cl initializer\_optional\_loc \r\\
1756
\h \cs \cl pointer \r IDENT '(' ')'\\
1757
\cl initializer\_optional\_loc \r\\
1758
\h \cs \cl pointer \r IDENT '(' \cl list\_type\_spec \r ')'\\
1759
\cl initializer\_optional\_loc \r\\
1760
\h \cs \cl pointer \r IDENT '(' \cl list\_form\_param \r ')'\\
1761
\cl initializer\_optional\_loc \r\\
1767
\cl initializer\_optional\_loc \r\\
1770
\cl list\_loc\_dekl \r\\
1771
\h \cs \cl local\_initialization \r ';'\\
1772
\h \cs \cl local\_initialization \r ';'\\
1773
\cl list\_loc\_dekl \r\\
1774
\h \cs ',' P \cl list\_loc\_dekl\_1 \r\\
1775
\h \cs \cl local\_initialization \r ',' \cl list\_loc\_dekl\_1 \r\\
1783
\cl local\_initialization \r\\
1784
::= '=' \cl initializer \r\\
1791
\cl call \r ::= \cl list\_param \r\\
1798
\cl list\_param \r ::= \cl assignment\_expression \r ')' \\
1800
\h \cs \cl assignment\_expression \r ','\\
1801
\cl list\_param \r\\
1808
\cl primary\_expression \r\\
1831
\h \cs '(' \cl expression \r ')'\\
1837
\cl ident \r ::= IDENT\\
1843
\cl postfix\_expression \r\\
1844
::= \cl primary\_expression \r\\
1845
\h \cs \cl postfix\_expression \r\\
1846
'$[$' \cl expression \r '$]$'\\
1848
\h \cs \cl postfix\_expression \r '.' IDENT\\
1850
\h \cs \cl postfix\_expression \r PTR IDENT\\
1853
\h \cs \cl postfix\_expression \r PP\\
1855
\h \cs \cl postfix\_expression \r MM\\
1857
\h \cs \cl postfix\_expression \r '('\\
1865
\cl unary\_expression \r\\
1866
::= \cl postfix\_expression \r\\
1868
\h \cs '\&' \cl unary\_expression \r\\
1870
\h \cs '$\ast$' \cl unary\_expression \r\\
1872
\h \cs NEG\_T \cl unary\_expression \r \\
1874
\h \cs NEG\_B \cl unary\_expression \r\\
1876
\h \cs '+' \cl unary\_expression \r\\
1878
\cl unary\_expression \r\\
1880
\h \cs PP \cl unary\_expression \r \cl ae\_empty \r\\
1882
\h \cs MM \cl unary\_expression \r \cl ae\_empty \r\\
1884
\h \cs SIZEOF \cl unary\_expression \r\\
1886
\h \cs SIZEOF '(' \cl type\_name \r ')'\\
1892
\cl cast\_expression \r\\
1893
::= \cl unary\_expression \r\\
1894
\h \cs '(' \cl type\_name \r ')' \cl cast\_expression \r\\
1900
\cl multiplicative\_expression \r\\
1901
::= \cl cast\_expression \r\\
1902
\h \cs \cl multiplicative\_expression \r '$\ast$' \cl cast\_expression \r\\
1904
\h \cs \cl multiplicative\_expression \r '/' \cl cast\_expression \r\\
1906
\h \cs \cl multiplicative\_expression \r '\' \cl cast\_expression \r\\
1912
\cl additive\_expression \r\\
1913
::= \cl multiplicative\_expression \r\\
1914
\h \cs \cl additive\_expression \r '+' \cl multiplicative\_expression \r\\
1916
\h \cs \cl additive\_expression \r '-' \cl multiplicative\_expression \r\\
1922
\cl shift\_expression \r\\
1923
::= \cl additive\_expression \r\\
1924
\h \cs \cl shift\_expression \r SHIL \cl additive\_expression \r\\
1926
\h \cs \cl shift\_expression \r SHIR \cl additive\_expression \r\\
1932
\cl relational\_expression \r\\
1933
::= \cl shift\_expression \r\\
1934
\h \cs \cl relational\_expression \r '$<$' \cl shift\_expression \r\\
1936
\h \cs \cl relational\_expression \r '$>$' \cl shift\_expression \r\\
1938
\h \cs \cl relational\_expression \r LQ \cl shift\_expression \r\\
1940
\h \cs \cl relational\_expression \r GQ \cl shift\_expression \r\\
1946
\cl equality\_expression \r\\
1947
::= \cl relational\_expression \r\\
1948
\h \cs \cl equality\_expression \r EQ\_A \cl relational\_expression \r\\
1950
\h \cs \cl equality\_expression \r NE\_A \cl relational\_expression \r\\
1956
\cl bit\_AND\_expression \r\\
1957
::= \cl equality\_expression \r\\
1958
\h \cs \cl bit\_AND\_expression \r '\&' \cl equality\_expression \r\\
1964
\cl exclusive\_OR\_expression \r\\
1965
::= \cl bit\_AND\_expression \r\\
1966
\h \cs \cl exclusive\_OR\_expression \r ' $\hat{}$ ' \cl bit\_AND\_expression \r\\
1972
\cl inclusive\_OR\_expression \r\\
1973
::= \cl exclusive\_OR\_expression \r\\
1974
\h \cs \cl inclusive\_OR\_expression \r '\cs' \cl exclusive\_OR\_expression \r\\
1980
\cl logical\_AND\_expression \r\\
1981
::= \cl inclusive\_OR\_expression \r\\
1982
\h \cs \cl logical\_AND\_expression \r AND\_A \\
1983
\cl inclusive\_OR\_expression \r\\
1989
\cl logical\_OR\_expression \r\\
1990
::= \cl logical\_AND\_expression \r\\
1991
\h \cs \cl logical\_OR\_expression \r OR\_A \\
1992
\cl logical\_AND\_expression \r\\
1998
\cl conditional\_expression \r\\
1999
::= \cl logical\_OR\_expression \r\\
2000
\h \cs \cl logical\_OR\_expression \r '?' \\
2001
\cl expression \r ':' \\
2002
\cl conditional\_expression \r\\
2009
\cl assignment\_expression \r\\
2010
::= \cl conditional\_expression \r\\
2011
\h \cs \cl unary\_expression \r\\
2012
'=' \cl assignment\_expression \r \\
2014
\h \cs \cl unary\_expression \r \cl assignment\_operator \r\\
2020
\cl ae\_empty \r::=\\
2027
\cl assignment\_operator \r\\
2028
::= MUL\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\
2030
\h \cs DIV\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\
2032
\h \cs MOD\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\
2034
\h \cs ADD\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\
2036
\h \cs SUB\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\
2038
\h \cs LEFT\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\
2040
\h \cs RIGHT\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\
2042
\h \cs AND\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\
2044
\h \cs XOR\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\
2046
\h \cs OR\_ASSIGN \cl ae\_empty \r \cl assignment\_expression \r\\
2054
::= \cl assignment\_expression \r\\
2055
\h \cs \cl expression \r ',' \\
2056
\cl assignment\_expression \r\\
2062
\cl constant\_expression \r\\
2063
::= \cl conditional\_expression \r\\
2071
\cl operator \r ::= any character from the set: \cs \verb| + - / \% < > & && == <= >= != * | $<<$ $>>$ $\hat{}$ $\tilde{}$ $!$ \cs \cs \\
2078
\cl numberi \r ::= \cl number \r \\
2079
\h \cs numberi \r \cl number \r \\
2086
\cl numberc \r ::= any single character \\
2093
\cl numberd \r ::= \cl numberi \r . \cl numberi \r \\
2094
\h \cs . \cl numberi \r \\
2095
\h \cs \cl numberi \r . \\
2102
\cl number \r ::= digit from the set: 0,1,2,3,4,5,6,7,8,9\\
2109
\cl stringc \r ::= Sequence one or more characters, first
2110
character is a letter followed by letters or digits\\
2117
\cl ident \r ::= Sequence one or more characters, first
2118
character is a letter followed by letters or digits\\
2122
LOAD\nolinebreak[4](\nolinebreak[4]file\_name\nolinebreak[4]);
2123
is only processed by lexical analyzer - yylex which opens file
2124
{\em file\_name} and redirects input to the input from that
2130
\section{Syntax of the graphical subsystem language}
2134
\cl list\_stat\_0 \r ::= \cl list\_stat\_0 \r \cl stat\_0 \r\\
2141
\cl stat\_0 \r ::= FIELDS '=' NUMBERI\\
2143
\h \cs TYPE '=' STRING\\
2145
\h \cs PRINT\_FORMAT '=' STRING\\
2147
\h \cs ON\_LEAVE\_WINDOW '=' STRING\\
2149
\h \cs DIRECTION '=' STRING\\
2151
\h \cs START\_TIME '=' \cl s\_time \r\\
2152
\h \cs DURATION\_TIME '=' \cl d\_time \r\\
2153
\h \cs W\_RESOLUTION '=' NUMBERI NUMBERI\\
2155
\h \cs LOWER '(' NUMBERI ')' '=' NUMBERD\\
2157
\h \cs UPPER '(' NUMBERI ')' '=' NUMBERD\\
2159
\h \cs STYLE '(' NUMBERI ')' '=' NUMBERI\\
2161
\h \cs \cl error \r\\
2168
\cl d\_time \r ::= NUMBERD \\
2177
\cl s\_time \r ::= NUMBERD\\
2188
\cl numberi \r ::= \cl number \r \\
2189
\h \cs \cl numberi \r \cl number \r \\
2196
\cl numberd \r ::= \cl numberi \r . \cl numberi \r \\
2197
\h \cs . \cl numberi \r \\
2198
\h \cs \cl numberi \r . \\
2205
\cl number \r ::= digit from the set: 0,1,2,3,4,5,6,7,8,9\\
2210
\newcommand{\med}{\hspace{2cm}}
2211
\chapter{Interpreter organization}
2212
\section{Instruction set of the virtual
2213
machine}\label{stroj}\index{instruction!set}
2215
Notation:\index{notation}\\
2216
$ADR$- address of the memory cell\\
2217
%$ADR\_STACK$- the address stack register\\
2218
$AST$- the arithmetic stack register\\
2219
$BP$- the base pointer, it is used in relative address
2220
mode\index{BP@{\bf BP}}\\
2221
$TMP$- the temporary stack register, it is used in
2222
addressing of temporary variables\\
2223
$TMPH$- the temporary stack register, it is used in
2224
resetting of the temporary stack\\
2225
$NUM$- offset in address or value\\
2226
$STRING$- a string\\
2227
%$INDEX$- offset in arrays\\
2228
$STACK$- the stack register\\
2229
$FRAME$- the stack register used in parameter passing to the intrinsic
2231
$[x]$- a value to which x points to\\
2232
%$[[$ $]]$- content of content of a cell\\
2233
\cl $integer$ \r- an integer literal\\
2234
\cl $double$ \r- a double precision floating point literal\\
2235
\cl $float$ \r- a single precision floating point literal\\
2236
\cl $char$ \r- a byte\\
2238
Instructions have a variable length. The structure of the
2239
instructions is the following: major, minor, immediately.
2240
Immediately can be either address or value. In the
2241
following table is the summary of instruction types.
2243
\begin{center}\label{instructions}
2244
\index{structure!OPERAND\_0\_ma@{\bf OPERAND\_0\_ma}}
2245
\index{OPERAND\_0\_ma@{\bf OPERAND\_0\_ma}}
2246
\index{structure!OPERAND\_0\_mi@{\bf OPERAND\_0\_mi}}
2247
\index{OPERAND\_0\_mi@{\bf OPERAND\_0\_mi}}
2248
\index{structure!OPERAND\_1\_ma@{\bf OPERAND\_1\_ma}}
2249
\index{OPERAND\_1\_ma@{\bf OPERAND\_1\_ma}}
2250
\index{structure!OPERAND\_1\_mi@{\bf OPERAND\_1\_mi}}
2251
\index{OPERAND\_1\_mi@{\bf OPERAND\_1\_mi}}
2252
\index{structure!OPERAND\_1\_i@{\bf OPERAND\_1\_i}}
2253
\index{OPERAND\_1\_i@{\bf OPERAND\_1\_i}}
2254
\index{structure!OPERAND\_1\_id@{\bf OPERAND\_1\_id}}
2255
\index{OPERAND\_1\_id@{\bf OPERAND\_1\_id}}
2256
\index{structure!OPERAND\_1\_if@{\bf OPERAND\_1\_if}}
2257
\index{OPERAND\_1\_if@{\bf OPERAND\_1\_if}}
2258
\index{structure!OPERAND\_1\_ic@{\bf OPERAND\_1\_ic}}
2259
\index{OPERAND\_1\_ic@{\bf OPERAND\_1\_ic}}
2260
\begin{tabular}{|c|c|c|}
2262
type & parameters & size \\ \hline \hline
2263
OP\_0\_ma & major & 1\\ \hline
2264
OP\_0\_mi & major & 2\\
2266
OP\_1\_ma & major & 2\\
2267
& address & \\ \hline
2268
OP\_1\_mi & major & 3\\
2270
& address & \\ \hline
2271
OP\_1\_i & major & 3\\
2277
\subsection{Address instructions and instructions on the
2278
arithmetic stack}\index{instruction!address}\index{instruction!on
2281
Instruction {\bf MOV}\index{instruction!MOV@{\bf MOV}}.\\
2282
Description: move data from the specified address to another specified
2283
address. The addresses are specified either as 2 consecutive addresses
2284
on the arithmetical stack, or one address is on the arithmetical stack
2285
and the second is created in the temporary stack. \\
2287
$[ADR] \longleftarrow [[AST]]$ \med type OP\_0\_mi\\
2288
The instruction is specific for each data type. We mean that the each
2289
instruction option represents a class of instructions. The
2290
instructions in each class differ by minor. For example the very
2291
first option is specific for type of operand double, float, integer,
2294
$BP \longleftarrow STACK$ \med type OP\_0\_mi\\ $STACK \longleftarrow
2295
BP$ \med type OP\_0\_mi\\ $TMPH \longleftarrow TMP$ \med type
2296
OP\_0\_mi\\ $FRAME \longleftarrow STACK$ \med type OP\_0\_mi\\
2297
$STACK \longleftarrow FRAME$ \med type OP\_0\_mi\\
2298
$[AST+1] \longleftarrow [AST]$ \med type OP\_0\_mi\\
2299
$[AST] \longleftarrow [[AST]]$ \med type OP\_0\_mi\\
2300
$[AST] \longleftarrow [AST]$ \med type OP\_0\_mi\\
2301
$[AST] \longleftarrow [(AST - 1) + [AST]]$ \med type OP\_0\_mi
2302
$[(AST - 2) + [AST]] \longleftarrow [(AST - 1) + [AST]]$ \med type
2305
Instruction {\bf PUSHA}\index{instruction!PUSHA@{\bf PUSHA}}\\
2306
Description: PUSH in to the
2307
arithmetic stack.\\ Options:\\ $[AST] \longleftarrow [ADR]$ \med type
2308
OP\_1\_mi\\ $[AST] \longleftarrow [BP+NUM]$ \med type OP\_1\_i\\
2309
$[AST] \longleftarrow [[BP+NUM]]$ \med type OP\_1\_i\\
2310
instructions are specific for each data type. \\ \newline
2311
Instruction {\bf PUSHAI}\index{instruction!PUSHAI@{\bf PUSHAI}}.\\
2312
Description: push onto the arithmetic stack
2313
immediately\\ Options:\\ $[[AST]] \longleftarrow NUM$ \med type
2314
OP\_1\_i\\ The instruction is specific for each data type. \\ $[[AST]]
2315
\longleftarrow STRING$ \med type OP\_1\_mi\\ \newline Instruction {\bf
2316
POPA}\index{instruction!POPA@{\bf POPA}}.\\ Description: POP from the arithmetic stack.\\ Options:\\ The
2317
arithmetic stack is cleared. \med type OP\_1\_mi\\
2318
The arithmetic stack is popped to the stack. \med type OP\_1\_i\\
2319
The instruction is implemented for each basic data type.
2321
Instruction {\bf XCHG}\index{instruction!XCHG@{\bf XCHG}}\\
2322
Description: Exchange two addresses on the top of the arithmetic
2325
$[AST - 1] \longleftrightarrow [AST]$ \med type OP\_0\_ma\\
2327
%$[STACK] \longleftarrow [AST]$ \med type OP\_0\_mi\\
2329
\subsubsection{Arithmetic-logical
2330
instructions}\index{instruction!arithmetic-logical}
2332
Address of the result is placed on the top of the
2333
arithmetic stack. Evaluation is placed into the temporary
2334
stack. Arithmetic-logical instructions are specific for
2335
each data type, if it is not stated otherwise in
2336
description of an instruction.
2338
Instruction {\bf ADD}\index{instruction!ADD@{\bf ADD}}.\\
2339
Description: perform arithmetic addition on the top of arithmetic
2340
stack or to the stack pointer. On the stack can be only processed an
2341
instruction mentioned below (to the stack pointer can be only added
2342
an integer number).\\Options:\\
2343
$[[AST-1]] \longleftarrow [[AST]]+[[AST-1]]$ \med type OP\_0\_mi\\
2344
$STACK \longleftarrow (STACK+NUM)$ \med type OP\_1\_i\\
2346
Instruction {\bf SUB}\index{instruction!SUB@{\bf SUB}}.\\
2347
Description: perform arithmetic
2348
subtraction on the top of arithmetic stack or from the stack
2349
pointer. On the stack can be only processed an instruction
2350
mentioned below (from the stack pointer can be only subtracted
2351
an integer number).\\Options:\\
2352
$[[AST-1]] \longleftarrow [[AST-1]]-[[AST]]$ \med type OP\_0\_mi\\
2353
$STACK \longleftarrow (STACK-NUM)$ \med type OP\_1\_i\\
2355
Instruction {\bf MULT}\index{instruction!MULT@{\bf MULT}}.\\
2356
Description: perform arithmetic
2357
multiplication.\\Options:\\
2358
$[[AST-1]] \longleftarrow [[AST]]*[[AST-1]]$ \med type OP\_0\_mi\\
2360
Instruction {\bf MOD}\index{instruction!MOD@{\bf MOD}}.\\
2361
Description: perform arithmetic
2362
modulo operation on integers.\\Options:\\
2363
$[[AST-1]] \longleftarrow [[AST-1]]\%[[AST]]$ \med type OP\_0\_ma\\
2365
Instruction {\bf DIV}\index{instruction!DIV@{\bf DIV}}.\\
2366
Description: perform arithmetic
2367
division.\\Options:\\
2368
$[[AST-1]] \longleftarrow [[AST-1]]/[[AST]]$ \med type OP\_0\_mi\\
2370
Instruction {\bf OR}\index{instruction!OR@{\bf OR}}.\\
2371
Description: perform logical
2372
inclusive OR.\\Options:\\
2373
$[[AST-1]] \longleftarrow [[AST-1]] \quad || \quad [[AST]]$ \med type OP\_0\_mi\\
2375
Instruction {\bf AND}\index{instruction!AND@{\bf AND}}.\\
2376
Description: perform logical
2378
$[[AST-1]] \longleftarrow [[AST-1]]\&\&[[AST]]$ \med type OP\_0\_mi\\
2380
Instruction {\bf ORB}\index{instruction!ORB@{\bf ORB}}.\\
2381
Description: perform bitwise OR of
2382
integers.\\Options:\\
2383
$[[AST-1]] \longleftarrow [[AST-1]] \quad | \quad [[AST]]$ \med type OP\_0\_ma\\
2385
Instruction {\bf ANDB}\index{instruction!ANDB@{\bf ANDB}}.\\
2386
Description: perform bitwise AND of
2387
integers.\\Options:\\
2388
$[[AST-1]] \longleftarrow [[AST-1]]\&[[AST]]$ \med type OP\_0\_ma\\
2390
Instruction {\bf EQ}\index{instruction!EQ@{\bf EQ}}.\\
2391
Description: perform logical test
2392
for equality.\\Options:\\
2393
$[[AST-1]] \longleftarrow [[AST-1]]==[[AST]]$ \med type OP\_0\_mi\\
2395
Instruction {\bf GR}\index{instruction!GR@{\bf GR}}.\\
2396
Description: perform logical test
2397
for greater than.\\Options:\\
2398
$[[AST-1]] \longleftarrow [[AST-1]]>[[AST]]$ \med type OP\_0\_mi\\
2400
Instruction {\bf LO}\index{instruction!LO@{\bf LO}}.\\
2401
Description: perform logical test
2402
for lower than.\\Options:\\
2403
$[[AST-1]] \longleftarrow [[AST-1]]<[[AST]]$ \med type OP\_0\_mi\\
2405
Instruction {\bf LE}\index{instruction!LE@{\bf LE}}.\\
2406
Description: perform logical test
2407
for lower or equal.\\Options:\\
2408
$[[AST-1]] \longleftarrow [[AST-1]]<=[[AST]]$ \med type OP\_0\_mi\\
2410
Instruction {\bf GE}\index{instruction!GE@{\bf GE}}.\\
2411
Description: perform logical test
2412
for greater or equal.\\Options:\\
2413
$[[AST-1]] \longleftarrow [[AST-1]]>=[[AST]]$ \med type OP\_0\_mi\\
2415
Instruction {\bf NE}\index{instruction!NE@{\bf NE}}.\\
2416
Description: perform logical test
2417
for non equal.\\Options:\\
2418
$[[AST-1]] \longleftarrow [[AST-1]]!=[[AST]]$ \med type OP\_0\_mi\\
2420
Instruction {\bf NEG}\index{instruction!NEG@{\bf NEG}}.\\
2421
Description: perform logical
2422
negation.\\Options:\\
2423
$[[AST]] \longleftarrow ! \quad [[AST]]$ \med type OP\_0\_mi\\
2425
Instruction {\bf NOT}\index{instruction!NOT@{\bf NOT}}.\\
2426
Description: perform one's
2427
complement operation of integers.\\Options:\\
2428
$[[AST]] \longleftarrow \tilde{} \quad [[AST]]$ \med OP\_0\_ma\\
2430
Instruction {\bf SAL}\index{instruction!SAL@{\bf SAL}}.\\
2431
Description: perform arithmetic
2432
left shift of integers.\\Options:\\
2433
$[[AST-1]] \longleftarrow [[AST-1]] << [[AST]]$ \med OP\_0\_ma\\
2435
Instruction {\bf SAR}\index{instruction!SAR@{\bf SAR}}.\\
2436
Description: perform arithmetic
2437
right shift of integers.\\Options:\\
2438
$[[AST-1]] \longleftarrow [[AST-1]] >> [[AST]]$ \med OP\_0\_ma\\
2440
Instruction {\bf XOR}\index{instruction!XOR@{\bf XOR}}.\\
2441
Description: perform logical
2442
exclusive OR of two integers.\\Options:\\
2443
$[[AST-1]] \longleftarrow [[AST-1]] \quad \hat{} \quad [[AST]]$ \med OP\_0\_ma\\
2445
\subsubsection{Integer and floating point
2446
instructions}\index{instruction!integer and floating point}
2448
Instruction {\bf CVT}\index{instruction!CVT@{\bf CVT}}.\\
2449
Description: Convert a signed
2450
quantity to a different signed data type.\\Options:\\
2451
\cl $integer$ \r $\longrightarrow$ \cl $double$ \r\\
2452
\cl $double$ \r $\longrightarrow$ \cl $integer$ \r\\
2453
\cl $integer$ \r $\longrightarrow$ \cl $float$ \r\\
2454
\cl $float$ \r $\longrightarrow$ \cl $integer$ \r\\
2455
\cl $float$ \r $\longrightarrow$ \cl $double$ \r\\
2456
\cl $double$ \r $\longrightarrow$ \cl $float$ \r\\
2457
\cl $char$ \r $\longrightarrow$ \cl $integer$ \r\\
2458
\cl $integer$ \r $\longrightarrow$ \cl $char$ \r\\
2459
\cl $double$ \r $\longrightarrow$ \cl $char$ \r\\
2460
\cl $char$ \r $\longrightarrow$ \cl $double$ \r\\
2461
\cl $char$ \r $\longrightarrow$ \cl $float$ \r\\
2462
\cl $float$ \r $\longrightarrow$ \cl $char$ \r\\
2463
%\cl $void$ \r $\longrightarrow$ \cl $integer$ \r\\
2464
%\cl $void$ \r $\longrightarrow$ \cl $double$ \r\\
2465
%\cl $void$ \r $\longrightarrow$ \cl $float$ \r\\
2466
%\cl $void$ \r $\longrightarrow$ \cl $char$ \r\\
2467
The conversion to the wider type (more bits) can be executed either on
2468
the top of the arithmetical stack or one operand under the top
2469
of the arithmetical stack. Above instructions are of the type
2472
There are not listed all possibilities. Basically, there is an
2473
instruction from each type to every type.
2475
\subsection{Stack instructions}\index{instruction!on stack}
2477
Instruction {\bf PUSH}\index{instruction!PUSH@{\bf PUSH}}.\\
2478
Description: Push value onto the
2480
%$[STACK] \longleftarrow [AST]$ \med type OP\_0\_mi\\
2482
$[STACK] \longleftarrow BP$ \med type OP\_0\_mi\\
2484
%$[STACK] \longleftarrow ADR$ \med type OP\_1\_mi\\
2486
$[STACK] \longleftarrow TMPH$ \med type OP\_0\_mi\\
2488
$[STACK] \longleftarrow FRAME$ \med type OP\_0\_mi\\
2490
Instruction {\bf POP}\index{instruction!POP@{\bf POP}}.\\
2491
Description: Pop value from the top
2492
of the stack.\\Options:\\
2493
$BP \longleftarrow [STACK]$ \med type OP\_0\_mi\\
2494
$TMPH \longleftarrow [STACK]$ \med type OP\_0\_mi\\
2495
$FRAME \longleftarrow [STACK]$ \med type OP\_0\_mi\\
2497
%\subsection{Address stack instruction}
2499
%Instruction {\bf PUSHAD}.\\Description: PUSH address into
2500
%the address stack.\\Options:\\
2501
%$[ADR\_STACK] \longleftarrow [AST]$ \med type OP\_0\_ma\\
2503
%$[ADR\_STACK] \longleftarrow (BP+NUM)$ \med type OP\_1\_i\\
2505
%$[ADR\_STACK] \longleftarrow [BP+NUM]$ \med type OP\_1\_i\\
2507
%$[ADR\_STACK] \longleftarrow STACK$ \med type OP\_0\_mi\\
2509
%Instruction {\bf POPAD}.\\Description: POP address from the
2510
%address stack.\\Options:\\
2511
%$[STACK] \longleftarrow [ADR\_STACK]$ \med type OP\_0\_ma\\
2513
\subsection{Temporary stack instructions}\index{instruction!temporary stack}
2514
Instruction {\bf CLRT}\index{instruction!CLRT@{\bf CLRT}}.\\
2515
Description: Clear temporary
2517
$TMP \longleftarrow TMPH$ \med type OP\_0\_ma\\
2519
\subsection{Input and output instructions}\index{instruction!input and
2520
output}\index{input!instruction}\index{output!instruction}
2522
Instruction {\bf IN}\index{instruction!IN@{\bf IN}}.\\
2523
Description: input of the value into
2524
address; the address is specified absolutely or
2525
relatively.\\Options:\\
2526
$IN [ADR]$ \med type OP\_1\_mi\\
2527
$IN [BP+NUM]$ \med type OP\_1\_i\\
2528
$IN [[BP+NUM]]$ \med type OP\_1\_i\\
2529
$IN [ADR+[[AST - 1]]]$ \med type OP\_1\_mi\\
2530
$IN [BP+NUM+[[AST - 1]]]$ \med type OP\_1\_i\\
2531
$IN [[BP+NUM+[[AST - 1]]]]$ \med type OP\_1\_i\\
2533
Instruction {\bf OUT}\index{instruction!OUT@{\bf OUT}}.\\
2534
Description: output of the content of the
2535
address; the address is specified absolutely or
2536
relatively.\\Options:\\
2537
$OUT [ADR]$ \med type OP\_1\_mi\\
2538
$OUT [BP+NUM]$ \med type OP\_1\_i\\
2539
$OUT [[BP+NUM]]$ \med type OP\_1\_i\\
2540
$OUT [ADR+[[AST - 1]]]$ \med type OP\_1\_mi\\
2541
$OUT [BP+NUM+[[AST - 1]]]$ \med type OP\_1\_i\\
2542
$OUT [[BP+NUM+[[AST - 1]]]]$ \med type OP\_1\_i\\
2544
Instruction {\bf MESS}\index{instruction!MESS@{\bf MESS}}.\\
2545
Description: put string message to
2546
the standard output.\\Options: type OP\_1\_ma\\
2548
\subsection{Control instructions}\index{instruction!control}
2550
Instruction {\bf STOP}\index{instruction!STOP@{\bf STOP}}.\\
2551
Description: signalization of
2552
end of the virtual machine run.\\Options: type
2555
Instruction {\bf INTER}\index{instruction!INTER@{\bf INTER}}.\\
2556
Description: indicating of
2557
synchronous interrupt.\\Options: type OP\_0\_ma\\
2559
Instruction {\bf IRET}\index{instruction!IRET@{\bf IRET}}.\\
2560
Description: return from
2561
synchronous or asynchronous interrupt.\\Options: type
2564
Instruction {\bf JMP}\index{instruction!JMP@{\bf JMP}}.\\
2565
Description: jump to the address.\\
2566
Options: type OP\_1\_ma\\
2568
Instruction {\bf JZ}\index{instruction!JZ@{\bf JZ}}.\\
2569
Description: If last operation is
2570
equal zero, jump to the address.\\Options: type OP\_1\_ma\\
2572
Instruction {\bf JNZ}\index{instruction!JNZ@{\bf JNZ}}.\\
2573
Description: If last operation is
2574
not equal zero, jump to the address.\\Options: type
2577
Instruction {\bf HALT}\index{instruction!HALT@{\bf HALT}}.\\
2579
halt.\\Options: type OP\_0\_ma\\
2581
Instruction {\bf CALL}\index{instruction!CALL@{\bf CALL}}.\\
2582
Description: call of a function. The function can be either user
2583
supplied one or intrinsic one. The intrinsic functions are either call
2584
by value or call by reference. \\Options: type OP\_1\_ma\\
2586
Instruction {\bf RET}\index{instruction!RET@{\bf RET}}.\\
2587
Description: return from a
2588
function.\\Options: type OP\_0\_ma\\
2591
\section{Storage of variables, hash tables}\label{storage_and_hash}\index{variable!storage}
2593
Local and global variable\index{variable!name} names and addresses are
2594
stored in hash\index{table!hashing}\index{hash!table} tables
2595
\cite{gries}. Structure record of the hash table for global variables
2601
struct tab /* Hash table structure. */
2604
int def; /* Position in the hash table. */
2605
int count; /* Is the variable used at all? */
2606
int use_line_number; /* The first use of the variable. */
2607
int l_value_flag; /* Is the variable initialized before
2609
int declaration_line; /* Variable declaration line number. */
2619
static struct tab *hastab; /* Pointer to the hash table. */
2625
Another table is for global identifiers. Its structure is as
2631
struct ident_tab /* Table of identifiers. */
2633
struct internal_type *type;
2635
struct ident_list_str *list_formal_param;
2646
static struct ident_tab *identtab; /* Pointer to the table of identifiers. */
2652
The structure {\sf internal\_type}\index{variable!internal\_type} is
2653
used for type of a variable, e.g. array\index{type!array},
2654
function\index{type!function} etc. The field {\sf body} flags if the
2655
variable is declared or defined. The {\sf DIM} structure is for
2656
storing of dimensions of arrays\index{array!dimension} and has the
2673
The structure\index{structure!fixing} {\sf FIX} is used for fixing of
2674
calls of the function and looks as follows:
2679
struct FIX /* List of addresses where to backpatch
2680
* undefined function.
2691
It is a linked list. {\sf address} point to the virtual
2692
machine\index{virtual machine} code where the call address should be
2695
The table\index{table!of local variables} of local variables is
2696
allocated when local variables are defined for the first time. Then,
2697
for each new block new table is allocated. After return to
2698
scope\index{scope!of variables} \index{scope!level} level zero the
2699
tables are deallocated. The table looks like:
2704
struct ident_tab_header
2710
struct ident_tab_header *previous_level;
2711
struct ident_tab_loc *all;
2712
struct tab *hastab_loc;
2713
struct ident_tab_loc *table;
2716
struct ident_tab_loc /* Table of local identifiers. */
2718
struct internal_type *type;
2722
struct ident_list_str *list_formal_param;
2723
struct ident_tab_loc *previous;
2730
The {\sf struct ident\_tab\_header} is header for the list of tables
2731
for local identifiers. {\sf scope\_level} is nesting level of the
2732
block. The zero level is the prime level. The {\sf offset} is size in
2733
bytes that has to be added to the offset of the local variable in
2734
nested scope (i.e. in the {\sf scope\_level} + 1, if the current level
2735
is {\sf scope\_level}). The {\sf previous\_level} points to the block
2736
{\sf scope\_level} - 1. The {\sf all} is a pointer to the list of all
2737
local variables. This list can be traversed and additional information
2738
can be found. The {\sf hastab\_loc} and {\sf table} point to the hash
2739
table and identifier table, respectively of the current level.
2741
The {\sf struct ident\_tab\_loc} consists of:
2743
\item[type] - internal representation of type
2744
\item[offset] - offset of the variable in the current level
2745
\item[previous] - points to the previous declared variable
2747
Pointer to the table is:
2752
static struct ident_tab_header
2753
*identtab_loc; /* Pointer to the table of local identifiers. */
2759
The interpreter is always searching for variables in the table of the
2760
local identifiers. If the names do not match with searched name, the
2761
interpreter proceeds in the table\index{table!of global identifiers}
2762
of the global identifiers. If the interpreter does not find the name
2763
of the variable in the hash
2764
table\index{table!hashing}\index{hash!table}, it\index{interpreter}
2765
announces an error\index{error}.
2767
Structures of the hash tables\index{table!hashing}\index{hash!table}
2768
of intrinsic functions\index{function!intrinsic} are the following:
2773
struct remote_tab /* Hash table structure for intrinsic
2778
void (*adr) PROTO((char **));
2779
struct remote_tab *next;
2788
struct remote_has_tab /* Hash table structure for intrinsic
2794
struct remote_has_tab *next;
2801
Intrinsic functions are initially stored in the list\index{list} {\sf
2802
remote\_tab}. The functions are loaded from this list into the hash
2803
table\index{table!hashing}\index{hash!table} of the {\sf
2804
remote\_has\_tab} structure. Pointers to these structures are:
2809
struct remote_has_tab *hastab_remote;
2818
*remote_ptr_C; /* Pointer to the structure of remote
2826
Hash function\index{function!hashing}\index{hash!function}
2827
\index{hash!code} is as follows:
2857
$MAX\_HAS$ is size of the hash
2858
table\index{table!hashing}\index{hash!table}.
2860
In addition, there is a table of defined types\index{type}:
2865
static struct ident_tab_header
2866
*tagtab; /* Pointer to the table of tags. */
2871
%\input{tables_c_hastab_type.tex}
2873
In this table are stored new types and structure tags, etc. For
2874
types, the lazy allocation is used, i.e. table is allocated only when
2875
first type is declared or defined.
2877
\section{F\/ixation and f\/ixative
2878
structures}\index{structure!fixing}\index{fixation} \label{fixation}
2879
\index{file!control.h}
2881
We use f\/ixation in the statements \index{statement!if@{\sf if}}
2882
\index{statement!while@{\sf while}} \index{statement!for@{\sf for}}
2883
\index{statement!continue@{\sf continue}} \index{statement!break@{\sf
2884
break}} \index{statement!return@{\sf return}}
2885
\index{statement!switch@{\sf switch}}{\sf if, while, for,
2886
continue, break}, {\sf return} and {\sf switch}. The f\/ixation are
2887
used in the loop statements\index{loop!statement} because of nested
2888
loops\index{loop!nested} or unknown length of the, loop respectively.
2890
Fixative structures are following:
2898
* Header of fixative structures.
2909
struct cont1 *cnext;
2910
struct break1 *bnext;
2916
char *jn; /* Label of the JZ */
2917
char *jmp2; /* Label of the JMP. The first JMP */
2918
/* instruction. It is between expr2 */
2920
char *jmp3; /* Address where to jump if all */
2921
/* statements of the loop are */
2922
/* done. (See manual) */
2923
struct break1 *bnext;
2924
struct cont1 *cnext;
2930
struct break1 *next;
2946
struct default_usage
2948
int line_number; /* Line number where the default label
2950
int def_flag; /* Flag if the default label was used.
2951
It can be used only once per switch
2952
statement. (ANSI) */
2953
char *adr; /* Address where to jump to in the
2954
virtual machine code. */
2962
struct default_usage def_use;
2963
struct break1 *bnext;
2964
struct list_const1 *next;
2967
struct list_const1 /* The list of labels in switch
2968
statement is created. The list is
2969
at the end of switch statement
2970
checked if labels in this list are
2971
not duplicit. If there are duplicit
2972
error message is issued. */
2974
int line_number; /* Line number where the label was
2975
used in the switch statement. */
2976
int constant; /* Label in switch statement. */
2977
struct list_const1 *next;
2994
union fix *fixp; /* Pointer to the fixative stack. */
3000
The fixation of {\sf for} statement is fully optimized, i.e. there are
3001
no jumps on jumps. It is tested if all parts, i.e. expr2 and expr3 are
3002
in the {\sf for} statement.
3004
The statement\index{statement!break@{\sf
3005
break}}\index{statement!continue@{\sf continue}} {\sf break, continue}
3006
are fixed to the end of the most inner loop.
3008
Another case is the statement {\sf return}\index{statement!return@{\sf
3009
return}}. The f\/ixation is made another way as it is mentioned
3010
above. The f\/ixative structure is:
3015
struct return1 /* List of addresses where to backpatch
3016
* returns from a function.
3020
struct return1 *next;
3029
struct return1 *rp; /* Pointer for backpatch address of */
3030
/* return in a function. */
3036
The epilogue of the procedure is fixed in this case (i.e. the epilogue
3037
is always executed, before the control flow reaches caller).
3039
The statement {\sf switch}\index{statement!switch@{\sf switch}} has
3040
complicated fixative structure. You can follow it in the comments
3041
attached to the fixative structure. It can be be clearer from the
3042
fig.~\ref{obr8} as well.
3044
See figures \ref{obr2}, \ref{obr3}, \ref{obr4}, \ref{obr5},
3045
\ref{obr6}, \ref{obr7}, \ref{obr8} for the all cases of the
3051
%\special{em:linewidth 0.4pt}
3052
\linethickness{0.4pt}
3053
\begin{picture}(65.00,48.00)
3054
\put(25.00,39.20){\makebox(0,0)[cc]{while ( expr )}}
3055
\put(25.00,31.20){\makebox(0,0)[cc]{\{}}
3056
\put(25.00,23.20){\makebox(0,0)[cc]{stat}}
3057
\put(25.00,15.20){\makebox(0,0)[cc]{\}}}
3058
\put(25.00,4.80){\makebox(0,0)[cc]{....}}
3059
\put(25.00,44.80){\vector(0,1){3.20}}
3060
\put(25.00,48.00){\vector(1,0){36.00}}
3061
\put(65.00,32.00){\makebox(0,0)[cc]{jz}}
3062
\put(61.00,48.00){\vector(0,-1){37.60}}
3063
\put(61.00,10.40){\vector(-1,0){30.00}}
3064
\put(19.00,15.00){\vector(-1,0){9.00}}
3065
\put(10.00,15.00){\vector(0,1){24.00}}
3066
\put(5.00,28.00){\makebox(0,0)[cc]{jmp}}
3067
\put(10.00,39.00){\vector(1,0){2.00}}
3071
%\special{em:linewidth 0.4pt}
3072
\linethickness{0.4pt}
3073
\begin{picture}(47.00,44.00)
3074
\put(20.00,34.00){\framebox(20.00,5.00)[cc]{expr}}
3075
\put(30.00,29.00){\makebox(0,0)[cc]{jz JZ}}
3076
\put(20.00,19.00){\framebox(20.00,5.00)[cc]{stat}}
3077
\put(30.00,14.00){\makebox(0,0)[cc]{jmp JMP}}
3078
\put(30.00,44.00){\vector(0,-1){5.00}}
3079
\put(30.00,34.00){\vector(0,-1){2.00}}
3080
\put(30.00,26.00){\vector(0,-1){2.00}}
3081
\put(30.00,19.00){\vector(0,-1){2.00}}
3082
\put(30.00,11.00){\vector(0,-1){6.00}}
3083
\put(30.00,10.00){\vector(-1,0){15.00}}
3084
\put(15.00,10.00){\vector(0,1){32.00}}
3085
\put(15.00,42.00){\vector(1,0){15.00}}
3086
\put(35.00,29.00){\vector(1,0){12.00}}
3087
\put(47.00,29.00){\vector(0,-1){21.00}}
3088
\put(47.00,8.00){\vector(-1,0){17.00}}
3091
\caption[F\/ixation in {\sf while}]{F\/ixation in {\sf while}} \label{obr2}
3097
%\special{em:linewidth 0.4pt}
3098
\linethickness{0.4pt}
3099
\begin{picture}(91.00,56.80)
3100
\put(45.00,37.60){\makebox(0,0)[cc]{for ( expr1; expr2; expr3 )}}
3101
\put(45.00,29.60){\makebox(0,0)[cc]{\{}}
3102
\put(45.00,21.60){\makebox(0,0)[cc]{stat}}
3103
\put(45.00,13.60){\makebox(0,0)[cc]{\}}}
3104
\put(45.00,4.80){\makebox(0,0)[cc]{....}}
3105
\put(45.00,44.80){\vector(0,1){5.60}}
3106
\put(45.00,50.40){\vector(0,1){6.40}}
3107
\put(45.00,56.80){\vector(1,0){43.00}}
3108
\put(88.00,56.80){\vector(0,-1){47.20}}
3109
\put(88.00,9.60){\vector(-1,0){37.00}}
3110
\put(91.00,33.60){\makebox(0,0)[cc]{jn}}
3111
\put(41.00,14.40){\vector(-1,0){21.00}}
3112
\put(20.00,14.40){\vector(0,1){32.00}}
3113
\put(20.00,46.40){\vector(1,0){23.00}}
3114
\put(43.00,46.40){\vector(0,-1){2.40}}
3115
\put(45.00,50.40){\vector(1,0){24.00}}
3116
\put(69.00,50.40){\vector(0,-1){20.80}}
3117
\put(69.00,29.60){\vector(-1,0){18.00}}
3118
\put(76.00,40.00){\makebox(0,0)[cc]{jmp1}}
3119
\put(14.00,20.00){\makebox(0,0)[cc]{jmp3}}
3120
\put(41.00,34.40){\vector(-1,0){21.00}}
3121
\put(29.00,30.40){\makebox(0,0)[cc]{jmp2}}
3125
{\setlength{\unitlength}{0.00937500in}%
3127
\begingroup\makeatletter\ifx\SetFigFont\undefined
3128
% extract first six characters in \fmtname
3129
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
3130
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
3131
\ifx\x\y % LaTeX or SliTeX?
3132
\gdef\SetFigFont#1#2#3{%
3133
\ifnum #1<17\tiny\else \ifnum #1<20\small\else
3134
\ifnum #1<24\normalsize\else \ifnum #1<29\large\else
3135
\ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
3136
\huge\fi\fi\fi\fi\fi\fi
3137
\csname #3\endcsname}%
3139
\gdef\SetFigFont#1#2#3{\begingroup
3140
\count@#1\relax \ifnum 25<\count@\count@25\fi
3141
\def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
3143
\csname \romannumeral\the\count@ pt\expandafter\endcsname
3144
\csname @\romannumeral\the\count@ pt\endcsname
3145
\csname #3\endcsname}%
3148
\begin{picture}(137,334)(31,478)
3150
\put( 60,780){\framebox(60,30){}}
3151
\put( 60,720){\framebox(60,30){}}
3152
\put( 60,630){\framebox(60,30){}}
3153
\put( 60,540){\framebox(60,30){}}
3154
\put( 90,780){\line( 0,-1){ 30}}
3155
\put( 90,720){\line( 0,-1){ 9}}
3156
\put( 90,675){\line( 0,-1){ 15}}
3157
\put( 90,606){\line( 0,-1){ 36}}
3158
\put( 90,513){\vector( 0,-1){ 33}}
3159
\put( 72,702){\line(-1, 0){ 30}}
3160
\put( 42,702){\line( 0,-1){198}}
3161
\put( 42,504){\vector( 1, 0){ 48}}
3162
\put(117,681){\line( 1, 0){ 18}}
3163
\put(135,681){\line( 0,-1){ 93}}
3164
\put(135,588){\vector(-1, 0){ 45}}
3165
\put(108,525){\line( 1, 0){ 48}}
3166
\put(156,525){\line( 0, 1){144}}
3167
\put(156,669){\vector(-1, 0){ 66}}
3168
\put( 72,618){\line(-1, 0){ 39}}
3169
\put( 33,618){\line( 0, 1){141}}
3170
\put( 33,759){\vector( 1, 0){ 57}}
3171
\put( 90,792){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
3175
\put( 90,732){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
3179
\put( 90,696){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
3183
\put( 90,678){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
3187
\put( 90,642){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
3191
\put( 90,612){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
3195
\put( 90,552){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
3199
\put( 90,522){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
3203
\put( 60,762){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
3207
\put(156,672){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
3214
\caption[F\/ixation in {\sf for}]{F\/ixation in {\sf for}} \label{obr3}
3220
%\special{em:linewidth 0.4pt}
3221
\linethickness{0.4pt}
3222
\begin{picture}(33.00,85.59)
3223
\put(5.00,71.19){\makebox(0,0)[cc]{if ( expr )}}
3224
\put(5.00,63.19){\makebox(0,0)[cc]{\{}}
3225
\put(5.00,55.19){\makebox(0,0)[cc]{stat1}}
3226
\put(5.00,47.19){\makebox(0,0)[cc]{\}}}
3227
\put(5.00,39.19){\makebox(0,0)[cc]{else}}
3228
\put(5.00,31.19){\makebox(0,0)[cc]{\{}}
3229
\put(5.00,23.20){\makebox(0,0)[cc]{stat2}}
3230
\put(5.00,15.20){\makebox(0,0)[cc]{\}}}
3231
\put(5.00,4.80){\makebox(0,0)[cc]{....}}
3232
\put(5.00,76.79){\vector(0,1){8.80}}
3233
\put(5.00,85.59){\vector(1,0){25.00}}
3234
\put(30.00,85.59){\vector(0,-1){46.40}}
3235
\put(30.00,39.19){\vector(-1,0){19.00}}
3236
\put(33.00,61.59){\makebox(0,0)[cc]{jz}}
3237
\put(11.00,48.00){\vector(1,0){10.00}}
3238
\put(21.00,48.00){\vector(0,-1){37.00}}
3239
\put(21.00,11.00){\vector(-1,0){10.00}}
3240
\put(26.00,26.00){\makebox(0,0)[cc]{jmp}}
3244
%\special{em:linewidth 0.4pt}
3245
\linethickness{0.4pt}
3246
\begin{picture}(50.00,50.00)
3247
\put(25.00,40.00){\framebox(20.00,5.00)[cc]{expr}}
3248
\put(35.00,35.00){\makebox(0,0)[cc]{jz JZ}}
3249
\put(25.00,25.00){\framebox(20.00,5.00)[cc]{stat1}}
3250
\put(35.00,20.00){\makebox(0,0)[cc]{jmp JMP}}
3251
\put(25.00,10.00){\framebox(20.00,5.00)[cc]{stat2}}
3252
\put(35.00,50.00){\vector(0,-1){5.00}}
3253
\put(35.00,40.00){\vector(0,-1){2.00}}
3254
\put(35.00,32.00){\vector(0,-1){2.00}}
3255
\put(35.00,25.00){\vector(0,-1){2.00}}
3256
\put(35.00,17.00){\vector(0,-1){2.00}}
3257
\put(35.00,10.00){\vector(0,-1){5.00}}
3258
\put(42.00,35.00){\vector(1,0){8.00}}
3259
\put(50.00,35.00){\vector(0,-1){18.00}}
3260
\put(50.00,17.00){\vector(-1,0){15.00}}
3261
\put(20.00,20.00){\vector(0,-1){13.00}}
3262
\put(20.00,7.00){\vector(1,0){15.00}}
3263
\put(24.00,20.00){\vector(-1,0){4.00}}
3266
\caption[F\/ixation in {\sf if}]{F\/ixation in {\sf if}} \label{obr4}
3272
%\special{em:linewidth 0.4pt}
3273
\linethickness{0.4pt}
3274
\begin{picture}(29.00,38.40)
3275
\put(5.00,38.40){\makebox(0,0)[cc]{\{}}
3276
\put(5.00,30.40){\makebox(0,0)[cc]{....}}
3277
\put(5.00,22.40){\makebox(0,0)[cc]{continue;}}
3278
\put(5.00,14.40){\makebox(0,0)[cc]{....}}
3279
\put(5.00,6.40){\makebox(0,0)[cc]{\}}}
3280
\put(24.00,23.20){\vector(0,-1){16.00}}
3281
\put(24.00,7.20){\vector(-1,0){13.00}}
3282
\put(29.00,16.00){\makebox(0,0)[cc]{jmp}}
3283
\put(16.00,23.20){\vector(1,0){8.00}}
3286
\caption[F\/ixation of {\sf continue}]{F\/ixation of {\sf continue}} \label{obr5}
3292
%\special{em:linewidth 0.4pt}
3293
\linethickness{0.4pt}
3294
\begin{picture}(31.00,47.20)
3295
\put(5.00,47.20){\makebox(0,0)[cc]{\{}}
3296
\put(5.00,39.20){\makebox(0,0)[cc]{....}}
3297
\put(5.00,31.20){\makebox(0,0)[cc]{break;}}
3298
\put(5.00,23.20){\makebox(0,0)[cc]{....}}
3299
\put(5.00,15.20){\makebox(0,0)[cc]{\}}}
3300
\put(5.00,5.60){\makebox(0,0)[cc]{....}}
3301
\put(11.00,32.00){\vector(1,0){15.00}}
3302
\put(26.00,32.00){\vector(0,-1){20.80}}
3303
\put(26.00,11.20){\vector(-1,0){15.00}}
3304
\put(31.00,21.60){\makebox(0,0)[cc]{jmp}}
3307
\caption[F\/ixation of {\sf break}]{F\/ixation of {\sf break}} \label{obr6}
3313
%\special{em:linewidth 0.4pt}
3314
\linethickness{0.4pt}
3315
\begin{picture}(34.00,47.99)
3316
\put(5.00,47.99){\makebox(0,0)[cc]{\{}}
3317
\put(5.00,39.99){\makebox(0,0)[cc]{....}}
3318
\put(5.00,31.99){\makebox(0,0)[cc]{return ( expr );}}
3319
\put(5.00,23.99){\makebox(0,0)[cc]{....}}
3320
\put(5.00,15.99){\makebox(0,0)[cc]{\}}}
3321
\put(5.00,6.39){\makebox(0,0)[cc]{....}}
3322
\put(29.00,32.79){\vector(0,-1){16.00}}
3323
\put(29.00,16.79){\vector(-1,0){19.00}}
3324
\put(34.00,24.80){\makebox(0,0)[cc]{jmp}}
3325
\put(19.00,32.80){\vector(1,0){10.00}}
3328
\caption[F\/ixation of {\sf return}]{F\/ixation of {\sf return}} \label{obr7}
3333
{\setlength{\unitlength}{0.01250000in}%
3335
\begingroup\makeatletter\ifx\SetFigFont\undefined
3336
% extract first six characters in \fmtname
3337
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
3338
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
3339
\ifx\x\y % LaTeX or SliTeX?
3340
\gdef\SetFigFont#1#2#3{%
3341
\ifnum #1<17\tiny\else \ifnum #1<20\small\else
3342
\ifnum #1<24\normalsize\else \ifnum #1<29\large\else
3343
\ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
3344
\huge\fi\fi\fi\fi\fi\fi
3345
\csname #3\endcsname}%
3347
\gdef\SetFigFont#1#2#3{\begingroup
3348
\count@#1\relax \ifnum 25<\count@\count@25\fi
3349
\def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
3351
\csname \romannumeral\the\count@ pt\expandafter\endcsname
3352
\csname @\romannumeral\the\count@ pt\endcsname
3353
\csname #3\endcsname}%
3356
\begin{picture}(132,147)(60,673)
3357
\put( 60,810){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
3361
\put( 90,795){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
3365
\put( 90,780){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
3367
case const\_expr\_1 : stat\_1 ;}%
3369
\put(192,765){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
3373
\put( 90,750){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
3375
case const\_expr\_2 : stat\_2 ;}%
3377
\put( 90,735){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
3379
case const\_expr\_3 : stat\_3 ;}%
3381
\put(192,720){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
3385
\put( 90,705){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
3387
default : stat\_4 ;}%
3389
\put(135,690){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
3393
\put( 90,675){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
3401
{\setlength{\unitlength}{0.00750000in}%
3403
\begingroup\makeatletter\ifx\SetFigFont\undefined
3404
% extract first six characters in \fmtname
3405
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
3406
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
3407
\ifx\x\y % LaTeX or SliTeX?
3408
\gdef\SetFigFont#1#2#3{%
3409
\ifnum #1<17\tiny\else \ifnum #1<20\small\else
3410
\ifnum #1<24\normalsize\else \ifnum #1<29\large\else
3411
\ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
3412
\huge\fi\fi\fi\fi\fi\fi
3413
\csname #3\endcsname}%
3415
\gdef\SetFigFont#1#2#3{\begingroup
3416
\count@#1\relax \ifnum 25<\count@\count@25\fi
3417
\def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
3419
\csname \romannumeral\the\count@ pt\expandafter\endcsname
3420
\csname @\romannumeral\the\count@ pt\endcsname
3421
\csname #3\endcsname}%
3424
\begin{picture}(103,637)(40,199)
3426
\put( 90,636){\line( 0,-1){ 6}}
3427
\put( 90,630){\line(-1, 0){ 48}}
3428
\put( 42,630){\line( 0,-1){417}}
3429
\put( 42,213){\vector( 1, 0){ 48}}
3430
\put( 90,318){\line( 0,-1){ 12}}
3431
\put( 90,306){\vector(-1, 0){ 48}}
3432
\put( 90,402){\vector( 0,-1){ 12}}
3433
\put( 90,216){\vector( 0,-1){ 15}}
3434
\put( 90,258){\vector( 0,-1){ 12}}
3435
\put(120,735){\line( 1, 0){ 21}}
3436
\put(141,735){\line( 0,-1){111}}
3437
\put(141,624){\line(-1, 0){ 51}}
3438
\put( 90,624){\vector( 0,-1){ 24}}
3439
\put( 60,360){\framebox(60,30){}}
3440
\put( 60,258){\framebox(60,30){}}
3441
\put(120,417){\line( 1, 0){ 18}}
3442
\put(138,417){\line( 0,-1){117}}
3443
\put(138,300){\line(-1, 0){ 48}}
3444
\put( 90,300){\vector( 0,-1){ 12}}
3445
\put( 90,360){\vector( 0,-1){ 12}}
3446
\put( 60,570){\framebox(60,30){}}
3447
\put( 60,528){\framebox(60,30){}}
3448
\put( 60,486){\framebox(60,30){}}
3449
\put( 60,444){\framebox(60,30){}}
3450
\put( 60,402){\framebox(60,30){}}
3451
\put( 90,570){\vector( 0,-1){ 12}}
3452
\put( 90,528){\vector( 0,-1){ 12}}
3453
\put( 90,444){\vector( 0,-1){ 12}}
3454
\put( 60,804){\framebox(60,30){}}
3455
\put( 60,762){\framebox(60,30){}}
3456
\put( 60,720){\framebox(60,30){}}
3457
\put( 60,678){\framebox(60,30){}}
3458
\put( 60,636){\framebox(60,30){}}
3459
\put( 90,804){\vector( 0,-1){ 12}}
3460
\put( 90,762){\vector( 0,-1){ 12}}
3461
\put( 90,720){\vector( 0,-1){ 12}}
3462
\put( 90,678){\vector( 0,-1){ 12}}
3463
\put( 60,216){\framebox(60,30){}}
3464
\put( 60,318){\framebox(60,30){}}
3465
\put(120,543){\line( 1, 0){ 18}}
3466
\put(138,543){\line( 0,-1){ 63}}
3467
\put(138,480){\line(-1, 0){ 48}}
3468
\put( 90,480){\vector( 0,-1){ 6}}
3469
\put( 60,501){\line(-1, 0){ 9}}
3470
\put( 51,501){\line( 0,-1){105}}
3471
\put( 51,396){\vector( 1, 0){ 39}}
3472
\put(132,426){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}%
3476
\put(132,741){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}%
3480
\put(129,552){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}%
3484
\put( 90,813){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}%
3488
\put( 90,732){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}%
3492
\put( 90,648){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}%
3496
\put( 90,690){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}%
3500
\put( 90,540){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}%
3504
\put( 90,498){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}%
3508
\put( 90,414){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}%
3512
\put( 90,369){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}%
3516
\put( 90,267){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}%
3520
\put( 90,228){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}%
3524
\put( 90,330){\makebox(0,0)[b]{\SetFigFont{7}{8.4}{rm}%
3528
\put( 90,774){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
3532
\put( 90,582){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
3536
\put( 90,456){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
3543
\caption[F\/ixation of {\sf switch}]{F\/ixation of {\sf switch}} \label{obr8}
3547
Unconditional program branching is supported by a {\sf goto}
3548
\index{statement!goto@{\sf goto}} statement. The {\sf goto} statement
3549
has the following fixative structure:
3554
struct goto_adr /* List of addresses with goto
3555
statements for the current label. */
3557
char *adr; /* Address of the goto statement. */
3558
int line_number; /* Line number of the goto statement. */
3559
struct goto_adr *gnext;
3563
struct goto_tab /* Hash table structure for goto
3566
char *name; /* Name of the label. */
3567
char *label_adr; /* Address of the label in the
3569
int line_number; /* Line number of the label in the
3571
struct goto_adr *gnext; /* List of goto's to the label. */
3572
struct goto_tab *next;
3581
static struct goto_tab *hastab_goto; /* Pointer to the hash
3588
If labels\index{label} or goto's \index{statement!goto@{\sf goto}} are
3589
encountered during parsing, the addresses of code are put into the
3590
fixative structure. After successful compilation, addresses of goto's
3591
are fixed to the corresponding labels. Then the code is executed.
3593
The {\sf goto} \index{statement!goto@{\sf goto}} statement can appear
3594
only in the level one (all statements that are compiled) statements.
3595
The {\sf goto} cannot jump to a label across functions.
3598
\section{Parameter passing mechanism} \index{parameter!passing}
3599
\label{parameter_passing}
3601
Parameters are passed by reference \cite{gries}. The parameters are
3602
over the pointer BP ($BP+offset$), i.e. toward greater addresses.
3603
Local variables are below the BP ($BP-offset$), i.e. toward lesser
3604
addresses. The parameters are pushed onto the stack in the reverse
3605
order as they appear in the function call. The first parameter has
3606
{\sf offset} less than the last parameter (the first parameter is
3607
closer to the BP). The last parameter is the deepest parameter on the
3610
Addresses of the parameters\index{parameter!address} are stored in the
3611
stack\index{stack}. During compilation of the list of formal
3612
parameters\index{parameter!formal} it is leaving out the place for
3613
them in the stack. It causes different accesses to the parameters and
3614
the local variables\index{variable!local}, because local variables are
3615
stored by value (only one indirection, parameters need two
3616
indirections). Different virtual machine
3617
instructions\index{virtual machine} must be generated for parameters
3618
and local variables.
3620
%The addresses of the parameters are temporary stored in address
3621
%stack. It is necessary if we should use the recursive function call.
3624
%\subsection{Address stack}
3625
%Address stack is used only for temporary storage of the
3626
%addresses of the parameters of the function. The number of
3627
%the parameters is restricted by a size of the address
3628
%stack. The size of the address stack is 255 addresses. See
3629
%structure of the address stack in cooperation with the
3630
%stack in fig. \ref{obr1}.
3632
\section{Stack}\index{stack} \label{stack}
3634
The stack is used for storing of the addresses of
3635
parameters\index{parameter!address} and for the local
3636
variables\index{variable!local} as it was mentioned in
3637
section~\ref{parameter_passing}. The location of parameters and local
3638
variables is depending on the level in which the function is called.
3639
The parameters and the local variables are destroyed after a
3640
return\index{function!return} from the procedure.
3645
%\caption[The structure of the stack. Cooperation between
3646
%the stack and the address stack in the recursive function
3647
%call]{The structure of the stack. Cooperation between the
3648
%stack and the address stack in the recursive function call}
3656
\section{Compiled statement}
3658
The statements mentioned on the level 1 (\cl list\_stat \r (see
3659
appendix \ref{syntax})) are compiled. Procedures are also compiled.
3660
The procedures must be processed when they are called. The procedures
3661
usually consist of prologue, epilogue and body. The following
3662
instructions are in the prologue:
3672
It is namely: {\bf PUSH} $[STACK] \longleftarrow BP$, {\bf PUSH}
3673
$[STACK] \longleftarrow TMPH$, {\bf MOV} $TMPH \longleftarrow TMP$,
3674
{\bf MOV} $STACK \longrightarrow BP$ and {\bf SUB}
3675
$STACK\longleftarrow(STACK - count)$
3676
(see~\ref{stroj})\index{instruction!PUSH@{\bf PUSH}}\index{instruction!SUB@{\bf SUB}}\index{instruction!MOV@{\bf MOV}}. The epilogue of the procedure is generated:
3685
These instructions are: {\bf MOV} $STACK \longleftarrow BP$, {\bf POP}
3686
$TMPH \longleftarrow [STACK]$, {\bf POP} $BP \longleftarrow
3687
[STACK]$\index{instruction!MOV@{\bf MOV}}\index{instruction!POP@{\bf
3688
POP}}\index{instruction!RET@{\bf RET}} and {\bf RET} return to the
3689
caller (i.e. the instruction {\bf
3690
CALL}\index{instruction!CALL@{\bf CALL}}).
3692
The procedure call is also compiled. The reason is that the
3693
list\index{list} of the parameters can contain
3694
expressions\index{expression}.
3696
\chapter{Different level of user interfaces to the
3697
interpreter \CiF}\index{interface}
3699
\section{Intrinsic functions}\index{function!intrinsic}
3701
Intrinsic functions are linked to the compiler. The user should update
3702
two tables and write an intrinsic function in C or FORTRAN then to
3703
link the object code of the compiler with the tables and with the code
3704
of the intrinsic function. This way is enriched the compiler with a
3705
new intrinsic function. The structures of the tables are as follows:
3713
* List of intrinsic functions.
3716
#ifndef _INTRINSIC_H
3717
#define _INTRINSIC_H
3720
#include "myintrinsic.c"
3723
#include "example/apl.c"
3726
typedef void (*INTRINSIC_FUNCTION) PROTO((char **));
3731
INTRINSIC_FUNCTION adr;
3733
{{"cclose", (INTRINSIC_FUNCTION)cclose},
3734
{"cgetc", (INTRINSIC_FUNCTION)cgetc},
3735
{"chclose", (INTRINSIC_FUNCTION)chclose},
3736
{"chflush", (INTRINSIC_FUNCTION)chflush},
3737
{"chopen", (INTRINSIC_FUNCTION)chopen},
3738
{"chwrite", (INTRINSIC_FUNCTION)chwrite},
3739
{"copen", (INTRINSIC_FUNCTION)copen},
3740
{"cputc", (INTRINSIC_FUNCTION)cputc},
3741
{"exp", (INTRINSIC_FUNCTION)exp_},
3742
{"fflush", (INTRINSIC_FUNCTION)cfflush},
3743
{"fprintf", (INTRINSIC_FUNCTION)cfprintf},
3744
{"fscanf", (INTRINSIC_FUNCTION)cfscanf},
3745
{"printf", (INTRINSIC_FUNCTION)cprintf},
3746
{"scanf", (INTRINSIC_FUNCTION)cscanf},
3747
{"sin", (INTRINSIC_FUNCTION)sin_}
3750
{"green_func", (INTRINSIC_FUNCTION)green_func},
3751
{"csigpause", (INTRINSIC_FUNCTION)csigpause},
3752
{"open_termo", (INTRINSIC_FUNCTION)open_termo},
3753
{"read_termo", (INTRINSIC_FUNCTION)read_termo},
3754
{"write_termo", (INTRINSIC_FUNCTION)write_termo},
3755
{"close_termo", (INTRINSIC_FUNCTION)close_termo},
3756
{"init_wait", (INTRINSIC_FUNCTION)init_wait}
3763
* Number of intrinsic functions.
3765
#define SIZE_REM sizeof(intr_name)/sizeof(intr_name[0])
3770
* Size of an array of intrinsic functions.
3772
void (*(f[SIZE_REM])) PROTO((char **));
3778
The names of the intrinsic functions\index{function!intrinsic} are
3779
stored in hash table\index{table!hashing}\index{hash!table} (mentioned
3780
earlier). The compiler knows about the names of the intrinsic
3781
function\index{function!intrinsic} from its initializing part. When
3782
the {\sf remote}\index{statement!remote@{\sf remote}} keyword is
3783
parsed, remote functions are loaded into the hash
3784
table\index{table!hashing}\index{hash!table} of remote functions.
3785
Only remote functions previously declared are known to the
3786
environment. If there are any declaration after {\sf remote} statement
3787
the names are known but have no corresponding code. The example of the
3788
{\sf remote} statement usage can be found in the
3789
`io.ci'\index{file!io.ci}.
3791
The body of remote function or declaration of the header respectively
3792
must be in the file `myintrinsic.c'.\index{file!myintrinsic.c}
3793
Continuing in the above example the file `myintrinsic.c' should look
3797
double plus(double *a,double *b)
3799
printf("a=%g\n",*a);
3800
printf("b=%g\n",*b);
3809
double sin_(a)char **a;{return(sin(*(double *) a[0]));}
3815
For the proper function of the compiler user should keep
3816
the following steps\index{function!intrinsic}:
3820
\item Update the variable {\sf intr\_name}. The first field is a name
3821
of the intrinsic function; the second field is the name of the user
3823
\item Write the code of a new intrinsic function in the file
3825
\item Compile remote call subsystem. Link new version of
3830
\section{Main areas of allocated memory}\index{memory}\label{memory}
3832
The allocated memory of the interpreter is split to two parts. The
3833
first part is static. The user can not change the size of these memory
3834
areas at run-time, only by recompiling the interpreter. The size is as
3840
#define PAGE 512 /* Size of a page. */
3841
#define SIZE_HAS 1999 /* Size of hash table. */
3842
#define SIZE_HAS_LOC 401 /* Size of hash table for locals. */
3843
#define SIZE_HAS_GOTO 257 /* Size of hash table for goto
3845
#define MAX_IDENT 1999 /* Max number of variables */
3846
#define MAX_IDENT_LOC 401 /* Max number of local variables. */
3847
#define SIZE_ADR_STACK 256 /* Size of address stack (obsolete). */
3848
#define SIZE_STRUCT_FIX 256 /* Size of the stack of fixative structures. */
3849
#define SIZE_REMOTE 1999 /* Size of hash table for remote function
3855
\index{macro!PAGE@{\bf PAGE}} \index{PAGE@{\bf PAGE}}
3856
\index{macro!SIZE\_HAS@{\bf SIZE\_HAS}} \index{SIZE\_HAS@{\bf SIZE\_HAS}}
3857
\index{macro!SIZE\_HAS\_LOC@{\bf SIZE\_HAS\_LOC}}
3858
\index{SIZE\_HAS\_LOC@{\bf SIZE\_HAS\_LOC}}
3859
\index{macro!SIZE\_HAS\_GOTO@{\bf SIZE\_HAS\_GOTO}}
3860
\index{SIZE\_HAS\_GOTO@{\bf SIZE\_HAS\_GOTO}}
3861
\index{macro!MAX\_IDENT@{\bf MAX\_IDENT}}
3862
\index{MAX\_IDENT@{\bf MAX\_IDENT}}
3863
\index{macro!MAX\_IDENT\_LOC@{\bf MAX\_IDENT\_LOC}}
3864
\index{MAX\_IDENT\_LOC@{\bf MAX\_IDENT\_LOC}}
3865
\index{macro!SIZE\_ADR\_STACK@{\bf SIZE\_ADR\_STACK}}
3866
\index{SIZE\_ADR\_STACK@{\bf SIZE\_ADR\_STACK}}
3867
\index{macro!SIZE\_STRUCT\_FIX@{\bf SIZE\_STRUCT\_FIX}}
3868
\index{SIZE\_STRUCT\_FIX@{\bf SIZE\_STRUCT\_FIX}}
3869
\index{macro!SIZE\_REMOTE@{\bf SIZE\_REMOTE}}
3870
\index{SIZE\_REMOTE@{\bf SIZE\_REMOTE}}
3872
Macros {\bf SIZE\_HAS, SIZE\_HAS\_LOC, SIZE\_HAS\_GOTO, MAX\_IDENT,
3873
MAX\_IDENT\_LOC, SIZE\_REMOTE} are primes according to~\cite{wirth}.
3874
If you want to change these macros you should change them to primes
3875
again for better performance of hash functions\index{hash!function}.
3882
#define SIZE_SPACE 210 /* Memory size in pages. */
3883
#define SIZE_ARIT_STACK 7 /* Size of the arithmetical stack in pages. */
3884
#define SIZE_TMP_STACK 52 /* Size of stack of temporaries in pages. */
3889
\index{macro!SIZE\_SPACE@{\bf SIZE\_SPACE}}
3890
\index{SIZE\_SPACE@{\bf SIZE\_SPACE}}
3891
\index{macro!SIZE\_ARIT\_STACK@{\bf SIZE\_ARIT\_STACK}}
3892
\index{SIZE\_ARIT\_STACK@{\bf SIZE\_ARIT\_STACK}}
3893
\index{macro!SIZE\_TMP\_STACK@{\bf SIZE\_TMP\_STACK}}
3894
\index{SIZE\_TMP\_STACK@{\bf SIZE\_TMP\_STACK}}
3896
Each size is specified by number of pages (PAGE 512 B). The user can
3897
change these sizes. The easiest way is to run the interpreter with the
3898
parameter\index{parameter!run-string} {\sf /bc=$<$number$>$}. E.g.
3904
Starting the interpreter with argument 5 caused that the size of the
3905
memory, size of the arithmetical stack and size of the temporary stack
3906
are lowered to half compared to the default set (default is constant
3907
equal 10). The user can extend the size of the three memory parts if
3908
the interpreter is ran with the argument greater than 10.
3910
\section{Hash tables and hash
3911
function}\index{table!hashing}\index{hash!table}
3913
The most important is that the size of the hash table must
3914
be a prime. We chose the primes 1999 for the size of the
3915
global hash table and 401 for the size of the local hash
3918
We chose the following hash
3919
function:\index{function!hashing}\index{hash!table}
3948
The core of the hash
3949
function\index{hash!function}\index{function!hashing} is one bit
3950
shifting and then the result is XOR-ed with the ASCII value of the
3951
character. The problems may arise when the variable's identifier is
3952
longer than the size of the integer\index{integer!size of} on the
3955
\section{Adding new data type}
3956
The user has to follow these steps:\\
3958
\item Update the file `cast.h'\index{file!cast.h} with cast operators
3959
for the new data type.
3960
\item Update the file `geninstr.h'\index{file!geninstr.h} with
3961
appropriate instructions for the virtual machine. User can be
3962
inspired by previous types.
3963
\item Update the file `type.h'\index{file!type.h}. To define the
3964
constant of new data type.
3965
\item Enrich the file `instr.h'\index{file!instr.h} with a new
3966
structure for a new instruction of the virtual processor if it is
3968
\item Update the scanner in file `ls.l'\index{file!ls.l} with the
3969
pattern matching of the new data type constant.
3970
\item Enrich the list in file
3971
`keyword.gperf'\index{file!keyword.gperf} with needed tokens name.
3972
\item Update the grammar of the language in file
3973
`ys.y'\index{file!ys.y}. An user should be searching for previously
3974
defined data type (i.e. INT) and he/she has to take inspiration
3975
from the surrounding structures. Namely the following functions
3976
should be rearranged:\\
3978
\item The function `exe'\index{function!exe@{\sf exe}} \index{exe@{\sf exe}}
3979
(`virtual\_machine.c'\index{file!virtual\_machine.c}). Instructions
3980
of the virtual machine are executed in the function.
3981
\item The function `init'\index{function!init@{\sf init}}
3982
\index{init@{\sf init}} (`comp\_maint.c'\index{file!comp\_maint.c}).
3983
Update the array `pri'\index{array!pri@{\sf pri}} with the new data
3985
\item The function `implicit\_cast'
3986
\index{function!implicit\_cast@{\sf implicit\_cast}}
3987
\index{implicit\_cast@{\sf implicit\_cast}}
3988
(comp\_maint.c\index{file!comp\_maint.c}) contents all possible
3989
options of implicit cast instructions.
3990
\item The function `l\_value\_cast'
3991
\index{function!l\_value\_cast@{\sf l\_value\_cast}}
3992
\index{l\_value\_cast@{\sf l\_value\_cast}}
3993
(comp\_maint.c\index{file!comp\_maint.c}) is casting to the \cl
3998
\chapter{Interrupt services}\label{int_service}
4000
As it was mentioned earlier two types of
4001
interrupts\index{interrupt!synchronous and asynchronous} are
4002
implemented synchronous and asynchronous
4003
(see~\ref{compiling_options}). Each of them call a specific service
4004
function. The interpreter is interrupted only if the virtual machine
4005
is running. Interrupt handling functions are system dependent.
4006
Therefore these functions should be specific for each platform.
4007
Current ports are on CD 4680 (file
4008
`inter\_handl\_svr3.c'\index{file!inter\_handl\_svr3.c}), DEC 5000/240
4009
(file `inter\_handl\_bsd.c'\index{file!inter\_handl\_bsd.c}). There is
4010
a port for Linux (using BSD-like signals), SVR4 port (file
4011
`inter\_handl\_svr4.c'\index{file!inter\_handl\_svr4.c}) and generic
4013
`inter\_handl\_posix.c'\index{file!inter\_handl\_posix.c})\cite{steve}.
4014
The configuration of ours CD 4680 is rather confusing, that is why we
4015
need specific interrupt handler for it. To further complicate things,
4016
the new terminal setting is added to these files as well. Because each
4017
platform to which we ported \CiF\ has a specific terminal handling,
4018
this part is specially designed for them as well. Most of currently
4019
ported platforms can use the generic POSIX implementation as well.
4020
However, it arises two problems:
4022
\item For the file `inter\_handl\_svr3.c', it cannot be compiled
4023
afterwards, because it knows the functions but only in SVR4 mode and
4024
the default is SVR3 (CD4680). If we switch to the default SVR4 some
4025
other functions are not known.
4026
\item Some of platforms need to push newline into the input stream and
4027
some do not. We use interrupt ({\sf DC4}) to break the run of the
4028
virtual machine\index{virtual machine} as well as to resume the run
4029
if it is pressed again. After pressing {\sf DC 4} for the second
4030
time, the {\sf resume}
4031
statement\index{statement!resume@{\sf resume}} is internally
4034
In interrupt handler, on some platforms, there must not be a newline
4035
character (or is generated automatically by the terminal line
4036
discipline), on others, it must be pushed by interrupt handler
4037
function. See sections~\ref{sync_interrupt},~\ref{async_interrupt}.
4040
Generally, user may use `inter\_handl\_posix.c' whenever
4041
appropriate. If the interrupt does not function, the user should
4042
consider to add the following line to the {\sf
4043
interrupt\_service}\index{function!interrupt\_service@{\sf interrupt\_service}}
4044
\index{interrupt\_service@{\sf interrupt\_service}} just after
4045
assignment to {\sf handler}\index{handler@{\sf handler}}
4046
\index{variable!handler@{\sf handler}} variable
4049
ioctl (handle_fd, TIOCSTI, "\n");
4052
The following function registers interrupt
4053
handler\index{interrupt!handler}:
4063
#define OFF(x, y) (x) & (~(y))
4064
#define ON(x, y) (x) | (y)
4070
struct termio term,term_initial;
4072
RETSIGTYPE (*interrupt_handler) (void);
4073
RETSIGTYPE interrupt_service PROTO((void));
4074
void interrupt_register PROTO((void));
4075
void term_restore PROTO((void));
4077
RETSIGTYPE fatal_handler PROTO((void));
4078
void fatal_handler_register PROTO((void));
4079
extern jmp_buf jmpbuf;
4080
extern int error_count;
4083
* Registers interrupt handler.
4086
interrupt_register ()
4088
interrupt_handler = interrupt_service;
4089
handle_fd = fileno (stdin);
4090
ioctl (handle_fd, TCGETA, &term);
4091
term_initial = term;
4092
term.c_cc[0] = 0x14; /* DC4 */
4093
term.c_cc[5] = 0x12; /* DC2 */
4094
term.c_lflag = OFF(term.c_lflag, LNEW_CTLECH); /* dalsi flag ktory ma pre nas vyznam je : term.c_lflag=ON(term.c_lflag,NOFLSH);*/
4095
ioctl (handle_fd, TCSETA, &term);
4096
sigset (SIGINT, interrupt_handler);
4103
on the CD 4680. Via {\sf ioctl}\index{ioctl@{\sf ioctl}} system call
4104
is reset interrupt signal\index{interrupt!signal} to {\sf
4105
DC4}\index{DC4@{\sf DC4}}. Via {\sf sigset}\index{sigset@{\sf sigset}}
4106
system call is set the interrupt handler. On the DEC 5000/240 looks
4107
the function as follows:
4113
* Registers interrupt handler.
4116
interrupt_register ()
4118
interrupt_handler = interrupt_service;
4119
handle_fd = fileno (stdin);
4120
ioctl (handle_fd, TCGETA, &term);
4121
term_initial = term;
4122
term.c_cc[0] = 0x14; /* DC4 */
4123
term.c_cc[5] = 0x12; /* DC2 */
4124
ioctl (handle_fd, TCSETA, &term);
4125
vec.sv_handler = interrupt_handler;
4126
sigvec (SIGINT, &vec, &ovec);
4133
The interrupt handler is set here through the system call
4134
{\sf sigvec}\index{sigvec@{\sf sigvec}}.
4136
When the interpreter session terminates, the terminal is
4137
reset to the initial values:
4143
* Restores setting of the terminal at the termination of Clif session.
4148
ioctl (handle_fd, TCSETA, &term_initial);
4155
\section{Synchronous interrupt service
4156
function}\index{function!synchronous interrupt service}\label{sync_interrupt}
4158
The function is as follows:
4164
* Synchronous interrupt service.
4167
interrupt_service_sync ()
4176
The virtual machine instruction\index{instruction!INTER@{\bf INTER}}
4177
{\bf INTER} is calling the function {\sf interrupt\_service\_sync} in
4178
which the handler is set to 1. Before the next instruction is
4179
executed, the handler is checked. If it is set the virtual machine
4180
switches its context\index{context!switching}. The context of the
4181
virtual machine is stored in the following
4182
structure:\index{structure!context}
4203
int (*input) PROTO((void));
4205
struct CONTEXT *previous;
4212
There are no restriction on the use of the statements. The statement
4213
{\sf resume}\index{statement!resume@{\sf resume}} resumes after an
4216
\section{Asynchronous interrupt service
4217
function}\index{function!asynchronous interrupt service}\label{async_interrupt}
4219
Not only synchronous interrupt is provided by the interpreter, but
4220
also asynchronous interrupt. Only the virtual machine\index{virtual machine}
4221
can be interrupted. The user interrupts the virtual
4222
machine\index{virtual machine} by pressing the {\sf
4223
DC4}\index{DC4@{\sf DC4}} key. As it is mentioned above there are no
4224
restrictions on the use of the statements. The user can interrupt more
4225
than once. The interpreter interrupt level can rise. To return to
4226
resume initially interrupted program, the user should specify equal
4227
number of the {\sf resume}
4228
statements\index{statement!resume@{\sf resume}} to the interrupts. If
4229
the interrupt level is again zero initially interrupted program
4232
The context\index{context} of the virtual machine\index{virtual
4233
machine} is stored in the same structure as for the synchronous
4234
interrupt. The asynchronous interrupt service function is the
4235
following:\index{interrupt!accepted}
4241
* Asynchronous interrupt handler.
4244
interrupt_service ()
4247
printfx ("interrupt\n");
4249
if ((clif_interrupt_level > 0) || (!virtual_machine_suspended))
4252
* Test of the virtual machine running and the level of interrupt.
4253
* Interrupt is only accepted if the virtual machine is running.
4258
printfx ("virtual machine is running, interrupt accepted\n");
4269
The function is valid for CDC. The asynchronous interrupt
4270
service function for DEC is as follows:
4276
* Asynchronous interrupt service.
4279
interrupt_service ()
4282
printfx ("interrupt\n");
4284
if ((clif_interrupt_level > 0) || (!virtual_machine_suspended))
4287
* Test of the virtual machine running and the level of interrupt.
4288
* An interrupt is only accepted if the virtual machine is running.
4293
printfx ("virtual machine is running, interrupt accepted\n");
4297
ioctl (handle_fd, TIOCSTI, "\n");
4306
Switching of the virtual machine\index{virtual machine} to a new
4307
context\index{context!switching} is connected with switching of the
4308
interpreter input\index{interpreter!input}. The different function for
4309
each platform exists because of features of the stream on those
4310
platforms. The CDC stream contents interrupt character as well as
4311
newline character. The DEC stream only contents interrupt
4312
character. Therefore we must put into the DEC stream any character
4313
before the interpreter input is switched.
4315
The interpreter input is switched to the standard input.
4316
Returning from the interrupt the interpreter input is
4317
switched to the initially set input.
4319
\section{Interpreter input functions}\index{function!input}
4321
There are three interpreter input functions. The first function is
4322
initialized at the beginning of the interpreter session. Depending on
4323
the number of parameters of the run-string the interpreter input is
4324
either in run-string specified program or the standard input (function
4325
used in this case is
4326
{\sf input\_komp}\index{function!input\_komp@{\sf input\_komp}}). When
4327
the virtual machine process the instruction of synchronous
4328
interrupt\index{interrupt!synchronous} or if the asynchronous
4329
interrupt happened the input is switched to the standard input
4331
{\sf input\_std}\index{function!input\_std@{\sf input\_std}}). If the
4332
virtual machine\index{virtual machine} is interrupted by the user the
4333
input is switched to the input from the buffer (function {\sf
4334
input\_buf}\index{function!input\_buf@{\sf input\_buf}}). The input
4335
from the buffer is the same as it is by synchronous interrupt. After
4336
processing it the input is switched\index{input!switching} to the
4337
standard input\index{input!standard}. The mentioned input
4338
functions\index{function!input} follow:
4346
* Initialization of the main compiler
4347
* and redefinition of its input functions.
4348
* Different input function are used during
4349
* synchronous and asynchronous interrupt
4359
extern FILEATTR pf, spf[];
4360
#ifndef FLEX_SCANNER
4361
extern int yylineno;
4363
extern char *yysptr, yysbuf[];
4365
extern int getcx PROTO((FILE *));
4366
static int buf_pointer = 0;
4373
int (*input) PROTO((void));
4375
char string_resume[]="resume;"; /* Buffer for input by return
4376
* from asynchronous interrupt.
4378
extern int no_compile_only; /* Flag in the case of errors or */
4380
extern int handle_main; /* If set, compiler like behavior. */
4381
extern int source_line_number;
4382
/* Source line number. Detecting if */
4383
/* the current line was already */
4384
/* printed. Using in error messages. */
4385
extern void exit_file_scope PROTO((void));
4387
#ifndef FLEX_SCANNER
4389
* Redefinition of the input for the main compiler.
4395
printfx("in front of getc in input\n");
4397
yytchar=yysptr>yysbuf?U(*--yysptr):getcx(pf.fp);
4399
printfx("behind of getc in input, read character %c - %x\n",
4402
if(yytchar == '\n') /* LF */
4405
spf[s].line_counter++;
4409
if(yytchar == EOF) /* Is current char EOF? */
4413
spf[s].line_counter = 1; /* Counting lines from beginning. */
4414
source_line_number = 0; /* Resetting line number in the */
4415
/* presence of errors. */
4419
if (! s && ! no_compile_only)
4422
/* If we want compiler-like behavior, don't switch to
4424
if (! s && handle_main)
4427
pf = spf[s]; /* Move to the next opened file. */
4430
printfx ("in front of the second getc in input\n");
4432
yytchar = yysptr>yysbuf?U(*--yysptr):getcx(pf.fp); /* The first char */
4434
printfx ("behind of the second getc in input, read character %c - %x\n",
4442
* Redefinition of the input for the main compiler.
4443
* It is used during an interrupt.
4449
printfx ("in front of the third getc in input\n");
4451
yytchar = yysptr>yysbuf?U(*--yysptr):getcx(stdin);
4453
printfx ("behind of the third getc in input, read character %c - %x\n",
4456
if (yytchar == '\n') /* LF */
4459
spf[s].line_counter++;
4464
#ifndef NOT_MSWIN_AND_YES_DOS
4470
return (input_buf());
4477
* Redefinition of the input for the main compiler.
4478
* It is used by return from an interrupt.
4483
yytchar = yysptr>yysbuf?U(*--yysptr):string_resume[buf_pointer++];
4484
if (yytchar == '\n') /* LF */
4487
spf[s].line_counter++;
4503
spf[s--].line_counter = 1;
4504
source_line_number = 0;
4507
/* Do not switch to stdin, if the user wants compiler-like
4509
if (! s && handle_main)
4512
return (! s && ! no_compile_only);
4515
#endif /* FLEX_SCANNER */
4518
* Initialization of the main compiler input.
4521
init_input (argc1, argv1)
4527
#ifndef FLEX_SCANNER
4532
spf[0].name = "stdin";
4533
spf[0].line_counter = 1;
4534
for (b = 1; b < argc1; b++)
4536
/* File opening and storing their pointer. */
4539
spf[argc1 - b].fp = fopen(argv1[b],"r");
4540
spf[argc1 - b].name = argv1[b];
4541
spf[argc1 - b].line_counter = 1;
4542
if (spf[argc1-b].fp == NULL)
4545
error_message (7001);
4550
* Takes the first file pointer from the stack.
4564
%Unfortunately, the input functions can be overridden only in ancient
4565
%versions of Lex generator (see~\cite{lesk}). The \CiF\ is not
4566
%compilable using {\sf flex}\index{flex@{\sf flex}}.
4568
\chapter{Graphic interface}
4570
As was mentioned earlier there are the four intrinsic
4571
functions\index{function!intrinsic} for programming graphics output
4572
channels. There are the following: {\sf
4573
chopen()}\index{function!chopen@{\sf chopen()}}, {\sf
4574
chwrite()}\index{function!chwrite@{\sf chwrite()}}, {\sf
4575
chflush()}\index{function!chflush@{\sf chflush()}} and {\sf
4576
chclose()}\index{function!chclose@{\sf chclose()}}. In addition,
4577
these functions are used as a graphical interface from user point of
4578
view. These functions are calling graphic primitives functions. The
4579
graphics primitives functions are the following: {\sf
4580
window()}\index{function!window@{\sf window()}}, {\sf
4581
move()}\index{function!move@{\sf move()}}, {\sf
4582
draw()}\index{function!draw@{\sf draw()}} and {\sf
4583
draw\_point()}\index{function!draw\_point@{\sf draw\_point()}}.
4585
\section{Graphic primitives}
4587
\subsection{Function {\sf window()}}
4589
The function is used in creating the window that matches
4590
the scope of displayed variable as well as the size of the
4591
window in pixels. The function follows:
4597
* Creates a window from user's coordinates.
4598
* Counts world coordinates.
4599
* handle - is handle of the window
4600
* n - specifies line in the window (user can have more lines in the window)
4601
* rest are coordinates
4604
window (handle, n, x_left, y_down, x_right, y_up)
4606
double x_left, y_down, x_right, y_up;
4608
channel[handle].member[n].ax =
4609
(channel[handle].w_resolution[0] - 1) / (fabs(x_left - x_right));
4610
channel[handle].member[n].ay =
4611
(channel[handle].w_resolution[1] - 1) / (fabs(y_down - y_up));
4618
The {\sf handle} is the handle\index{handle} of the channel, the {\sf
4619
n} specifies the displayed variable, the {\sf x\_left}, {\sf y\_down},
4620
{\sf x\_right} and {\sf y\_up} specify scope of the n-th displayed
4623
\subsection{Function {\sf move()}}
4625
The function is used for moving cursor\index{cursor} to the specified
4626
position. It looks like follow:
4632
* Moves cursor to the specified position.
4633
* handle - is handle of the window
4634
* n - specifies line in the window (user can have more lines in the window)
4635
* x, y - coordinates
4638
move (handle, n, x, y)
4642
d_move((int)floor ((x - channel[handle].start_time)
4643
* channel[handle].member[n].ax),
4644
channel[handle].w_resolution[1] - 1
4645
- (int)floor ((y - channel[handle].member[n].lower)
4646
* channel[handle].member[n].ay));
4653
where {\sf handle} is the handle\index{handle} of the channel, {\sf n}
4654
specifies the displayed variable, {\sf x} and {\sf y} specify the
4655
position in the window to which cursor\index{cursor} is moved.
4657
\subsection{Function {\sf draw()}}
4659
The function {\sf draw()} is the following:
4665
* Draws a line from the cursor position to the point of coordinates.
4666
* handle - is handle of the window
4667
* n - specifies line in the window (user can have more lines in the window)
4668
* x, y - coordinates
4671
draw (handle, n, x, y)
4676
(int)floor ((x - channel[handle].start_time)
4677
* channel[handle].member[n].ax),
4678
channel[handle].w_resolution[1] - 1
4679
- (int)floor ((y - channel[handle].member[n].lower)
4680
* channel[handle].member[n].ay));
4687
\subsection{Function {\sf draw\_point()}}
4693
* Draws a point from the coordinates.
4694
* handle - is handle of the window
4695
* n - specifies line in the window (user can have more lines in the window)
4696
* x, y - coordinates
4699
draw_point (handle, n, x, y)
4704
(int)floor ((x - channel[handle].start_time)
4705
* channel[handle].member[n].ax),
4706
channel[handle].w_resolution[1] - 1
4707
- (int)floor ((y - channel[handle].member[n].lower)
4708
* channel[handle].member[n].ay));
4715
\chapter{Internal representation of types}
4717
\section{Representation of a type}
4719
The proper internal representation structure has to uniquely answer
4720
the following questions:
4723
\item array, simple variable, function with or without exporting
4726
\item function type (distance):
4742
\item arithmetic class:
4754
\item if it is an array - list of dimensions
4756
\item if it is a function:
4760
\item list of parameter type specifiers (optional)
4762
\item list of formal parameters (optional)
4766
\item if it is a function - it is a definition or declaration (body
4771
\item if it is a function definition, it was already formally called
4772
(formal call backpatching)
4776
We would like to have an internal structure that is much wider then
4777
the actual type possibilities in C. But the semantic actions are only
4778
defined for the subset of C-like type definitions and declarations.
4779
Therefore we chose the following structure:\label{internal_type}
4783
/* Internal type structure. */
4784
struct internal_type
4786
struct internal_type *input;
4787
struct internal_type *arity;
4790
struct attr attribute;
4791
struct internal_type *output;
4796
\index{type!internal}
4797
\index{variable!internal\_type}
4799
Representation of the type declaration:
4802
int a(int b, int c(.....), ....);
4805
is in the figure~\ref{internal11}. The structure member {\sf attribute}
4806
is a substructure. The structure member {\sf output} is
4807
pointer to the structure {\sf internal\_type}.
4811
{\setlength{\unitlength}{0.01250000in}%
4813
\begingroup\makeatletter\ifx\SetFigFont\undefined
4814
% extract first six characters in \fmtname
4815
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
4816
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
4817
\ifx\x\y % LaTeX or SliTeX?
4818
\gdef\SetFigFont#1#2#3{%
4819
\ifnum #1<17\tiny\else \ifnum #1<20\small\else
4820
\ifnum #1<24\normalsize\else \ifnum #1<29\large\else
4821
\ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
4822
\huge\fi\fi\fi\fi\fi\fi
4823
\csname #3\endcsname}%
4825
\gdef\SetFigFont#1#2#3{\begingroup
4826
\count@#1\relax \ifnum 25<\count@\count@25\fi
4827
\def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
4829
\csname \romannumeral\the\count@ pt\expandafter\endcsname
4830
\csname @\romannumeral\the\count@ pt\endcsname
4831
\csname #3\endcsname}%
4834
\begin{picture}(514,449)(28,388)
4836
\put(464,580){\vector( 3, 4){ 24.360}}
4837
\put( 56,619){\vector( 0,-1){ 25}}
4838
\put( 81,810){\vector( 3, 1){ 26.400}}
4839
\put(107,797){\line( 1, 0){ 51}}
4840
\put(107,772){\line( 1, 0){ 51}}
4841
\put(107,645){\line( 1, 0){ 51}}
4842
\put(120,772){\line( 0,-1){127}}
4843
\put(120,746){\line( 1, 0){ 38}}
4844
\put(120,721){\line( 1, 0){ 38}}
4845
\put(120,696){\line( 1, 0){ 38}}
4846
\put(120,670){\line( 1, 0){ 38}}
4847
\put(158,784){\vector( 3, 4){ 23.400}}
4848
\put(234,784){\vector( 3, 4){ 23.760}}
4849
\put(311,784){\vector( 3, 4){ 23.400}}
4850
\put(209,823){\line( 0, 1){ 12}}
4851
\put(209,835){\line( 1, 0){229}}
4852
\put(438,835){\vector( 0,-1){216}}
4853
\put(107,619){\framebox(51,204){}}
4854
\put(183,797){\line( 1, 0){ 51}}
4855
\put(183,772){\line( 1, 0){ 51}}
4856
\put(183,645){\line( 1, 0){ 51}}
4857
\put(183,619){\framebox(51,204){}}
4858
\put(196,772){\line( 0,-1){127}}
4859
\put(196,746){\line( 1, 0){ 38}}
4860
\put(196,721){\line( 1, 0){ 38}}
4861
\put(196,696){\line( 1, 0){ 38}}
4862
\put(196,670){\line( 1, 0){ 38}}
4863
\put(209,619){\vector( 0,-1){ 25}}
4864
\put(260,797){\line( 1, 0){ 51}}
4865
\put(260,772){\line( 1, 0){ 51}}
4866
\put(260,645){\line( 1, 0){ 51}}
4867
\put(260,619){\framebox(51,204){}}
4868
\put(273,772){\line( 0,-1){127}}
4869
\put(273,746){\line( 1, 0){ 38}}
4870
\put(273,721){\line( 1, 0){ 38}}
4871
\put(273,696){\line( 1, 0){ 38}}
4872
\put(273,670){\line( 1, 0){ 38}}
4873
\put(336,797){\line( 1, 0){ 51}}
4874
\put(336,772){\line( 1, 0){ 51}}
4875
\put(336,645){\line( 1, 0){ 51}}
4876
\put(336,619){\framebox(51,204){}}
4877
\put(349,772){\line( 0,-1){127}}
4878
\put(349,746){\line( 1, 0){ 38}}
4879
\put(349,721){\line( 1, 0){ 38}}
4880
\put(349,696){\line( 1, 0){ 38}}
4881
\put(349,670){\line( 1, 0){ 38}}
4882
\put(413,594){\line( 1, 0){ 51}}
4883
\put(413,568){\line( 1, 0){ 51}}
4884
\put(413,441){\line( 1, 0){ 51}}
4885
\put(413,415){\framebox(51,204){}}
4886
\put(426,568){\line( 0,-1){127}}
4887
\put(426,543){\line( 1, 0){ 38}}
4888
\put(426,517){\line( 1, 0){ 38}}
4889
\put(426,492){\line( 1, 0){ 38}}
4890
\put(426,466){\line( 1, 0){ 38}}
4891
\put(489,594){\line( 1, 0){ 51}}
4892
\put(489,568){\line( 1, 0){ 51}}
4893
\put(489,441){\line( 1, 0){ 51}}
4894
\put(489,415){\framebox(51,204){}}
4895
\put(502,568){\line( 0,-1){127}}
4896
\put(502,543){\line( 1, 0){ 38}}
4897
\put(502,517){\line( 1, 0){ 38}}
4898
\put(502,492){\line( 1, 0){ 38}}
4899
\put(502,466){\line( 1, 0){ 38}}
4900
\put( 30,797){\line( 1, 0){ 51}}
4901
\put( 30,772){\line( 1, 0){ 51}}
4902
\put( 30,645){\line( 1, 0){ 51}}
4903
\put( 30,619){\framebox(51,204){}}
4904
\put( 43,772){\line( 0,-1){127}}
4905
\put( 43,746){\line( 1, 0){ 38}}
4906
\put( 43,721){\line( 1, 0){ 38}}
4907
\put( 43,696){\line( 1, 0){ 38}}
4908
\put( 43,670){\line( 1, 0){ 38}}
4909
\put( 30,568){\line( 1, 0){ 51}}
4910
\put( 30,543){\line( 1, 0){ 51}}
4911
\put( 30,415){\line( 1, 0){ 51}}
4912
\put( 30,390){\framebox(51,204){}}
4913
\put( 43,543){\line( 0,-1){128}}
4914
\put( 43,517){\line( 1, 0){ 38}}
4915
\put( 43,492){\line( 1, 0){ 38}}
4916
\put( 43,466){\line( 1, 0){ 38}}
4917
\put( 43,441){\line( 1, 0){ 38}}
4918
\put(183,568){\line( 1, 0){ 51}}
4919
\put(183,543){\line( 1, 0){ 51}}
4920
\put(183,415){\line( 1, 0){ 51}}
4921
\put(183,390){\framebox(51,204){}}
4922
\put(196,543){\line( 0,-1){128}}
4923
\put(196,517){\line( 1, 0){ 38}}
4924
\put(196,492){\line( 1, 0){ 38}}
4925
\put(196,466){\line( 1, 0){ 38}}
4926
\put(196,441){\line( 1, 0){ 38}}
4927
\put(114,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
4931
\put(114,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
4935
\put(114,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
4939
\put(114,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
4943
\put(114,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
4947
\put(114,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
4951
\put(114,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
4955
\put(114,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
4959
\put(114,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
4963
\put(132,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
4967
\put(132,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
4971
\put(140,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
4975
\put(140,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
4979
\put(140,726){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
4983
\put(140,700){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
4987
\put(132,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
4991
\put(209,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
4995
\put(191,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
4999
\put(191,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5003
\put(191,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5007
\put(191,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5011
\put(191,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5015
\put(191,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5019
\put(191,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5023
\put(191,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5027
\put(191,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5031
\put(209,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5035
\put(209,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5039
\put(216,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5043
\put(216,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5047
\put(216,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5051
\put(216,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5055
\put(216,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5059
\put(216,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5063
\put(216,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5067
\put(285,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5071
\put(267,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5075
\put(267,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5079
\put(267,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5083
\put(267,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5087
\put(267,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5091
\put(267,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5095
\put(267,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5099
\put(267,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5103
\put(267,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5107
\put(285,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5111
\put(285,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5115
\put(293,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5119
\put(293,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5123
\put(293,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5127
\put(293,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5131
\put(293,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5135
\put(293,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5139
\put(293,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5143
\put(362,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5147
\put(344,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5151
\put(344,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5155
\put(344,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5159
\put(344,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5163
\put(344,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5167
\put(344,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5171
\put(344,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5175
\put(344,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5179
\put(344,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5183
\put(362,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5187
\put(362,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5191
\put(369,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5195
\put(369,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5199
\put(369,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5203
\put(369,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5207
\put(369,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5211
\put(369,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5215
\put(369,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5219
\put(438,420){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5223
\put(420,555){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5227
\put(420,540){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5231
\put(420,525){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5235
\put(420,510){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5239
\put(420,495){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5243
\put(420,479){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5247
\put(420,464){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5251
\put(420,451){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5255
\put(420,441){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5259
\put(438,598){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5263
\put(438,573){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5267
\put(446,481){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5271
\put(446,471){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5275
\put(446,446){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5279
\put(446,497){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5283
\put(446,507){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5287
\put(446,532){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5291
\put(446,522){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5295
\put(515,420){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5299
\put(497,555){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5303
\put(497,540){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5307
\put(497,525){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5311
\put(497,510){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5315
\put(497,495){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5319
\put(497,479){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5323
\put(497,464){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5327
\put(497,451){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5331
\put(497,441){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5335
\put(515,598){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5339
\put(515,573){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5343
\put(522,481){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5347
\put(522,471){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5351
\put(522,446){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5355
\put(522,497){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5359
\put(522,507){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5363
\put(522,532){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5367
\put(522,522){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5371
\put( 56,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5375
\put( 38,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5379
\put( 38,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5383
\put( 38,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5387
\put( 38,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5391
\put( 38,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5395
\put( 38,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5399
\put( 38,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5403
\put( 38,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5407
\put( 38,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5411
\put( 56,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5415
\put( 56,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5419
\put( 63,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5423
\put( 63,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5427
\put( 63,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5431
\put( 63,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5435
\put( 63,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5439
\put( 63,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5443
\put( 63,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5447
\put( 63,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5451
\put(216,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5455
\put(293,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5459
\put(369,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5463
\put(446,547){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5467
\put(522,547){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5471
\put( 63,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5475
\put(141,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5479
\put(216,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5483
\put(294,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5487
\put(369,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5491
\put(447,558){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5495
\put(522,558){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5499
\put(140,649){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
5503
\put( 56,395){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5507
\put( 38,426){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5511
\put( 38,530){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5515
\put( 38,514){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5519
\put( 38,499){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5523
\put( 38,484){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5527
\put( 38,469){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5531
\put( 38,453){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5535
\put( 38,438){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5539
\put( 38,415){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5543
\put( 56,573){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5547
\put( 56,547){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5551
\put( 63,456){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5555
\put( 63,446){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5559
\put( 63,522){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
5563
\put( 63,497){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
5567
\put( 63,471){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
5571
\put(209,395){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5575
\put(191,426){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5579
\put(191,530){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5583
\put(191,514){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5587
\put(191,499){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5591
\put(191,484){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5595
\put(191,469){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5599
\put(191,453){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5603
\put(191,438){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5607
\put(191,415){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5611
\put(209,573){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5615
\put(209,547){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5619
\put(216,456){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5623
\put(216,446){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5627
\put(216,522){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
5631
\put(216,497){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
5635
\put(216,471){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
5639
\put( 63,420){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
5643
\put(216,420){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
5647
\put(140,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5654
\caption{Representation of the type declaration {\sf int a(int b, int
5655
c(.....), ....);}}\label{internal11}
5659
Structure {\sf attr} has the following form:
5663
/* Type attribute. */
5666
enum intern_func_class function_class;
5668
enum type_qual type_qualifier;
5669
enum storage_class_specifier storage_class_specifier;
5670
enum intern_arit_class arit_class;
5679
The {\sf function\_class} can be simple variable, matrix, intrinsic
5680
function, function, remote function, $\ldots$ (full listing of
5681
possibilities can be found in `type.h' file\index{file!type.h}). The
5682
{\sf domain} pointer has the type specific form. For example for the
5683
type declaration \verb|int a[10][20];|, the internal structure is in
5684
the figure~\ref{internal12}.
5688
{\setlength{\unitlength}{0.01250000in}%
5690
\begingroup\makeatletter\ifx\SetFigFont\undefined
5691
% extract first six characters in \fmtname
5692
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
5693
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
5694
\ifx\x\y % LaTeX or SliTeX?
5695
\gdef\SetFigFont#1#2#3{%
5696
\ifnum #1<17\tiny\else \ifnum #1<20\small\else
5697
\ifnum #1<24\normalsize\else \ifnum #1<29\large\else
5698
\ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
5699
\huge\fi\fi\fi\fi\fi\fi
5700
\csname #3\endcsname}%
5702
\gdef\SetFigFont#1#2#3{\begingroup
5703
\count@#1\relax \ifnum 25<\count@\count@25\fi
5704
\def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
5706
\csname \romannumeral\the\count@ pt\expandafter\endcsname
5707
\csname @\romannumeral\the\count@ pt\endcsname
5708
\csname #3\endcsname}%
5711
\begin{picture}(217,437)(28,388)
5713
\put(108,543){\framebox(51,51){}}
5714
\put(108,570){\line( 1, 0){ 51}}
5715
\put(132,549){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5719
\put(132,576){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5723
\put(159,657){\line( 1, 0){ 9}}
5724
\put(168,657){\line( 0,-1){ 51}}
5725
\put(168,606){\line(-1, 0){ 36}}
5726
\put(132,606){\vector( 0,-1){ 12}}
5727
\put( 56,619){\vector( 0,-1){ 25}}
5728
\put( 81,810){\vector( 3, 1){ 26.400}}
5729
\put(107,797){\line( 1, 0){ 51}}
5730
\put(107,772){\line( 1, 0){ 51}}
5731
\put(107,645){\line( 1, 0){ 51}}
5732
\put(120,772){\line( 0,-1){127}}
5733
\put(120,746){\line( 1, 0){ 38}}
5734
\put(120,721){\line( 1, 0){ 38}}
5735
\put(120,696){\line( 1, 0){ 38}}
5736
\put(120,670){\line( 1, 0){ 38}}
5737
\put(158,784){\vector( 3, 4){ 23.400}}
5738
\put(107,619){\framebox(51,204){}}
5739
\put(183,797){\line( 1, 0){ 51}}
5740
\put(183,772){\line( 1, 0){ 51}}
5741
\put(183,645){\line( 1, 0){ 51}}
5742
\put(196,772){\line( 0,-1){127}}
5743
\put(196,746){\line( 1, 0){ 38}}
5744
\put(196,721){\line( 1, 0){ 38}}
5745
\put(196,696){\line( 1, 0){ 38}}
5746
\put(196,670){\line( 1, 0){ 38}}
5747
\put( 30,797){\line( 1, 0){ 51}}
5748
\put( 30,772){\line( 1, 0){ 51}}
5749
\put( 30,645){\line( 1, 0){ 51}}
5750
\put( 30,619){\framebox(51,204){}}
5751
\put( 43,772){\line( 0,-1){127}}
5752
\put( 43,746){\line( 1, 0){ 38}}
5753
\put( 43,721){\line( 1, 0){ 38}}
5754
\put( 43,696){\line( 1, 0){ 38}}
5755
\put( 43,670){\line( 1, 0){ 38}}
5756
\put( 30,568){\line( 1, 0){ 51}}
5757
\put( 30,543){\line( 1, 0){ 51}}
5758
\put( 30,415){\line( 1, 0){ 51}}
5759
\put( 30,390){\framebox(51,204){}}
5760
\put( 43,543){\line( 0,-1){128}}
5761
\put( 43,517){\line( 1, 0){ 38}}
5762
\put( 43,492){\line( 1, 0){ 38}}
5763
\put( 43,466){\line( 1, 0){ 38}}
5764
\put( 43,441){\line( 1, 0){ 38}}
5765
\put(183,619){\framebox(51,204){}}
5766
\put(234,657){\line( 1, 0){ 9}}
5767
\put(243,657){\line( 0,-1){ 51}}
5768
\put(243,606){\line(-1, 0){ 36}}
5769
\put(207,606){\vector( 0,-1){ 12}}
5770
\put(183,543){\framebox(51,51){}}
5771
\put(183,570){\line( 1, 0){ 51}}
5772
\put(114,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5776
\put(114,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5780
\put(114,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5784
\put(114,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5788
\put(114,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5792
\put(114,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5796
\put(114,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5800
\put(114,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5804
\put(114,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5808
\put(132,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5812
\put(132,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5816
\put(140,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5820
\put(140,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5824
\put(140,726){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
5828
\put(140,700){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
5832
\put(132,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5836
\put(209,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5840
\put(191,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5844
\put(191,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5848
\put(191,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5852
\put(191,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5856
\put(191,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5860
\put(191,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5864
\put(191,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5868
\put(191,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5872
\put(191,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5876
\put(209,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5880
\put(209,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5884
\put(216,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5888
\put(216,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5892
\put(216,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5896
\put(216,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5900
\put(216,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5904
\put(216,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5908
\put(216,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5912
\put( 56,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5916
\put( 38,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5920
\put( 38,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5924
\put( 38,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5928
\put( 38,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5932
\put( 38,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5936
\put( 38,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5940
\put( 38,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5944
\put( 38,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5948
\put( 38,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5952
\put( 56,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5956
\put( 56,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
5960
\put( 63,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5964
\put( 63,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5968
\put( 63,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5972
\put( 63,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5976
\put( 63,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5980
\put( 63,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5984
\put( 63,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5988
\put( 63,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5992
\put(216,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
5996
\put( 63,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6000
\put(141,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6004
\put(216,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6008
\put( 56,395){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
6012
\put( 38,426){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
6016
\put( 38,530){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
6020
\put( 38,514){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
6024
\put( 38,499){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
6028
\put( 38,484){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
6032
\put( 38,469){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
6036
\put( 38,453){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
6040
\put( 38,438){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
6044
\put( 38,415){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
6048
\put( 56,573){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
6052
\put( 56,547){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
6056
\put( 63,456){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6060
\put( 63,446){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6064
\put( 63,522){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
6068
\put( 63,497){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
6072
\put( 63,471){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
6076
\put( 63,420){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
6080
\put(207,576){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
6084
\put(207,549){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
6088
\put(140,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6092
\put(140,751){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
6099
\caption{Representation of the type declaration {\sf int
6100
a[10][20];}}\label{internal12}
6104
In the figure~\ref{internal11}, there is a general form of
6105
representation of a type declaration. Typically, the C-like declarations
6106
and definitions have other forms, i.e. there are not declarations of
6107
functions in a function declaration. Therefore, the n-ary tree pointed
6108
out in the figure~\ref{internal11} is simplified to the list of
6109
identifiers or binary tree~\ref{internal13}, respectively.
6113
{\setlength{\unitlength}{0.01250000in}%
6115
\begingroup\makeatletter\ifx\SetFigFont\undefined
6116
% extract first six characters in \fmtname
6117
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
6118
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
6119
\ifx\x\y % LaTeX or SliTeX?
6120
\gdef\SetFigFont#1#2#3{%
6121
\ifnum #1<17\tiny\else \ifnum #1<20\small\else
6122
\ifnum #1<24\normalsize\else \ifnum #1<29\large\else
6123
\ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
6124
\huge\fi\fi\fi\fi\fi\fi
6125
\csname #3\endcsname}%
6127
\gdef\SetFigFont#1#2#3{\begingroup
6128
\count@#1\relax \ifnum 25<\count@\count@25\fi
6129
\def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
6131
\csname \romannumeral\the\count@ pt\expandafter\endcsname
6132
\csname @\romannumeral\the\count@ pt\endcsname
6133
\csname #3\endcsname}%
6136
\begin{picture}(247,463)(28,358)
6138
\put( 57,603){\vector( 0,-1){ 27}}
6139
\put( 84,805){\vector( 3, 1){ 27.600}}
6140
\put( 30,792){\line( 1, 0){ 54}}
6141
\put( 30,765){\line( 1, 0){ 54}}
6142
\put( 30,630){\line( 1, 0){ 54}}
6143
\put( 30,603){\framebox(54,216){}}
6144
\put( 44,765){\line( 0,-1){135}}
6145
\put( 44,738){\line( 1, 0){ 40}}
6146
\put( 44,711){\line( 1, 0){ 40}}
6147
\put( 44,684){\line( 1, 0){ 40}}
6148
\put( 44,657){\line( 1, 0){ 40}}
6149
\put( 30,549){\line( 1, 0){ 54}}
6150
\put( 30,522){\line( 1, 0){ 54}}
6151
\put( 30,387){\line( 1, 0){ 54}}
6152
\put( 30,360){\framebox(54,216){}}
6153
\put( 44,522){\line( 0,-1){135}}
6154
\put( 44,495){\line( 1, 0){ 40}}
6155
\put( 44,468){\line( 1, 0){ 40}}
6156
\put( 44,441){\line( 1, 0){ 40}}
6157
\put( 44,414){\line( 1, 0){ 40}}
6158
\put(111,792){\line( 1, 0){ 54}}
6159
\put(111,765){\line( 1, 0){ 54}}
6160
\put(111,630){\line( 1, 0){ 54}}
6161
\put(125,765){\line( 0,-1){135}}
6162
\put(165,778){\vector( 3, 4){ 25.080}}
6163
\put(111,603){\framebox(54,216){}}
6164
\put(125,738){\line( 1, 0){ 40}}
6165
\put(125,711){\line( 1, 0){ 40}}
6166
\put(125,684){\line( 1, 0){ 40}}
6167
\put(125,657){\line( 1, 0){ 40}}
6168
\put(192,792){\line( 1, 0){ 54}}
6169
\put(192,765){\line( 1, 0){ 54}}
6170
\put(192,630){\line( 1, 0){ 54}}
6171
\put(206,765){\line( 0,-1){135}}
6172
\put(246,778){\vector( 3, 4){ 25.080}}
6173
\put(192,603){\framebox(54,216){}}
6174
\put(206,738){\line( 1, 0){ 40}}
6175
\put(206,711){\line( 1, 0){ 40}}
6176
\put(206,684){\line( 1, 0){ 40}}
6177
\put(206,657){\line( 1, 0){ 40}}
6178
\put( 57,608){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6182
\put( 38,751){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6186
\put( 38,735){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6190
\put( 38,719){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6194
\put( 38,703){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6198
\put( 38,686){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6202
\put( 38,670){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6206
\put( 38,654){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6210
\put( 38,641){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6214
\put( 38,630){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6218
\put( 57,797){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6222
\put( 57,770){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6226
\put( 65,673){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6230
\put( 65,662){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6234
\put( 65,635){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6238
\put( 65,689){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6242
\put( 65,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6246
\put( 65,727){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6250
\put( 65,716){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6254
\put( 65,743){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6258
\put( 66,756){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6262
\put( 57,365){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6266
\put( 38,398){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6270
\put( 38,508){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6274
\put( 38,492){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6278
\put( 38,476){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6282
\put( 38,460){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6286
\put( 38,444){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6290
\put( 38,427){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6294
\put( 38,411){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6298
\put( 38,387){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6302
\put( 57,554){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6306
\put( 57,527){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6310
\put( 65,430){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6314
\put( 65,419){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6318
\put( 65,500){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
6322
\put( 65,473){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
6326
\put( 65,446){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
6330
\put( 65,392){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
6334
\put(119,686){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6338
\put(119,641){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6342
\put(138,608){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6346
\put(119,751){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6350
\put(119,735){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6354
\put(119,719){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6358
\put(119,703){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6362
\put(119,670){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6366
\put(119,654){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6370
\put(119,630){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6374
\put(138,797){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6378
\put(138,770){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6382
\put(146,673){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6386
\put(146,662){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6390
\put(146,743){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
6394
\put(146,716){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
6398
\put(146,689){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
6402
\put(200,686){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6406
\put(200,641){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6410
\put(219,608){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6414
\put(200,751){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6418
\put(200,735){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6422
\put(200,719){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6426
\put(200,703){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6430
\put(200,670){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6434
\put(200,654){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6438
\put(200,630){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6442
\put(219,797){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6446
\put(219,770){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6450
\put(227,673){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6454
\put(227,662){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6458
\put(227,743){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
6462
\put(227,716){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
6466
\put(227,689){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
6470
\put(146,635){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
6474
\put(227,635){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
6481
\caption{Representation of typical C-like function
6482
declaration.}\label{internal13}
6486
\section{C-language subset of type}
6488
%\subsection{Internal code representation}
6490
Some typical patterns are in figures~\ref{kod01}, \ref{kod02},
6495
{\setlength{\unitlength}{0.01250000in}%
6497
\begingroup\makeatletter\ifx\SetFigFont\undefined
6498
% extract first six characters in \fmtname
6499
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
6500
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
6501
\ifx\x\y % LaTeX or SliTeX?
6502
\gdef\SetFigFont#1#2#3{%
6503
\ifnum #1<17\tiny\else \ifnum #1<20\small\else
6504
\ifnum #1<24\normalsize\else \ifnum #1<29\large\else
6505
\ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
6506
\huge\fi\fi\fi\fi\fi\fi
6507
\csname #3\endcsname}%
6509
\gdef\SetFigFont#1#2#3{\begingroup
6510
\count@#1\relax \ifnum 25<\count@\count@25\fi
6511
\def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
6513
\csname \romannumeral\the\count@ pt\expandafter\endcsname
6514
\csname @\romannumeral\the\count@ pt\endcsname
6515
\csname #3\endcsname}%
6518
\begin{picture}(99,75)(263,749)
6520
\put(300,810){\line(-2,-1){ 30}}
6521
\put(300,810){\line( 2,-1){ 30}}
6522
\put(330,780){\line(-2,-1){ 30}}
6523
\put(330,780){\line( 0,-1){ 18}}
6524
\put(330,780){\line( 2,-1){ 30}}
6525
\put(330,786){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
6529
\put(300,750){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
6533
\put(360,750){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
6537
\put(270,786){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
6541
\put(300,819){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
6545
\put(330,753){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
6552
\caption{Tree pattern of the declaration {\sf int
6553
a(int b[ ],int c);}}\label{kod01}
6560
{\setlength{\unitlength}{0.01250000in}%
6562
\begingroup\makeatletter\ifx\SetFigFont\undefined
6563
% extract first six characters in \fmtname
6564
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
6565
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
6566
\ifx\x\y % LaTeX or SliTeX?
6567
\gdef\SetFigFont#1#2#3{%
6568
\ifnum #1<17\tiny\else \ifnum #1<20\small\else
6569
\ifnum #1<24\normalsize\else \ifnum #1<29\large\else
6570
\ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
6571
\huge\fi\fi\fi\fi\fi\fi
6572
\csname #3\endcsname}%
6574
\gdef\SetFigFont#1#2#3{\begingroup
6575
\count@#1\relax \ifnum 25<\count@\count@25\fi
6576
\def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
6578
\csname \romannumeral\the\count@ pt\expandafter\endcsname
6579
\csname @\romannumeral\the\count@ pt\endcsname
6580
\csname #3\endcsname}%
6583
\begin{picture}(129,112)(263,712)
6585
\put(285,747){\framebox(30,15){}}
6586
\put(285,756){\line( 1, 0){ 30}}
6587
\put(315,714){\framebox(30,15){}}
6588
\put(315,723){\line( 1, 0){ 30}}
6589
\put(300,810){\line(-2,-1){ 30}}
6590
\put(300,810){\line( 2,-1){ 30}}
6591
\put(330,780){\line(-2,-1){ 30}}
6592
\put(330,780){\line( 2,-1){ 30}}
6593
\put(360,744){\line(-5,-2){ 30}}
6594
\put(360,744){\line( 5,-2){ 30}}
6595
\put(270,786){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
6599
\put(300,819){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
6603
\put(330,786){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
6607
\put(360,750){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
6614
\caption{Tree pattern of the declaration {\sf int
6615
a[ ][ ][ ];}}\label{kod02}
6621
{\setlength{\unitlength}{0.01250000in}%
6623
\begingroup\makeatletter\ifx\SetFigFont\undefined
6624
% extract first six characters in \fmtname
6625
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
6626
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
6627
\ifx\x\y % LaTeX or SliTeX?
6628
\gdef\SetFigFont#1#2#3{%
6629
\ifnum #1<17\tiny\else \ifnum #1<20\small\else
6630
\ifnum #1<24\normalsize\else \ifnum #1<29\large\else
6631
\ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
6632
\huge\fi\fi\fi\fi\fi\fi
6633
\csname #3\endcsname}%
6635
\gdef\SetFigFont#1#2#3{\begingroup
6636
\count@#1\relax \ifnum 25<\count@\count@25\fi
6637
\def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
6639
\csname \romannumeral\the\count@ pt\expandafter\endcsname
6640
\csname @\romannumeral\the\count@ pt\endcsname
6641
\csname #3\endcsname}%
6644
\begin{picture}(429,190)(263,634)
6646
\put(351,684){\framebox(30,15){}}
6647
\put(351,693){\line( 1, 0){ 30}}
6648
\put(315,720){\framebox(30,15){}}
6649
\put(315,729){\line( 1, 0){ 30}}
6650
\put(531,636){\framebox(30,15){}}
6651
\put(531,645){\line( 1, 0){ 30}}
6652
\put(495,672){\framebox(30,15){}}
6653
\put(495,681){\line( 1, 0){ 30}}
6654
\put(300,810){\line(-2,-1){ 30}}
6655
\put(300,810){\line( 2,-1){ 30}}
6656
\put(330,780){\line(-2,-1){ 30}}
6657
\put(330,780){\line( 2,-1){ 30}}
6658
\put(330,780){\line( 6,-1){180}}
6659
\put(396,714){\line(-2,-1){ 30}}
6660
\put(396,714){\line( 2,-1){ 30}}
6661
\put(360,750){\line(-2,-1){ 30}}
6662
\put(360,750){\line( 2,-1){ 30}}
6663
\put(510,732){\line(-2,-1){ 30}}
6664
\put(510,732){\line( 2,-1){ 30}}
6665
\put(510,732){\line( 6,-1){180}}
6666
\put(576,666){\line(-2,-1){ 30}}
6667
\put(576,666){\line( 2,-1){ 30}}
6668
\put(540,702){\line(-2,-1){ 30}}
6669
\put(540,702){\line( 2,-1){ 30}}
6670
\put(270,786){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
6674
\put(300,819){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
6678
\put(330,786){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
6682
\put(510,735){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
6686
\put(300,753){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
6690
\put(480,705){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
6694
\put(360,756){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
6698
\put(396,720){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
6702
\put(540,708){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
6706
\put(576,672){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
6713
\caption{Tree pattern of the declaration {\sf int a(int b[ ][ ]$\ldots$,
6714
int c[ ][ ]$\ldots$,$\ldots$);}}\label{kod03}
6718
In the following figures, there are some internal representations of
6719
C-language types (fig.~\ref{internal14}, \ref{internal15},
6720
\ref{internal16}, \ref{internal17}, \ref{internal18}). The rest of
6721
this chapter describes considerations about different language
6722
constructions that are using {\sf internal\_type} structures, but are
6723
no necessary fully implemented.
6726
\subsection{Internal representation of {\sf typedef}}
6729
The {\sf typedef} type has the {\sf function\_class} {\em typedef}.
6730
Where the {\sf typedef} is used typically only the part where the
6731
first output points is taken and this is the internal type definition
6732
of the {\sf typedef} (see fig.~\ref{internal14}).
6736
{\setlength{\unitlength}{0.01250000in}%
6738
\begingroup\makeatletter\ifx\SetFigFont\undefined
6739
% extract first six characters in \fmtname
6740
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
6741
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
6742
\ifx\x\y % LaTeX or SliTeX?
6743
\gdef\SetFigFont#1#2#3{%
6744
\ifnum #1<17\tiny\else \ifnum #1<20\small\else
6745
\ifnum #1<24\normalsize\else \ifnum #1<29\large\else
6746
\ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
6747
\huge\fi\fi\fi\fi\fi\fi
6748
\csname #3\endcsname}%
6750
\gdef\SetFigFont#1#2#3{\begingroup
6751
\count@#1\relax \ifnum 25<\count@\count@25\fi
6752
\def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
6754
\csname \romannumeral\the\count@ pt\expandafter\endcsname
6755
\csname @\romannumeral\the\count@ pt\endcsname
6756
\csname #3\endcsname}%
6759
\begin{picture}(232,703)(28,109)
6761
\put( 30,300){\line( 1, 0){ 54}}
6762
\put( 30,273){\line( 1, 0){ 54}}
6763
\put( 30,138){\line( 1, 0){ 54}}
6764
\put( 30,111){\framebox(54,216){}}
6765
\put( 44,273){\line( 0,-1){135}}
6766
\put( 44,246){\line( 1, 0){ 40}}
6767
\put( 44,219){\line( 1, 0){ 40}}
6768
\put( 44,192){\line( 1, 0){ 40}}
6769
\put( 44,165){\line( 1, 0){ 40}}
6770
\put( 57,116){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6774
\put( 38,149){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6778
\put( 38,259){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6782
\put( 38,243){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6786
\put( 38,227){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6790
\put( 38,211){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6794
\put( 38,195){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6798
\put( 38,178){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6802
\put( 38,162){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6806
\put( 57,305){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6810
\put( 57,278){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6814
\put( 65,181){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6818
\put( 65,170){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6822
\put( 65,251){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
6826
\put( 65,224){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
6830
\put( 65,197){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
6834
\put( 65,143){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
6838
\put(111,273){\framebox(54,54){}}
6839
\put(111,300){\line( 1, 0){ 54}}
6840
\put(165,396){\line( 1, 0){ 12}}
6841
\put(177,396){\line( 0,-1){ 51}}
6842
\put(177,345){\line(-1, 0){ 39}}
6843
\put(138,345){\vector( 0,-1){ 18}}
6844
\put(138,306){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6848
\put(138,279){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6852
\put(192,273){\framebox(54,54){}}
6853
\put(192,300){\line( 1, 0){ 54}}
6854
\put(246,396){\line( 1, 0){ 12}}
6855
\put(258,396){\line( 0,-1){ 51}}
6856
\put(258,345){\line(-1, 0){ 39}}
6857
\put(219,345){\vector( 0,-1){ 18}}
6858
\put(219,306){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6862
\put(219,279){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6866
\put(192,516){\line( 1, 0){ 54}}
6867
\put(192,381){\line( 1, 0){ 54}}
6868
\put(206,489){\line( 1, 0){ 40}}
6869
\put(206,462){\line( 1, 0){ 40}}
6870
\put(206,435){\line( 1, 0){ 40}}
6871
\put(165,529){\vector( 3, 4){ 25.080}}
6872
\put( 57,354){\vector( 0,-1){ 27}}
6873
\put( 84,556){\vector( 3, 1){ 27.600}}
6874
\put( 30,543){\line( 1, 0){ 54}}
6875
\put( 30,354){\framebox(54,216){}}
6876
\put(111,543){\line( 1, 0){ 54}}
6877
\put(111,516){\line( 1, 0){ 54}}
6878
\put(111,381){\line( 1, 0){ 54}}
6879
\put(125,489){\line( 1, 0){ 40}}
6880
\put(125,462){\line( 1, 0){ 40}}
6881
\put(125,435){\line( 1, 0){ 40}}
6882
\put(125,408){\line( 1, 0){ 40}}
6883
\put(192,543){\line( 1, 0){ 54}}
6884
\put(206,516){\line( 0,-1){135}}
6885
\put(192,354){\framebox(54,216){}}
6886
\put(206,408){\line( 1, 0){ 40}}
6887
\put( 30,516){\line( 1, 0){ 54}}
6888
\put( 30,381){\line( 1, 0){ 54}}
6889
\put( 44,516){\line( 0,-1){135}}
6890
\put( 44,489){\line( 1, 0){ 40}}
6891
\put( 44,462){\line( 1, 0){ 40}}
6892
\put( 44,435){\line( 1, 0){ 40}}
6893
\put( 44,408){\line( 1, 0){ 40}}
6894
\put(125,516){\line( 0,-1){135}}
6895
\put(111,354){\framebox(54,216){}}
6896
\put( 57,594){\vector( 0,-1){ 24}}
6897
\put( 30,783){\line( 1, 0){ 54}}
6898
\put( 30,756){\line( 1, 0){ 54}}
6899
\put( 30,621){\line( 1, 0){ 54}}
6900
\put( 30,594){\framebox(54,216){}}
6901
\put( 44,756){\line( 0,-1){135}}
6902
\put( 44,729){\line( 1, 0){ 40}}
6903
\put( 44,702){\line( 1, 0){ 40}}
6904
\put( 44,675){\line( 1, 0){ 40}}
6905
\put( 44,648){\line( 1, 0){ 40}}
6906
\put(200,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6910
\put(200,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6914
\put(200,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6918
\put(200,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6922
\put(200,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6926
\put(200,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6930
\put( 57,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6934
\put( 57,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6938
\put( 57,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6942
\put( 65,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6946
\put( 65,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6950
\put( 65,440){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6954
\put( 65,451){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6958
\put( 65,478){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6962
\put( 65,467){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6966
\put( 65,494){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6970
\put( 66,507){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
6974
\put(119,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6978
\put(119,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6982
\put(146,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
6986
\put(200,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6990
\put(219,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6994
\put(200,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
6998
\put(200,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7002
\put(219,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7006
\put(219,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7010
\put(227,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7014
\put(227,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7018
\put(227,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
7022
\put(227,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
7026
\put(227,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
7030
\put( 38,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7034
\put( 38,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7038
\put( 38,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7042
\put( 38,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7046
\put( 38,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7050
\put( 38,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7054
\put( 38,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7058
\put( 38,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7062
\put( 38,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7066
\put( 38,138){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7070
\put(119,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7074
\put(119,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7078
\put(138,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7082
\put(119,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7086
\put(119,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7090
\put(119,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7094
\put(119,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7098
\put(119,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7102
\put(138,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7106
\put(138,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7110
\put(146,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7114
\put(146,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7118
\put(146,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
7122
\put(146,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
7126
\put( 57,599){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7130
\put( 38,632){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7134
\put( 38,742){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7138
\put( 38,726){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7142
\put( 38,710){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7146
\put( 38,694){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7150
\put( 38,678){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7154
\put( 38,661){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7158
\put( 38,645){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7162
\put( 57,788){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7166
\put( 57,761){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7170
\put( 65,664){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7174
\put( 65,653){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7178
\put( 65,626){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
7182
\put( 65,680){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}%
7186
\put( 66,690){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}%
7190
\put( 65,707){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}%
7194
\put( 66,717){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}%
7198
\put( 65,734){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}%
7202
\put( 66,744){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}%
7206
\put(146,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
7210
\put( 65,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
7214
\put(227,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
7221
\caption{Internal representation of {\sf typedef int c[3][3];}}\label{internal14}
7226
\subsection{Internal representation of pointer}
7229
The pointer type has the {\sf function\_class} {\em pointer}. The
7230
level of indirection is equal to the number of the {\sf
7231
internal\_type} structures (see fig.~\ref{internal15}).
7235
{\setlength{\unitlength}{0.01250000in}%
7237
\begingroup\makeatletter\ifx\SetFigFont\undefined
7238
% extract first six characters in \fmtname
7239
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
7240
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
7241
\ifx\x\y % LaTeX or SliTeX?
7242
\gdef\SetFigFont#1#2#3{%
7243
\ifnum #1<17\tiny\else \ifnum #1<20\small\else
7244
\ifnum #1<24\normalsize\else \ifnum #1<29\large\else
7245
\ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
7246
\huge\fi\fi\fi\fi\fi\fi
7247
\csname #3\endcsname}%
7249
\gdef\SetFigFont#1#2#3{\begingroup
7250
\count@#1\relax \ifnum 25<\count@\count@25\fi
7251
\def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
7253
\csname \romannumeral\the\count@ pt\expandafter\endcsname
7254
\csname @\romannumeral\the\count@ pt\endcsname
7255
\csname #3\endcsname}%
7258
\begin{picture}(58,703)(28,109)
7260
\put( 57,354){\vector( 0,-1){ 27}}
7261
\put( 30,543){\line( 1, 0){ 54}}
7262
\put( 30,354){\framebox(54,216){}}
7263
\put( 30,516){\line( 1, 0){ 54}}
7264
\put( 30,381){\line( 1, 0){ 54}}
7265
\put( 44,516){\line( 0,-1){135}}
7266
\put( 44,489){\line( 1, 0){ 40}}
7267
\put( 44,462){\line( 1, 0){ 40}}
7268
\put( 44,435){\line( 1, 0){ 40}}
7269
\put( 44,408){\line( 1, 0){ 40}}
7270
\put( 57,594){\vector( 0,-1){ 24}}
7271
\put( 30,783){\line( 1, 0){ 54}}
7272
\put( 30,756){\line( 1, 0){ 54}}
7273
\put( 30,621){\line( 1, 0){ 54}}
7274
\put( 30,594){\framebox(54,216){}}
7275
\put( 44,756){\line( 0,-1){135}}
7276
\put( 44,729){\line( 1, 0){ 40}}
7277
\put( 44,702){\line( 1, 0){ 40}}
7278
\put( 44,675){\line( 1, 0){ 40}}
7279
\put( 44,648){\line( 1, 0){ 40}}
7280
\put( 30,300){\line( 1, 0){ 54}}
7281
\put( 30,273){\line( 1, 0){ 54}}
7282
\put( 30,138){\line( 1, 0){ 54}}
7283
\put( 30,111){\framebox(54,216){}}
7284
\put( 44,273){\line( 0,-1){135}}
7285
\put( 44,246){\line( 1, 0){ 40}}
7286
\put( 44,219){\line( 1, 0){ 40}}
7287
\put( 44,192){\line( 1, 0){ 40}}
7288
\put( 44,165){\line( 1, 0){ 40}}
7289
\put( 57,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7293
\put( 57,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7297
\put( 57,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7301
\put( 65,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7305
\put( 65,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7309
\put( 65,440){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7313
\put( 65,451){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7317
\put( 65,478){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7321
\put( 65,467){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7325
\put( 65,494){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7329
\put( 66,507){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7333
\put( 38,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7337
\put( 38,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7341
\put( 38,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7345
\put( 38,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7349
\put( 38,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7353
\put( 38,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7357
\put( 38,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7361
\put( 38,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7365
\put( 38,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7369
\put( 38,138){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7373
\put( 57,599){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7377
\put( 38,632){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7381
\put( 38,742){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7385
\put( 38,726){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7389
\put( 38,710){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7393
\put( 38,694){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7397
\put( 38,678){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7401
\put( 38,661){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7405
\put( 38,645){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7409
\put( 57,788){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7413
\put( 57,761){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7417
\put( 65,664){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7421
\put( 65,653){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7425
\put( 65,626){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
7429
\put( 65,680){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}%
7433
\put( 66,690){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}%
7437
\put( 65,707){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}%
7441
\put( 66,717){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}%
7445
\put( 65,734){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}%
7449
\put( 66,744){\makebox(0,0)[b]{\SetFigFont{6}{7.2}{rm}%
7453
\put( 65,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
7457
\put( 57,116){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7461
\put( 38,149){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7465
\put( 38,259){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7469
\put( 38,243){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7473
\put( 38,227){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7477
\put( 38,211){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7481
\put( 38,195){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7485
\put( 38,178){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7489
\put( 38,162){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7493
\put( 57,305){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7497
\put( 57,278){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7501
\put( 65,181){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7505
\put( 65,170){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7509
\put( 65,251){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
7513
\put( 65,224){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
7517
\put( 65,143){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
7521
\put( 65,197){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
7528
\caption{Internal representation of {\sf char **a;}}\label{internal15}
7533
\subsection{Internal representation of enumeration}
7534
\label{sec:enumeration}
7536
The enumeration type has the {\sf function\_class} {\em enumeration}.
7537
The type of enumeration members are integer (see
7538
fig.~\ref{internal16}).
7542
{\setlength{\unitlength}{0.01250000in}%
7544
\begingroup\makeatletter\ifx\SetFigFont\undefined
7545
% extract first six characters in \fmtname
7546
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
7547
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
7548
\ifx\x\y % LaTeX or SliTeX?
7549
\gdef\SetFigFont#1#2#3{%
7550
\ifnum #1<17\tiny\else \ifnum #1<20\small\else
7551
\ifnum #1<24\normalsize\else \ifnum #1<29\large\else
7552
\ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
7553
\huge\fi\fi\fi\fi\fi\fi
7554
\csname #3\endcsname}%
7556
\gdef\SetFigFont#1#2#3{\begingroup
7557
\count@#1\relax \ifnum 25<\count@\count@25\fi
7558
\def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
7560
\csname \romannumeral\the\count@ pt\expandafter\endcsname
7561
\csname @\romannumeral\the\count@ pt\endcsname
7562
\csname #3\endcsname}%
7565
\begin{picture}(313,274)(28,298)
7567
\put(165,396){\line( 1, 0){ 12}}
7568
\put(177,396){\line( 0,-1){ 51}}
7569
\put(177,345){\line(-1, 0){ 39}}
7570
\put(138,345){\vector( 0,-1){ 18}}
7571
\put(111,300){\framebox(54,27){}}
7572
\put(138,306){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7576
\put( 84,556){\vector( 3, 1){ 27.600}}
7577
\put( 30,543){\line( 1, 0){ 54}}
7578
\put( 30,354){\framebox(54,216){}}
7579
\put(111,543){\line( 1, 0){ 54}}
7580
\put(111,516){\line( 1, 0){ 54}}
7581
\put(111,381){\line( 1, 0){ 54}}
7582
\put(125,489){\line( 1, 0){ 40}}
7583
\put(125,462){\line( 1, 0){ 40}}
7584
\put(125,435){\line( 1, 0){ 40}}
7585
\put(125,408){\line( 1, 0){ 40}}
7586
\put( 30,516){\line( 1, 0){ 54}}
7587
\put( 30,381){\line( 1, 0){ 54}}
7588
\put( 44,516){\line( 0,-1){135}}
7589
\put( 44,489){\line( 1, 0){ 40}}
7590
\put( 44,462){\line( 1, 0){ 40}}
7591
\put( 44,435){\line( 1, 0){ 40}}
7592
\put( 44,408){\line( 1, 0){ 40}}
7593
\put(125,516){\line( 0,-1){135}}
7594
\put(111,354){\framebox(54,216){}}
7595
\put(273,516){\line( 1, 0){ 54}}
7596
\put(273,381){\line( 1, 0){ 54}}
7597
\put(287,489){\line( 1, 0){ 40}}
7598
\put(287,462){\line( 1, 0){ 40}}
7599
\put(287,435){\line( 1, 0){ 40}}
7600
\put(246,529){\vector( 3, 4){ 25.080}}
7601
\put(273,543){\line( 1, 0){ 54}}
7602
\put(287,516){\line( 0,-1){135}}
7603
\put(273,354){\framebox(54,216){}}
7604
\put(287,408){\line( 1, 0){ 40}}
7605
\put(192,516){\line( 1, 0){ 54}}
7606
\put(192,381){\line( 1, 0){ 54}}
7607
\put(206,489){\line( 1, 0){ 40}}
7608
\put(206,462){\line( 1, 0){ 40}}
7609
\put(206,435){\line( 1, 0){ 40}}
7610
\put(165,529){\vector( 3, 4){ 25.080}}
7611
\put(192,543){\line( 1, 0){ 54}}
7612
\put(206,516){\line( 0,-1){135}}
7613
\put(192,354){\framebox(54,216){}}
7614
\put(206,408){\line( 1, 0){ 40}}
7615
\put(246,396){\line( 1, 0){ 12}}
7616
\put(258,396){\line( 0,-1){ 51}}
7617
\put(258,345){\line(-1, 0){ 39}}
7618
\put(219,345){\vector( 0,-1){ 18}}
7619
\put(192,300){\framebox(54,27){}}
7620
\put(327,396){\line( 1, 0){ 12}}
7621
\put(339,396){\line( 0,-1){ 51}}
7622
\put(339,345){\line(-1, 0){ 39}}
7623
\put(300,345){\vector( 0,-1){ 18}}
7624
\put(273,300){\framebox(54,27){}}
7625
\put( 57,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7629
\put( 57,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7633
\put( 57,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7637
\put( 65,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7641
\put( 65,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7645
\put( 65,440){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7649
\put( 65,451){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7653
\put( 65,478){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7657
\put( 65,467){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7661
\put( 65,494){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7665
\put( 66,507){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7669
\put(119,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7673
\put(119,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7677
\put(146,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
7681
\put( 38,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7685
\put( 38,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7689
\put( 38,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7693
\put( 38,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7697
\put( 38,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7701
\put( 38,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7705
\put( 38,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7709
\put( 38,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7713
\put( 38,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7717
\put(119,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7721
\put(119,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7725
\put(138,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7729
\put(119,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7733
\put(119,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7737
\put(119,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7741
\put(119,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7745
\put(119,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7749
\put(138,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7753
\put(138,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7757
\put(146,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7761
\put(146,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7765
\put(146,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
7769
\put(146,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
7773
\put(146,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
7777
\put( 65,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
7781
\put(281,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7785
\put(281,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7789
\put(281,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7793
\put(281,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7797
\put(281,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7801
\put(281,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7805
\put(281,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7809
\put(281,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7813
\put(300,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7817
\put(281,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7821
\put(300,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7825
\put(300,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7829
\put(308,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7833
\put(308,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7837
\put(308,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
7841
\put(308,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
7845
\put(308,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
7849
\put(308,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
7853
\put(200,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7857
\put(200,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7861
\put(200,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7865
\put(200,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7869
\put(200,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7873
\put(200,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7877
\put(200,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7881
\put(200,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7885
\put(219,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7889
\put(200,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7893
\put(219,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7897
\put(219,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7901
\put(227,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7905
\put(227,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
7909
\put(227,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
7913
\put(227,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
7917
\put(227,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
7921
\put(227,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
7925
\put(219,306){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7929
\put(300,306){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
7936
\caption{Internal representation of {\sf enum num \{ one, two, three \};}}\label{internal16}
7941
\subsection{Internal representation of structure}
7942
\label{sec:structure}
7944
The structure type has the {\sf function\_class} {\em structure}. The
7945
type of structure fields is the same as for simple variables or arrays
7946
(see fig.~\ref{internal17}).
7950
{\setlength{\unitlength}{0.01250000in}%
7952
\begingroup\makeatletter\ifx\SetFigFont\undefined
7953
% extract first six characters in \fmtname
7954
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
7955
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
7956
\ifx\x\y % LaTeX or SliTeX?
7957
\gdef\SetFigFont#1#2#3{%
7958
\ifnum #1<17\tiny\else \ifnum #1<20\small\else
7959
\ifnum #1<24\normalsize\else \ifnum #1<29\large\else
7960
\ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
7961
\huge\fi\fi\fi\fi\fi\fi
7962
\csname #3\endcsname}%
7964
\gdef\SetFigFont#1#2#3{\begingroup
7965
\count@#1\relax \ifnum 25<\count@\count@25\fi
7966
\def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
7968
\csname \romannumeral\the\count@ pt\expandafter\endcsname
7969
\csname @\romannumeral\the\count@ pt\endcsname
7970
\csname #3\endcsname}%
7973
\begin{picture}(301,220)(28,352)
7975
\put( 84,556){\vector( 3, 1){ 27.600}}
7976
\put( 30,543){\line( 1, 0){ 54}}
7977
\put( 30,354){\framebox(54,216){}}
7978
\put(111,543){\line( 1, 0){ 54}}
7979
\put(111,516){\line( 1, 0){ 54}}
7980
\put(111,381){\line( 1, 0){ 54}}
7981
\put(125,489){\line( 1, 0){ 40}}
7982
\put(125,462){\line( 1, 0){ 40}}
7983
\put(125,435){\line( 1, 0){ 40}}
7984
\put(125,408){\line( 1, 0){ 40}}
7985
\put( 30,516){\line( 1, 0){ 54}}
7986
\put( 30,381){\line( 1, 0){ 54}}
7987
\put( 44,516){\line( 0,-1){135}}
7988
\put( 44,489){\line( 1, 0){ 40}}
7989
\put( 44,462){\line( 1, 0){ 40}}
7990
\put( 44,435){\line( 1, 0){ 40}}
7991
\put( 44,408){\line( 1, 0){ 40}}
7992
\put(125,516){\line( 0,-1){135}}
7993
\put(111,354){\framebox(54,216){}}
7994
\put(273,516){\line( 1, 0){ 54}}
7995
\put(273,381){\line( 1, 0){ 54}}
7996
\put(287,489){\line( 1, 0){ 40}}
7997
\put(287,462){\line( 1, 0){ 40}}
7998
\put(287,435){\line( 1, 0){ 40}}
7999
\put(246,529){\vector( 3, 4){ 25.080}}
8000
\put(273,543){\line( 1, 0){ 54}}
8001
\put(287,516){\line( 0,-1){135}}
8002
\put(273,354){\framebox(54,216){}}
8003
\put(287,408){\line( 1, 0){ 40}}
8004
\put(192,516){\line( 1, 0){ 54}}
8005
\put(192,381){\line( 1, 0){ 54}}
8006
\put(206,489){\line( 1, 0){ 40}}
8007
\put(206,462){\line( 1, 0){ 40}}
8008
\put(206,435){\line( 1, 0){ 40}}
8009
\put(165,529){\vector( 3, 4){ 25.080}}
8010
\put(192,543){\line( 1, 0){ 54}}
8011
\put(206,516){\line( 0,-1){135}}
8012
\put(192,354){\framebox(54,216){}}
8013
\put(206,408){\line( 1, 0){ 40}}
8014
\put( 57,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8018
\put( 57,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8022
\put( 57,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8026
\put( 65,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8030
\put( 65,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8034
\put( 65,440){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8038
\put( 65,451){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8042
\put( 65,478){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8046
\put( 65,467){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8050
\put( 65,494){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8054
\put( 66,507){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8058
\put(119,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8062
\put(119,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8066
\put(146,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8070
\put( 38,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8074
\put( 38,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8078
\put( 38,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8082
\put( 38,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8086
\put( 38,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8090
\put( 38,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8094
\put( 38,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8098
\put( 38,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8102
\put( 38,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8106
\put(119,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8110
\put(119,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8114
\put(138,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8118
\put(119,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8122
\put(119,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8126
\put(119,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8130
\put(119,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8134
\put(119,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8138
\put(138,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8142
\put(138,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8146
\put(146,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8150
\put(146,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8154
\put(146,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8158
\put(146,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8162
\put(146,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
8166
\put( 65,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
8170
\put(281,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8174
\put(281,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8178
\put(281,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8182
\put(281,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8186
\put(281,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8190
\put(281,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8194
\put(281,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8198
\put(281,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8202
\put(300,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8206
\put(281,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8210
\put(300,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8214
\put(300,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8218
\put(308,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8222
\put(308,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8226
\put(308,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8230
\put(308,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8234
\put(308,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8238
\put(308,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
8242
\put(200,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8246
\put(200,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8250
\put(200,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8254
\put(200,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8258
\put(200,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8262
\put(200,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8266
\put(200,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8270
\put(200,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8274
\put(219,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8278
\put(200,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8282
\put(219,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8286
\put(219,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8290
\put(227,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8294
\put(227,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8298
\put(227,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8302
\put(227,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8306
\put(227,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8310
\put(227,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
8317
\caption{Internal representation of {\sf struct a \{ int a, int b, int
8318
c\};}}\label{internal17}
8323
\subsection{Internal representation of {\sf union}}
8326
The union type has the {\sf function\_class} {\em union}. Each field
8327
of the has its own subtype (see fig.~\ref{internal18}).
8331
{\setlength{\unitlength}{0.01250000in}%
8333
\begingroup\makeatletter\ifx\SetFigFont\undefined
8334
% extract first six characters in \fmtname
8335
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
8336
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
8337
\ifx\x\y % LaTeX or SliTeX?
8338
\gdef\SetFigFont#1#2#3{%
8339
\ifnum #1<17\tiny\else \ifnum #1<20\small\else
8340
\ifnum #1<24\normalsize\else \ifnum #1<29\large\else
8341
\ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
8342
\huge\fi\fi\fi\fi\fi\fi
8343
\csname #3\endcsname}%
8345
\gdef\SetFigFont#1#2#3{\begingroup
8346
\count@#1\relax \ifnum 25<\count@\count@25\fi
8347
\def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
8349
\csname \romannumeral\the\count@ pt\expandafter\endcsname
8350
\csname @\romannumeral\the\count@ pt\endcsname
8351
\csname #3\endcsname}%
8354
\begin{picture}(301,220)(28,352)
8356
\put( 84,556){\vector( 3, 1){ 27.600}}
8357
\put( 30,543){\line( 1, 0){ 54}}
8358
\put( 30,354){\framebox(54,216){}}
8359
\put(111,543){\line( 1, 0){ 54}}
8360
\put(111,516){\line( 1, 0){ 54}}
8361
\put(111,381){\line( 1, 0){ 54}}
8362
\put(125,489){\line( 1, 0){ 40}}
8363
\put(125,462){\line( 1, 0){ 40}}
8364
\put(125,435){\line( 1, 0){ 40}}
8365
\put(125,408){\line( 1, 0){ 40}}
8366
\put( 30,516){\line( 1, 0){ 54}}
8367
\put( 30,381){\line( 1, 0){ 54}}
8368
\put( 44,516){\line( 0,-1){135}}
8369
\put( 44,489){\line( 1, 0){ 40}}
8370
\put( 44,462){\line( 1, 0){ 40}}
8371
\put( 44,435){\line( 1, 0){ 40}}
8372
\put( 44,408){\line( 1, 0){ 40}}
8373
\put(125,516){\line( 0,-1){135}}
8374
\put(111,354){\framebox(54,216){}}
8375
\put(273,516){\line( 1, 0){ 54}}
8376
\put(273,381){\line( 1, 0){ 54}}
8377
\put(287,489){\line( 1, 0){ 40}}
8378
\put(287,462){\line( 1, 0){ 40}}
8379
\put(287,435){\line( 1, 0){ 40}}
8380
\put(246,529){\vector( 3, 4){ 25.080}}
8381
\put(273,543){\line( 1, 0){ 54}}
8382
\put(287,516){\line( 0,-1){135}}
8383
\put(273,354){\framebox(54,216){}}
8384
\put(287,408){\line( 1, 0){ 40}}
8385
\put(192,516){\line( 1, 0){ 54}}
8386
\put(192,381){\line( 1, 0){ 54}}
8387
\put(206,489){\line( 1, 0){ 40}}
8388
\put(206,462){\line( 1, 0){ 40}}
8389
\put(206,435){\line( 1, 0){ 40}}
8390
\put(165,529){\vector( 3, 4){ 25.080}}
8391
\put(192,543){\line( 1, 0){ 54}}
8392
\put(206,516){\line( 0,-1){135}}
8393
\put(192,354){\framebox(54,216){}}
8394
\put(206,408){\line( 1, 0){ 40}}
8395
\put( 57,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8399
\put( 57,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8403
\put( 57,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8407
\put( 65,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8411
\put( 65,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8415
\put( 65,440){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8419
\put( 65,451){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8423
\put( 65,478){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8427
\put( 65,467){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8431
\put( 65,494){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8435
\put( 66,507){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8439
\put(119,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8443
\put(119,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8447
\put(146,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8451
\put( 38,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8455
\put( 38,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8459
\put( 38,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8463
\put( 38,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8467
\put( 38,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8471
\put( 38,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8475
\put( 38,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8479
\put( 38,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8483
\put( 38,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8487
\put(119,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8491
\put(119,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8495
\put(138,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8499
\put(119,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8503
\put(119,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8507
\put(119,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8511
\put(119,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8515
\put(119,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8519
\put(138,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8523
\put(138,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8527
\put(146,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8531
\put(146,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8535
\put(146,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8539
\put(146,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8543
\put(146,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
8547
\put( 65,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
8551
\put(281,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8555
\put(281,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8559
\put(281,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8563
\put(281,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8567
\put(281,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8571
\put(281,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8575
\put(281,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8579
\put(281,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8583
\put(300,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8587
\put(281,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8591
\put(300,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8595
\put(300,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8599
\put(308,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8603
\put(308,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8607
\put(308,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8611
\put(308,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8615
\put(308,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
8619
\put(200,381){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8623
\put(200,437){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8627
\put(200,502){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8631
\put(200,486){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8635
\put(200,470){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8639
\put(200,454){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8643
\put(200,421){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8647
\put(200,392){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8651
\put(219,359){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8655
\put(200,405){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8659
\put(219,548){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8663
\put(219,521){\makebox(0,0)[b]{\SetFigFont{11}{13.2}{rm}%
8667
\put(227,424){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8671
\put(227,413){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8675
\put(227,494){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8679
\put(227,467){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8683
\put(227,386){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
8687
\put(227,440){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8691
\put(308,440){\makebox(0,0)[b]{\SetFigFont{8}{9.6}{rm}%
8698
\caption{Internal representation of {\sf union a \{ int a, float b,
8699
double c\};}}\label{internal18}
8704
\section{Coding of C-language subset of type and export type}
8707
{\bf Note:} not implemented yet.
8710
There is a bit for input and a bit for output. The both bits indicate
8711
present of input and output structure, respectively. The first 32 bits
8712
after current 32 bits is an output member. The structure member domain
8713
indicate how many 32-bit words are reserved for the domain
8714
information. Currently, domain information are 2 32-bit words for
8715
arrays and a 32-bit word for enumeration type. The structure member
8716
arit\_class defines an atomary type. The structure member export\_type
8717
indicates if the type should be exported. The structure member
8718
function\_class has only two options local and remote, now. The
8719
structure member arity indicates the distance in number of 32-bit
8720
words to the continuing of the structure.
8722
We propose this arrangements of bits:
8727
\begin{tabular}{|c|c|l|}\hline
8728
bit & \# of bits & name \\ \hline \hline
8729
0 & (1) & input \\ \hline
8730
1 & (1) & output \\ \hline
8731
2-4 & (3) & domain \\ \hline
8732
5-7 & (3) & memory\_size \\ \hline
8733
8-13 & (6) & arit\_class \\ \hline
8734
14 & (1) & export\_type \\ \hline
8735
15-19 & (5) & function\_class \\ \hline
8736
20-29 & (10) & arity \\
8738
0-29 & (30) & $\sum$ \\ \hline
8742
We use 30 bits of each 32 bit word. 2 bits are left unused.
8744
Example of \verb|extern int a(int b, int c[][10], ....)...| is in the
8745
figure~\ref{cod_tree} and bit representation in the following table
8746
(note that \verb|[]| is internally represented as -2,
8750
{\setlength{\unitlength}{0.01250000in}%
8752
\begingroup\makeatletter\ifx\SetFigFont\undefined
8753
% extract first six characters in \fmtname
8754
\def\x#1#2#3#4#5#6#7\relax{\def\x{#1#2#3#4#5#6}}%
8755
\expandafter\x\fmtname xxxxxx\relax \def\y{splain}%
8756
\ifx\x\y % LaTeX or SliTeX?
8757
\gdef\SetFigFont#1#2#3{%
8758
\ifnum #1<17\tiny\else \ifnum #1<20\small\else
8759
\ifnum #1<24\normalsize\else \ifnum #1<29\large\else
8760
\ifnum #1<34\Large\else \ifnum #1<41\LARGE\else
8761
\huge\fi\fi\fi\fi\fi\fi
8762
\csname #3\endcsname}%
8764
\gdef\SetFigFont#1#2#3{\begingroup
8765
\count@#1\relax \ifnum 25<\count@\count@25\fi
8766
\def\x{\endgroup\@setsize\SetFigFont{#2pt}}%
8768
\csname \romannumeral\the\count@ pt\expandafter\endcsname
8769
\csname @\romannumeral\the\count@ pt\endcsname
8770
\csname #3\endcsname}%
8773
\begin{picture}(520,524)(28,313)
8775
\put(465,450){\line( 1, 0){ 6}}
8776
\put(471,450){\line( 0,-1){ 57}}
8777
\put(471,393){\line(-1, 0){ 33}}
8778
\put(438,393){\vector( 0,-1){ 18}}
8779
\put(414,315){\framebox(51,60){}}
8780
\put(414,345){\line( 1, 0){ 51}}
8781
\put(438,354){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
8785
\put(438,324){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
8789
\put(464,580){\vector( 3, 4){ 24.360}}
8790
\put( 56,619){\vector( 0,-1){ 25}}
8791
\put( 81,810){\vector( 3, 1){ 26.400}}
8792
\put(107,797){\line( 1, 0){ 51}}
8793
\put(107,772){\line( 1, 0){ 51}}
8794
\put(107,645){\line( 1, 0){ 51}}
8795
\put(120,772){\line( 0,-1){127}}
8796
\put(120,746){\line( 1, 0){ 38}}
8797
\put(120,721){\line( 1, 0){ 38}}
8798
\put(120,696){\line( 1, 0){ 38}}
8799
\put(120,670){\line( 1, 0){ 38}}
8800
\put(158,784){\vector( 3, 4){ 23.400}}
8801
\put(234,784){\vector( 3, 4){ 23.760}}
8802
\put(311,784){\vector( 3, 4){ 23.400}}
8803
\put(209,823){\line( 0, 1){ 12}}
8804
\put(209,835){\line( 1, 0){229}}
8805
\put(438,835){\vector( 0,-1){216}}
8806
\put(107,619){\framebox(51,204){}}
8807
\put(183,797){\line( 1, 0){ 51}}
8808
\put(183,772){\line( 1, 0){ 51}}
8809
\put(183,645){\line( 1, 0){ 51}}
8810
\put(183,619){\framebox(51,204){}}
8811
\put(196,772){\line( 0,-1){127}}
8812
\put(196,746){\line( 1, 0){ 38}}
8813
\put(196,721){\line( 1, 0){ 38}}
8814
\put(196,696){\line( 1, 0){ 38}}
8815
\put(196,670){\line( 1, 0){ 38}}
8816
\put(209,619){\vector( 0,-1){ 25}}
8817
\put(260,797){\line( 1, 0){ 51}}
8818
\put(260,772){\line( 1, 0){ 51}}
8819
\put(260,645){\line( 1, 0){ 51}}
8820
\put(260,619){\framebox(51,204){}}
8821
\put(273,772){\line( 0,-1){127}}
8822
\put(273,746){\line( 1, 0){ 38}}
8823
\put(273,721){\line( 1, 0){ 38}}
8824
\put(273,696){\line( 1, 0){ 38}}
8825
\put(273,670){\line( 1, 0){ 38}}
8826
\put(336,797){\line( 1, 0){ 51}}
8827
\put(336,772){\line( 1, 0){ 51}}
8828
\put(336,645){\line( 1, 0){ 51}}
8829
\put(336,619){\framebox(51,204){}}
8830
\put(349,772){\line( 0,-1){127}}
8831
\put(349,746){\line( 1, 0){ 38}}
8832
\put(349,721){\line( 1, 0){ 38}}
8833
\put(349,696){\line( 1, 0){ 38}}
8834
\put(349,670){\line( 1, 0){ 38}}
8835
\put(413,594){\line( 1, 0){ 51}}
8836
\put(413,568){\line( 1, 0){ 51}}
8837
\put(413,441){\line( 1, 0){ 51}}
8838
\put(413,415){\framebox(51,204){}}
8839
\put(426,568){\line( 0,-1){127}}
8840
\put(426,543){\line( 1, 0){ 38}}
8841
\put(426,517){\line( 1, 0){ 38}}
8842
\put(426,492){\line( 1, 0){ 38}}
8843
\put(426,466){\line( 1, 0){ 38}}
8844
\put(489,594){\line( 1, 0){ 51}}
8845
\put(489,568){\line( 1, 0){ 51}}
8846
\put(489,441){\line( 1, 0){ 51}}
8847
\put(489,415){\framebox(51,204){}}
8848
\put(502,568){\line( 0,-1){127}}
8849
\put(502,543){\line( 1, 0){ 38}}
8850
\put(502,517){\line( 1, 0){ 38}}
8851
\put(502,492){\line( 1, 0){ 38}}
8852
\put(502,466){\line( 1, 0){ 38}}
8853
\put( 30,797){\line( 1, 0){ 51}}
8854
\put( 30,772){\line( 1, 0){ 51}}
8855
\put( 30,645){\line( 1, 0){ 51}}
8856
\put( 30,619){\framebox(51,204){}}
8857
\put( 43,772){\line( 0,-1){127}}
8858
\put( 43,746){\line( 1, 0){ 38}}
8859
\put( 43,721){\line( 1, 0){ 38}}
8860
\put( 43,696){\line( 1, 0){ 38}}
8861
\put( 43,670){\line( 1, 0){ 38}}
8862
\put( 30,568){\line( 1, 0){ 51}}
8863
\put( 30,543){\line( 1, 0){ 51}}
8864
\put( 30,415){\line( 1, 0){ 51}}
8865
\put( 30,390){\framebox(51,204){}}
8866
\put( 43,543){\line( 0,-1){128}}
8867
\put( 43,517){\line( 1, 0){ 38}}
8868
\put( 43,492){\line( 1, 0){ 38}}
8869
\put( 43,466){\line( 1, 0){ 38}}
8870
\put( 43,441){\line( 1, 0){ 38}}
8871
\put(183,568){\line( 1, 0){ 51}}
8872
\put(183,543){\line( 1, 0){ 51}}
8873
\put(183,415){\line( 1, 0){ 51}}
8874
\put(183,390){\framebox(51,204){}}
8875
\put(196,543){\line( 0,-1){128}}
8876
\put(196,517){\line( 1, 0){ 38}}
8877
\put(196,492){\line( 1, 0){ 38}}
8878
\put(196,466){\line( 1, 0){ 38}}
8879
\put(196,441){\line( 1, 0){ 38}}
8880
\put(540,450){\line( 1, 0){ 6}}
8881
\put(546,450){\line( 0,-1){ 57}}
8882
\put(546,393){\line(-1, 0){ 33}}
8883
\put(513,393){\vector( 0,-1){ 18}}
8884
\put(489,315){\framebox(51,60){}}
8885
\put(489,345){\line( 1, 0){ 51}}
8886
\put(114,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8890
\put(114,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8894
\put(114,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8898
\put(114,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8902
\put(114,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8906
\put(114,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8910
\put(114,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8914
\put(114,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8918
\put(114,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8922
\put(132,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8926
\put(132,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8930
\put(140,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8934
\put(140,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
8938
\put(140,726){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
8942
\put(140,700){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
8946
\put(132,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8950
\put(209,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8954
\put(191,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8958
\put(191,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8962
\put(191,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8966
\put(191,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8970
\put(191,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8974
\put(191,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8978
\put(191,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8982
\put(191,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8986
\put(191,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8990
\put(209,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8994
\put(209,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
8998
\put(216,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9002
\put(216,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9006
\put(216,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9010
\put(216,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9014
\put(216,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9018
\put(216,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9022
\put(216,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9026
\put(285,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9030
\put(267,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9034
\put(267,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9038
\put(267,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9042
\put(267,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9046
\put(267,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9050
\put(267,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9054
\put(267,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9058
\put(267,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9062
\put(267,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9066
\put(285,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9070
\put(285,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9074
\put(293,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9078
\put(293,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9082
\put(293,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9086
\put(293,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9090
\put(293,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9094
\put(293,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9098
\put(293,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9102
\put(362,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9106
\put(344,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9110
\put(344,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9114
\put(344,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9118
\put(344,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9122
\put(344,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9126
\put(344,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9130
\put(344,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9134
\put(344,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9138
\put(344,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9142
\put(362,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9146
\put(362,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9150
\put(369,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9154
\put(369,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9158
\put(369,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9162
\put(369,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9166
\put(369,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9170
\put(369,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9174
\put(369,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9178
\put(438,420){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9182
\put(420,555){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9186
\put(420,540){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9190
\put(420,525){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9194
\put(420,510){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9198
\put(420,495){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9202
\put(420,479){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9206
\put(420,464){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9210
\put(420,451){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9214
\put(420,441){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9218
\put(438,598){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9222
\put(438,573){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9226
\put(446,481){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9230
\put(446,471){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9234
\put(446,446){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9238
\put(446,497){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9242
\put(446,507){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9246
\put(446,532){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9250
\put(446,522){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9254
\put(515,420){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9258
\put(497,555){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9262
\put(497,540){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9266
\put(497,525){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9270
\put(497,510){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9274
\put(497,495){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9278
\put(497,479){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9282
\put(497,464){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9286
\put(497,451){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9290
\put(497,441){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9294
\put(515,598){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9298
\put(515,573){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9302
\put(522,481){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9306
\put(522,471){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9310
\put(522,446){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9314
\put(522,497){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9318
\put(522,507){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9322
\put(522,532){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9326
\put(522,522){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9330
\put( 56,624){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9334
\put( 38,759){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9338
\put( 38,744){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9342
\put( 38,729){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9346
\put( 38,713){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9350
\put( 38,697){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9354
\put( 38,682){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9358
\put( 38,667){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9362
\put( 38,655){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9366
\put( 38,645){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9370
\put( 56,802){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9374
\put( 56,777){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9378
\put( 63,685){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9382
\put( 63,675){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9386
\put( 63,649){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9390
\put( 63,700){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9394
\put( 63,711){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9398
\put( 63,736){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9402
\put( 63,726){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9406
\put( 63,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9410
\put(216,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9414
\put(293,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9418
\put(369,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9422
\put(446,547){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9426
\put(522,547){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9430
\put( 63,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9434
\put(141,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9438
\put(216,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9442
\put(294,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9446
\put(369,762){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9450
\put(447,558){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9454
\put(522,558){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9458
\put(140,649){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
9462
\put( 56,395){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9466
\put( 38,426){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9470
\put( 38,530){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9474
\put( 38,514){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9478
\put( 38,499){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9482
\put( 38,484){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9486
\put( 38,469){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9490
\put( 38,453){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9494
\put( 38,438){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9498
\put( 38,415){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9502
\put( 56,573){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9506
\put( 56,547){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9510
\put( 63,456){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9514
\put( 63,446){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9518
\put( 63,471){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
9522
\put(209,395){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9526
\put(191,426){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9530
\put(191,530){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9534
\put(191,514){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9538
\put(191,499){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9542
\put(191,484){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9546
\put(191,469){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9550
\put(191,453){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9554
\put(191,438){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9558
\put(191,415){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9562
\put(209,573){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9566
\put(209,547){\makebox(0,0)[b]{\SetFigFont{10}{12.0}{rm}%
9570
\put(216,456){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9574
\put(216,446){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9578
\put(216,522){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
9582
\put(216,497){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
9586
\put(216,471){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
9590
\put( 63,420){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
9594
\put(216,420){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
9598
\put(140,751){\makebox(0,0)[b]{\SetFigFont{5}{6.0}{rm}%
9602
\put( 63,497){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
9606
\put( 63,522){\makebox(0,0)[b]{\SetFigFont{9}{10.8}{rm}%
9610
\put(513,354){\makebox(0,0)[lb]{\SetFigFont{12}{14.4}{rm}%
9614
\put(513,324){\makebox(0,0)[b]{\SetFigFont{12}{14.4}{rm}%
9621
\caption{Internal type representation of function in form
9622
{\sf extern int a(int b, int c[][10], ....)...}}\label{cod_tree}
9628
\begin{tabular}{|c|c|c|c|c|c|c|c||c|c|c|c|c|c|c|c|||c|c|c|c|c|c|c|c||c|c|c|c|c|c|c|c|}
9629
31 & & & & & & & 24 & & & & & & & & & 15 & & & & & & & & 7 & & & & & & & 0 \\
9631
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0
9632
& 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 1 \\
9634
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 1
9635
& 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
9637
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0
9638
& 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
9640
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0
9641
& 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 1 \\
9643
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0
9644
& 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
9646
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 1 & 0 & 0 & 0 & 0 & 0 & 0
9647
& 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\
9649
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0
9650
& 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
9652
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1
9653
& 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 0 \\
9655
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0
9656
& 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\
9658
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0
9659
& 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
9661
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0
9662
& 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 1 & 0 \\
9664
\multicolumn{32}{|c|}{$\ldots$} \\ \hline
9668
% 10 deca = 1010 bin
9670
% 1000 bin is used in the 4-th row as an arity (it means number of 32
9671
% bit words to jump)
9672
% 1010 bin is used in the last row as an arity
9674
\section{Notes to the implementation of internal types}
9676
Each type is copied when it is defined in structure, union, or
9677
enumeration. It is copied only in one level (not recursive). The
9678
reason is that the {\sf field\_name} is assigned to the types in
9679
aggregate. Each field has to have its own representation of the type.
9681
For deallocation of types, cyclic definition must be checked to avoid
9684
Pointers to aggregates should be the same. There is only one instance
9685
of each type. If the similar aggregate is declared more than once it
9686
is considered to be not compatible. (In the figure~\ref{internal19},
9687
it is a real example of the following structure definition:
9694
where the {\sf c} structure is:
9704
\psfig{figure=reccycla.ps,width=15.4cm,angle=-90}
9705
\caption{Recursive structure declaration}\label{internal19}
9709
\chapter{Files of the \CiF}
9711
The following sections describe the goal of some important files.
9713
\section{File `allocx.c'}\index{file!allocx.c}
9715
Basic allocation functions.
9718
\item[allocate (size, pool)]\index{function!allocate@{\sf allocate}}\index{allocate@{\sf allocate}}
9719
memory of size {\sf size}, from the pool {\sf pool}. Return pointer
9720
to the allocated memory.
9722
(pool)]\index{function!deallocate@{\sf deallocate}}\index{deallocate@{\sf deallocate}}
9723
memory of {\sf pool}. It is stored to list and if the memory is
9724
needed again it is simply taken from this list.
9725
\item[init\_zero (pointer,
9726
size)]\index{function!init\_zero@{\sf init\_zero}}\index{init\_zero@{\sf init\_zero}}
9727
memory pointed to by pointer is initialized to zeroes.
9730
\item[reallocx] just wrappers for allocation.
9733
There are only two different {\sf pool} now: {\bf
9734
PERM}\index{macro!PERM@{\bf PERM}}\index{PERM@{\bf PERM}} and {\bf
9735
BLOCK}\index{macro!BLOCK@{\bf BLOCK}}\index{BLOCK@{\bf BLOCK}}.
9737
\section{File `comp\_maint.c'}\index{file!comp\_maint.c}
9742
\item[info]\index{function!info@{\sf info}} \index{info@{\sf info}} is
9743
printed if verbose is specified on the command line.
9744
\item[clif]\index{function!clif@{\sf clif}} \index{clif@{\sf clif}}
9745
main function. It parses command line options, initializes memory,
9746
sets proper input\index{input} function for scanner and starts parser.
9747
\item[brfix]\index{function!brfix@{\sf brfix}} \index{brfix@{\sf brfix}}
9748
{\sf break}\index{statement!break@{\sf break}}
9749
fixation\index{fixation}.
9750
\item[cofix]\index{function!cofix@{\sf cofix}} \index{cofix@{\sf cofix}}
9751
{\sf continue}\index{statement!continue@{\sf continue}}
9752
fixation\index{fixation}.
9753
\item[retfix]\index{function!retfix@{\sf retfix}} \index{retfix@{\sf retfix}}
9754
{\sf return}\index{statement!return@{\sf return}}
9755
fixation\index{fixation}.
9756
\item[fix\_cont\_w]\index{function!fix\_cont\_w@{\sf fix\_cont\_w}}
9757
\index{fix\_cont\_w@{\sf fix\_cont\_w}} fixation\index{fixation} of
9758
{\sf continue}\index{statement!continue@{\sf continue}} in {\sf
9759
while}\index{statement!while@{\sf while}}.
9760
\item[fix\_cont\_f]\index{function!fix\_cont\_f@{\sf fix\_cont\_f}}
9761
\index{fix\_cont\_f@{\sf fix\_cont\_f}} fixation\index{fixation} of
9762
{\sf continue}\index{statement!continue@{\sf continue}} in {\sf
9763
for}\index{statement!for@{\sf for}}.
9764
\item[fix\_break\_w]\index{function!fix\_break\_w@{\sf fix\_break\_w}}
9765
\index{fix\_break\_w@{\sf fix\_break\_w}} fixation\index{fixation}
9766
of {\sf break}\index{statement!break@{\sf break}} in {\sf
9767
while}\index{statement!while@{\sf while}}.
9768
\item[fix\_break\_f]\index{function!fix\_break\_f@{\sf fix\_break\_f}}
9769
\index{fix\_break\_f@{\sf fix\_break\_f}} fixation\index{fixation}
9770
of {\sf break}\index{statement!break@{\sf break}} in {\sf
9771
for}\index{statement!for@{\sf for}}.
9772
\item[fix\_ret]\index{function!fix\_ret@{\sf fix\_ret}}
9773
\index{fix\_ret@{\sf fix\_ret}} Backpatching of the return address
9774
for {\sf return}\index{statement!return@{\sf return}} in function.
9775
\item[fix\_break\_s]\index{function!fix\_break\_s@{\sf fix\_break\_s}}
9776
\index{fix\_break\_s@{\sf fix\_break\_s}} Backpatching of the
9777
address for {\sf break}\index{statement!break@{\sf break}} in {\sf
9779
\item[init]\index{function!init@{\sf init}} \index{init@{\sf init}}
9780
initialization of \CiF\index{memory}.
9781
\item[implicit\_cast]\index{function!implicit\_cast@{\sf implicit\_cast}}
9782
\index{implicit\_cast@{\sf implicit\_cast}} check if an implicit
9783
cast in an expression is needed.
9784
\item[l\_value\_cast]\index{function!l\_value\_cast@{\sf l\_value\_cast}}
9785
\index{l\_value\_cast@{\sf l\_value\_cast}} check if a cast to \cl
9786
l\_value \r\ is needed.
9787
\item[pointer\_cast]\index{function!pointer\_cast@{\sf pointer\_cast}}
9788
\index{pointer\_cast@{\sf pointer\_cast}} check for pointer casts in
9789
\cl l\_value \r\ is needed. Issues appropriate error message.
9790
\item[array\_subscript]\index{function!array\_subscript@{\sf array\_subscript}}
9791
\index{array\_subscript@{\sf array\_subscript}} initialization of
9792
the {\sf dim} variable with subscripts according to the array
9794
\item[put\_array\_subscript]\index{function!put\_array\_subscript@{\sf put\_array\_subscript}}
9795
\index{put\_array\_subscript@{\sf put\_array\_subscript}} store
9796
subscripts in {\sf internal\_type} structure.\index{type!internal}
9797
\item[ERR\_NO\_INFO]\index{macro!ERR\_NO\_INFO@{\bf ERR\_NO\_INFO}}
9798
\index{ERR\_NO\_INFO@{\bf ERR\_NO\_INFO}}
9799
\item[ERROR\_INFO]\index{macro!ERROR\_INFO@{\bf ERROR\_INFO}}
9800
\index{ERROR\_INFO@{\bf ERROR\_INFO}}
9801
\item[ERROR\_FULL\_INFO]\index{macro!ERROR\_FULL\_INFO@{\bf ERROR\_FULL\_INFO}}
9802
\index{ERROR\_FULL\_INFO@{\bf ERROR\_FULL\_INFO}} formatting macros
9804
\item[error\_message]\index{function!error\_message@{\sf error\_message}}
9805
\index{error\_message@{\sf error\_message}} according to the number
9806
send, print the error message.\index{error}
9807
\item[print\_file\_name]\index{function!print\_file\_name@{\sf print\_file\_name}}
9808
\index{print\_file\_name@{\sf print\_file\_name}}
9809
\item[print\_source\_line]\index{function!print\_source\_line@{\sf print\_source\_line}}
9810
\index{print\_source\_line@{\sf print\_source\_line}}
9811
\item[print\_error\_number]\index{function!print\_error\_number@{\sf print\_error\_number}}
9812
\index{print\_error\_number@{\sf print\_error\_number}}
9813
\item[print\_line\_number]\index{function!print\_line\_number@{\sf print\_line\_number}}
9814
\index{print\_line\_number@{\sf print\_line\_number}} functions
9815
formatting error messages.
9816
\item[type2string]\index{function!type2string@{\sf type2string}}
9817
\index{type2string@{\sf type2string}} converts internal type to
9818
string representation for error messages.
9819
\item[type\_transform]\index{function!type\_transform@{\sf type\_transform}}
9820
\index{type\_transform@{\sf type\_transform}} transformation of type.
9821
It is used when the intrinsic (remote)
9822
functions\index{function!intrinsic} are called.
9823
\item[add\_to\_spec\_list]\index{function!add\_to\_spec\_list@{\sf add\_to\_spec\_list}}
9824
\index{add\_to\_spec\_list@{\sf add\_to\_spec\_list}} create list of
9825
specifiers of function declaration and/or definition to the {\sf
9826
internal\_type}\index{type!internal} structure. This function is
9827
used during structure definition as well.
9828
\item[add\_to\_ident\_list]\index{function!add\_to\_ident\_list@{\sf add\_to\_ident\_list}}
9829
\index{add\_to\_ident\_list@{\sf add\_to\_ident\_list}} create list
9830
of identifiers during the function declaration and/or definition.
9831
\item[compare2trees]\index{function!compare2trees@{\sf compare2trees}}
9832
\index{compare2trees@{\sf compare2trees}} compare two trees for
9833
equality. Check if the definition of the function corresponds with
9835
\item[copy\_type]\index{function!copy\_type@{\sf copy\_type}}
9836
\index{copy\_type@{\sf copy\_type}} copy {\sf
9837
internal\_type}\index{type!internal} structure. It is used during
9838
function declaration and/or definition and structure definition. We
9839
need a copy because the type can be slowly added, i.e. on one line
9840
can be more identifiers such as simple variables, arrays, function
9841
prototypes and all of them have slightly different representation.
9842
\item[add\_subs\_to\_spec\_list]\index{function!add\_subs\_to\_spec\_list@{\sf
9843
add\_subs\_to\_spec\_list}}
9844
\index{add\_subs\_to\_spec\_list@{\sf add\_subs\_to\_spec\_list}}
9845
create {\sf internal\_type}\index{type!internal} for function
9846
declaration if only type specifier and range of array were in the
9848
\item[clear\_internal\_type]\index{function!clear\_internal\_type@{\sf clear\_internal\_type}}
9849
\index{clear\_internal\_type@{\sf clear\_internal\_type}} clear
9850
internal type\index{type!internal}.
9851
\item[search\_duplicate\_labels]\index{function!search\_duplicate\_labels@{\sf
9852
search\_duplicate\_labels}}
9853
\index{search\_duplicate\_labels@{\sf search\_duplicate\_labels}}
9854
after each new label\index{label} declaration we need to check for
9856
\item[add\_constant\_to\_list]\index{function!add\_constant\_to\_list@{\sf
9857
add\_constant\_to\_list}}
9858
\index{add\_constant\_to\_list@{\sf add\_constant\_to\_list}} create
9859
list of constants of {\sf switch}\index{statement!switch@{\sf switch}}.
9860
\item[add\_default\_to\_fixp]\index{function!add\_default\_to\_fixp@{\sf
9861
add\_default\_to\_fixp}}
9862
\index{add\_default\_to\_fixp@{\sf add\_default\_to\_fixp}}the same as
9863
above but for default label; check for only one default.
9864
\item[func\_def\_s]\index{function!func\_def\_s@{\sf func\_def\_s}}
9865
\index{func\_def\_s@{\sf func\_def\_s}} Functions for setting and
9866
resetting of the flag of function definition or declaration context.
9867
\item[enter\_scope]\index{function!enter\_scope@{\sf enter\_scope}}
9868
\index{enter\_scope@{\sf enter\_scope}}
9869
\item[exit\_scope]\index{function!exit\_scope@{\sf exit\_scope}}
9870
\index{exit\_scope@{\sf exit\_scope}} functions changing scope (hash
9871
tables of locals)\index{hash!table} upon nesting level.
9872
\item[mov2lvalue]\index{function!mov2lvalue@{\sf mov2lvalue}}
9873
\index{mov2lvalue@{\sf mov2lvalue}}
9874
\item[move2lvalue]\index{function!move2lvalue@{\sf move2lvalue}}
9875
\index{move2lvalue@{\sf move2lvalue}} generate proper {\bf
9876
MOV}\index{instruction!MOV@{\bf MOV}} instruction.
9877
\item[type\_compare]\index{function!type\_compare@{\sf type\_compare}}
9878
\index{type\_compare@{\sf type\_compare}} compare if pointers are
9880
\item[cyclic\_def]\index{function!cyclic\_def@{\sf cyclic\_def}}
9881
\index{cyclic\_def@{\sf cyclic\_def}} find cycles in pointer
9882
definitions and declarations.
9883
\item[put2table]\index{function!put2table@{\sf put2table}}
9884
\index{put2table@{\sf put2table}} Combination of all hashing
9885
tables. Choose the appropriate one and put the variable there.
9886
\item[get\_num\_args]
9887
\index{function!get\_num\_args@{\sf get\_num\_args}}
9888
\index{get\_num\_args@{\sf get\_num\_args}} Number of args for a
9889
function is returned. This value is checked against number of actual
9890
parameters, if they are equal.
9891
\item[promote\_type]
9892
\index{function!promote\_type@{\sf promote\_type}}
9893
\index{promote\_type@{\sf promote\_type}} C-like type promotion.
9894
\item[start\_main] \index{function!start\_main@{\sf start\_main}}
9895
\index{start\_main@{\sf start\_main}} Arrange all things to start
9896
main function. Simulate a compiler like behavior.
9897
\item[check\_spec\_constr]
9898
\index{function!check\_spec\_constr@{\sf check\_spec\_constr}}
9899
\index{check\_spec\_constr@{\sf check\_spec\_constr}} Checks if
9900
specified type specifiers are valid. If not issues an error
9904
\section{File `control.h'}\index{file!control.h}
9906
See section~\ref{fixation} for full detail.
9908
\section{File `define.h'}\index{file!define.h}
9910
See section~\ref{memory} for full detail.
9912
\section{File `dbg-out.c'}\index{file!dbg-out.c}
9914
Debugging information generation and printing. The following functions
9915
are a simple interface for symbolic debugging.
9918
\item[store\_pos]\index{store\_pos@{\sf store\_pos}}
9919
\index{function!store\_pos@{\sf store\_pos}} Store line number and
9920
code pointer in the list. These data are only ones necessary during
9921
symbolic information output.
9922
\item[dbg\_create]\index{dbg\_create@{\sf dbg\_create}}
9923
\index{function!dbg\_create@{\sf dbg\_create}} Create a list of file
9924
names with pointers to the list of line number and code pointer (see
9926
\item[get\_pos]\index{get\_pos@{\sf get\_pos}}
9927
\index{function!get\_pos@{\sf get\_pos}} Restore line number from
9928
the list of code pointer and line number. The line number is chosen
9929
appropriately comparing to the current value of the program
9931
\item[dbg\_print]\index{dbg\_print@{\sf dbg\_print}}
9932
\index{function!dbg\_print@{\sf dbg\_print}} Print the currently
9936
\section{File `geninstr.h'}\index{file!geninstr.h}
9938
The implementation of generation of virtual machine instructions. The
9939
instructions are described in section~\ref{stroj}.
9941
\section{File `input.c'}\index{file!input.c}
9944
\item[input\_komp]\index{function!input\_komp@{\sf input\_komp}}
9945
\index{input\_komp@{\sf input\_komp}} the general input\index{input}
9947
\item[input\_std]\index{function!input\_std@{\sf input\_std}}
9948
\index{input\_std@{\sf input\_std}} this input function is used
9949
during the processing of an asynchronous or synchronous interrupt
9950
(see~\ref{int_service}).
9951
\item[input\_buf]\index{function!input\_buf@{\sf input\_buf}}
9952
\index{input\_buf@{\sf input\_buf}} during the processing of the
9953
compiler interrupt after the interrupt key is pressed again this
9954
input function sends to the compiler a keyword {\sf
9955
resume;}\index{statement!resume@{\sf resume}} the compilation
9956
resumes and the compiler input is reset to the {\sf input\_komp}
9958
\item[init\_input]\index{function!init\_input@{\sf init\_input}}
9959
\index{init\_input@{\sf init\_input}} this function opens files and
9960
stores the pointers to the globally known array. The files could be
9961
specified on the command line and/or in the `clif.ini' file.
9962
\item[terminate\_buffer]
9963
\index{function!terminate\_buffer@{\sf terminate\_buffer}}
9964
\index{terminate\_buffer@{\sf terminate\_buffer}} in flex, close
9965
file, reset line counter, reinitialize file attribute structure and
9970
{\bf Note:} The option to switch among several input functions and
9971
enable synchronous and asynchronous interrupts must be specified
9972
during the compilation of the \CiF\ (see~\ref{compiling_options}).
9974
\section{File `instr.h'}\index{file!instr.h}
9976
This file is declaration of different structures that are used in the
9977
virtual machine. Detailed description can be found in
9978
section~\ref{stroj} (see table~\ref{instructions}). Each field of
9979
structures is integer if it is not stated otherwise.
9982
\item[struct OPERAND\_0\_ma]
9983
\index{structure!OPERAND\_0\_ma@{\bf OPERAND\_0\_ma}}
9984
\index{OPERAND\_0\_ma@{\bf OPERAND\_0\_ma}} only major.
9985
\item[struct OPERAND\_0\_mi]
9986
\index{structure!OPERAND\_0\_mi@{\bf OPERAND\_0\_mi}}
9987
\index{OPERAND\_0\_mi@{\bf OPERAND\_0\_mi}} major and minor.
9988
\item[struct OPERAND\_1\_ma]
9989
\index{structure!OPERAND\_1\_ma@{\bf OPERAND\_1\_ma}}
9990
\index{OPERAND\_1\_ma@{\bf OPERAND\_1\_ma}} major and address as a
9992
\item[struct OPERAND\_1\_mi]
9993
\index{structure!OPERAND\_1\_mi@{\bf OPERAND\_1\_mi}}
9994
\index{OPERAND\_1\_mi@{\bf OPERAND\_1\_mi}} major, minor and address
9996
\item[struct OPERAND\_1\_i]
9997
\index{structure!OPERAND\_1\_i@{\bf OPERAND\_1\_i}}
9998
\index{OPERAND\_1\_i@{\bf OPERAND\_1\_i}} major, minor and number
9999
(immediately) integer.
10000
\item[struct OPERAND\_1\_id]
10001
\index{structure!OPERAND\_1\_id@{\bf OPERAND\_1\_id}}
10002
\index{OPERAND\_1\_id@{\bf OPERAND\_1\_id}} major, minor and number of
10003
type double (immediately double).
10004
\item[struct OPERAND\_1\_if]
10005
\index{structure!OPERAND\_1\_if@{\bf OPERAND\_1\_if}}
10006
\index{OPERAND\_1\_if@{\bf OPERAND\_1\_if}} major, minor and number of
10007
type float (immediately float).
10008
\item[struct OPERAND\_1\_ic]
10009
\index{structure!OPERAND\_1\_ic@{\bf OPERAND\_1\_ic}}
10010
\index{OPERAND\_1\_ic@{\bf OPERAND\_1\_ic}} major, minor and number of
10011
type char (immediately char).
10014
There are definitions of instructions major constants in the file as
10017
\section{File `keyword.gperf'}\index{file!keyword.gperf}
10019
The file is a template that has a list of keywords. The C source file
10020
is produced by \verb|gperf -t -p -k 2,3 ./keyword.gperf| command.
10022
\section{File `parser.h'}\index{file!parser.h}
10024
\begin{description}
10025
\item[param\_flag]\index{param\_flag@{\sf param\_flag}}
10026
\index{variable!param\_flag@{\sf param\_flag}} the variable
10027
is set during the parsing of parameters to function. Parameters have
10028
no such strong constraints as if they are used in expressions. For
10029
example, as a parameter can be used array name (pointer).
10030
\item[atom\_type\_flag]\index{atom\_type\_flag@{\sf atom\_type\_flag}}
10031
\index{variable!atom\_type\_flag@{\sf atom\_type\_flag}}
10032
variable that specialized if it is a pointer which is pushed as a
10033
parameter to a remote function (pointer to the array) or only a
10034
dereferenced variable of the type. It is used only for {\bf
10035
REMOTE\_F}\index{REMOTE\_F@{\bf REMOTE\_F}} type of
10036
function\index{function!type of}.
10037
\item[variable]\index{variable@{\sf variable}}
10038
\index{variable!variable@{\sf variable}} array of structures. The
10039
structure members are {\sf address, offset} and {\sf name}. The
10040
address (is a pointer to char) of the global variable currently on
10041
the stack\index{stack}. The offset\index{offset@{\sf offset}}
10042
(integer) is an address of local variable currently on the
10043
stack\index{stack}. It is offset to the current value of the {\bf
10044
BP}\index{BP@{\bf BP}}. The {\sf name} field is the name of the
10045
variable. It is an array because we have to know addresses of all
10046
variables currently in the expression. Depending on the context,
10047
either address or offset are non NULL, nonzero respectively. If the
10048
variable is global, the address is non NULL. If the variable is
10049
local, the offset is nonzero. If the local variable has storage
10050
class specifier {\sf static} the address is non NULL and the offset
10052
\item[it\_is\_in\_case]\index{it\_is\_in\_case@{\sf it\_is\_in\_case}}
10053
\index{variable!it\_is\_in\_case@{\sf it\_is\_in\_case}}
10054
It is always set when the case\index{statement!case@{\sf case}}
10055
statement is compiled.
10056
\item[jmp1]\index{jmp1@{\sf jmp1}}\index{variable!jmp1@{\sf jmp1}}
10057
Variable for fixing the beginning of code in {\sf
10058
for}\index{statement!for@{\sf for}} loop. The description can be
10059
found in section~\ref{fixation} and fig.~\ref{obr3}.
10060
\item[subscript\_flag]\index{subscript\_flag@{\sf subscript\_flag}}
10061
\index{variable!subscript\_flag@{\sf subscript\_flag}} The flag is
10062
set after the first subscript of an array was parsed. The first
10063
subscript needs special treatment. The variable is an array, i.e.
10064
{\sf subscript\_flag} has each variable currently on the stack. It
10065
is cleared by macro \index{macro!TYPE\_CLEAR@{\bf TYPE\_CLEAR}} {\bf
10066
TYPE\_CLEAR}\index{TYPE\_CLEAR@{\bf TYPE\_CLEAR}}.
10067
\item[is\_address]\index{is\_address@{\sf is\_address}}
10068
\index{variable!is\_address@{\sf is\_address}} It is set when the
10069
address operator\index{operator!address} was used in the current
10071
\item[struct\_union\_field]
10072
\index{struct\_union\_field@{\sf struct\_union\_field}}
10073
\index{variable!struct\_union\_field@{\sf struct\_union\_field}}
10074
The variable is set when structure\index{structure} or
10075
union\index{union} identifier is parsed. If there are more dots or
10076
pointer operators in the variable additional code must be generated.
10077
Each variable on the stack which currently parsed in expression has
10078
a {\sf struct\_union\_field}. This variable is reset by {\bf
10079
TYPE\_CLEAR}.\index{TYPE\_CLEAR@{\bf TYPE\_CLEAR}}
10080
\index{macro!TYPE\_CLEAR@{\bf TYPE\_CLEAR}}
10081
\item[or\_jmp]\index{or\_jmp@{\sf or\_jmp}}
10082
\index{variable!or\_jmp@{\sf or\_jmp}}
10083
\item[and\_jmp]\index{and\_jmp@{\sf and\_jmp}}
10084
\index{variable!and\_jmp@{\sf and\_jmp}} both are used for
10085
generation of jumps in expressions with \verb2||2 and \&\& operands.
10086
\verb2||2 expression is evaluated until a subexpression is true.
10087
\&\& is evaluated until a subexpression is false.
10088
\item[main\_defined]\index{main\_defined@{\sf main\_defined}}
10089
\index{variable!main\_defined@{\sf main\_defined}}
10090
set when the main function is defined.
10091
\item[initialize\_only]\index{initialize\_only@{\sf initialize\_only}}
10092
\index{variable!initialize\_only@{\sf initialize\_only}}
10093
set when there is a need for execution of initialization code of
10095
\item[full\_bracketing]\index{full\_bracketing@{\sf full\_bracketing}}
10096
\index{variable!full\_bracketing@{\sf full\_bracketing}}
10097
Flag for proper code generation for fully bracketed
10099
\item[aggregate\_memory\_size]
10100
\index{aggregate\_memory\_size@{\sf aggregate\_memory\_size}}
10101
\index{variable!aggregate\_memory\_size@{\sf aggregate\_memory\_size}}
10102
During initialization, the size of subtypes are remembered. The
10103
right number of initializers is checked. If the initialization was
10104
incomplete, zeros are added.
10105
\item[TYPE\_CLEAR]\index{TYPE\_CLEAR@{\bf TYPE\_CLEAR}}
10106
\index{macro!TYPE\_CLEAR@{\bf TYPE\_CLEAR}} macro that resets the
10107
following variables: {\sf subscript\_flag, struct\_union\_field,
10108
type, type\_com}\index{subscript\_flag@{\sf subscript\_flag}}
10109
\index{struct\_union\_field@{\sf struct\_union\_field}} \index{type}
10110
\index{type\_com@{\sf type\_com}}
10111
\item[SET\_ADDRESS]\index{SET\_ADDRESS@{\bf SET\_ADDRESS}}
10112
\index{macro!SET\_ADDRESS@{\bf SET\_ADDRESS}} macro that resets {\sf
10113
variable}\index{variable@{\sf variable}}
10114
\index{variable!variable@{\sf variable}} and {\sf
10115
offset}\index{offset@{\sf offset}} variables.
10116
\item[FUNCTION\_PROLOGUE]
10117
\index{macro!FUNCTION\_PROLOGUE@{\bf FUNCTION\_PROLOGUE}}
10118
\index{FUNCTION\_PROLOGUE@{\bf FUNCTION\_PROLOGUE}} it generates
10119
code for function prologue.
10120
\item[FUNCTION\_EPILOGUE]
10121
\index{macro!FUNCTION\_EPILOGUE@{\bf FUNCTION\_EPILOGUE}}
10122
\index{FUNCTION\_EPILOGUE@{\bf FUNCTION\_EPILOGUE}} it generates
10123
code for function epilogue.
10124
\item[DELETE\_SUBSCRIPT]
10125
\index{macro!DELETE\_SUBSCRIPT@{\bf DELETE\_SUBSCRIPT}}
10126
\index{DELETE\_SUBSCRIPT@{\bf DELETE\_SUBSCRIPT}} runs code for
10127
deleting dimensions. The variable is used for generating proper
10128
offset of array\index{array!dimension} variable in parsing
10129
expression. The dimensions stored in this variable are needed for
10130
computing of map function and map instructions of virtual machine
10131
\index{virtual machine} for variable of the type array.
10132
\item[OFFSET\_LAST\_ADD]
10133
\index{macro!OFFSET\_LAST\_ADD@{\bf OFFSET\_LAST\_ADD}}
10134
\index{OFFSET\_LAST\_ADD@{\bf OFFSET\_LAST\_ADD}} generates last
10135
instructions after variable dereferencing structure and/or union was
10136
parsed. The special code is needed when the variable has more than
10137
one dereferencing operator.
10138
\item[OFFSET\_LAST\_ADD\_ARRAY]
10139
\index{macro!OFFSET\_LAST\_ADD\_ARRAY@{\bf OFFSET\_LAST\_ADD\_ARRAY}}
10140
\index{OFFSET\_LAST\_ADD\_ARRAY@{\bf OFFSET\_LAST\_ADD\_ARRAY}}
10141
generates instructions after variable dereferencing structure and/or
10142
union was parsed and the last dereference was an array. The special
10143
code is needed when the variable has more than one dereferencing
10145
\item[ERROR\_P]\index{macro!ERROR\_P@{\bf ERROR\_P}}
10146
\index{ERROR\_P@{\sf ERROR\_P}} if there were errors don't do
10147
semantic, just check syntax.
10148
\item[MOV\_P]\index{macro!MOV\_P@{\bf MOV\_P}}
10149
\index{MOV\_P@{\bf MOV\_P}} test if the last generated instruction
10151
\item[POPA\_P]\index{macro!POPA\_P@{\bf POPA\_P}}
10152
\index{POPA\_P@{\bf POPA\_P}} test if the last generated instruction
10154
\item[PUSHA\_P]\index{macro!PUSHA\_P@{\bf PUSHA\_P}}
10155
\index{PUSHA\_P@{\bf PUSHA\_P}} test if the last generated
10156
instruction was {\bf PUSHA\_P}.
10157
\item[RESET\_CODE\_GENERATION\_BEGINNING]
10158
\index{macro!RESET\_CODE\_GENERATION\_BEGINNING@{\bf RESET\_CODE\_GENERATION\_BEGINNING}}
10159
\index{RESET\_CODE\_GENERATION\_BEGINNING@{\bf RESET\_CODE\_GENERATION\_BEGINNING}}
10160
do not fill up the memory continuously. Reset to beginning of the
10161
memory, if possible.
10162
\item[SET\_CODE\_GENERATION\_BEGINNING]
10163
\index{macro!SET\_CODE\_GENERATION\_BEGINNING@{\bf SET\_CODE\_GENERATION\_BEGINNING}}
10164
\index{SET\_CODE\_GENERATION\_BEGINNING@{\bf SET\_CODE\_GENERATION\_BEGINNING}}
10165
if variables are defined, set new memory beginning.
10168
\section{File `pso.c'}\index{file!pso.c}
10170
Parser support functions.
10172
\begin{description}
10173
\item[lookup\_tables]
10174
\index{function!lookup\_tables@{\sf lookup\_tables}}
10175
\index{lookup\_tables@{\sf lookup\_tables}} lookup in tables of
10176
local variables, if the variable is not found in the table of global
10177
variables. Setting of addresses for code generation.
10178
\item[typedef\_copy]
10179
\index{function!typedef\_copy@{\sf typedef\_copy}}
10180
\index{typedef\_copy@{\sf typedef\_copy}} internal type for {\sf
10181
typedef} must be copied, if there is no type specifier directly
10182
following the typedef (considering internal type tree (see
10183
fig.~\ref{internal14})), i.e. pointer, array, function, array,
10185
\item[set\_memory\_size]
10186
\index{function!set\_memory\_size@{\sf set\_memory\_size}}
10187
\index{set\_memory\_size@{\sf set\_memory\_size}} for cast operator
10188
the memory size must be set.
10191
\section{File `s-conv.c'}\index{file!s-conv.c}
10193
Functions in the file manipulate format strings and check arguments to
10194
printf and scanf class of functions.
10196
\begin{description}
10197
\item[s\_conv]\index{function!s\_conv@{\sf s\_conv}}
10198
\index{s\_conv@{\sf s\_conv}} checks format string and emits error
10200
\item[store\_arg\_type]
10201
\index{function!store\_arg\_type@{\sf store\_arg\_type}}
10202
\index{store\_arg\_type@{\sf store\_arg\_type}}
10203
Types of arguments are stored in the array for later checking.
10204
\item[compare\_format\_args]
10205
\index{function!compare\_format\_args@{\sf compare\_format\_args}}
10206
\index{compare\_format\_args@{\sf compare\_format\_args}}
10207
Checks if the argument is compatible with the specified format.
10210
\section{File `s-conv.h'}\index{file!s-conv.h}
10212
\begin{description}
10213
\item[PRINTF\_P] \index{macro!PRINTF\_P@{\bf PRINTF\_P}}
10214
\index{PRINTF\_P@{\bf PRINTF\_P}}
10215
\item[SCANF\_P] \index{macro!SCANF\_P@{\bf SCANF\_P}}
10216
\index{SCANF\_P@{\bf SCANF\_P}} checks for printf and scanf class of
10217
function call parsing.
10220
\section{File `tables.c'}\index{file!tables.c}
10222
Functions in this file set, process, change and clear information in
10225
\begin{description}
10226
\item[hastab]\index{hastab@{\sf hastab}}
10227
\index{variable!hastab@{\sf hastab}} see~\ref{storage_and_hash}
10228
\item[hastab\_goto]\index{hastab\_goto@{\sf hastab\_goto}}
10229
\index{variable!hastab\_goto@{\sf hastab\_goto}}
10230
see~\ref{fixation}.
10231
\item[hastab\_type]\index{hastab\_type@{\sf hastab\_type}}
10232
\index{variable!hastab\_type@{\sf hastab\_type}}
10233
see~\ref{storage_and_hash}.
10234
\item[typetab]\index{typetab@{\sf typetab}}
10235
\index{variable!typetab@{\sf typetab}}
10236
see~\ref{storage_and_hash}.
10237
\item[identtab]\index{identtab@{\sf identtab}}
10238
\index{variable!identtab@{\sf identtab}}
10239
see~\ref{storage_and_hash}.
10240
\item[identtab\_loc]\index{identtab\_loc@{\sf identtab\_loc}}
10241
\index{variable!identtab\_loc@{\sf identtab\_loc}}
10242
see~\ref{storage_and_hash}.
10243
\item[pi]\index{pi@{\sf pi}} \index{variable!pi@{\sf pi}} counter of
10244
globally declared variables, used as a subscript to the {\sf
10246
\item[pi\_type]\index{pi\_type@{\sf pi\_type}}
10247
\index{variable!pi\_type@{\sf pi\_type}} counter of globally
10248
declared types, used as a subscript to the {\sf typetab} array.
10249
\item[integer\_cons]\index{integer\_cons@{\sf integer\_cons}}
10250
\index{variable!integer\_cons@{\sf integer\_cons}} default
10251
integer for {\sf arit\_class} (see~\ref{internal_type}).
10252
\item[doub\_cons]\index{doub\_cons@{\sf doub\_cons}}
10253
\index{variable!doub\_cons@{\sf doub\_cons}} default double
10254
for {\sf arit\_class} (see~\ref{internal_type}).
10255
\item[flt\_cons]\index{flt\_cons@{\sf flt\_cons}}
10256
\index{variable!flt\_cons@{\sf flt\_cons}} default float for
10257
{\sf arit\_class} (see~\ref{internal_type}).
10258
\item[chr\_cons]\index{chr\_cons@{\sf chr\_cons}}
10259
\index{variable!chr\_cons@{\sf chr\_cons}} default char for
10260
{\sf arit\_class} (see~\ref{internal_type}).
10261
\item[vid\_cons]\index{vid\_cons@{\sf vid\_cons}}
10262
\index{variable!vid\_cons@{\sf vid\_cons}} default void for
10263
{\sf arit\_class} (see~\ref{internal_type}).
10264
\item[type]\index{type} \index{variable!type@{\sf type}} the type used
10265
in expressions to control the generation of proper instructions. The
10266
variable has the same type as a {\sf arit\_class} in the internal
10267
type structure\index{type!internal}.
10268
\item[hastab\_init]\index{hastab\_init@{\sf hastab\_init}}
10269
\index{function!hastab\_init@{\sf hastab\_init}}
10270
initialization of the hash table\index{table!hashing} for global
10272
\item[hastab\_goto\_init]
10273
\index{function!hastab\_goto\_init@{\sf hastab\_goto\_init}}
10274
\index{hastab\_goto\_init@{\sf hastab\_goto\_init}} initialization
10275
of goto label\index{label} table\index{table!of labels}.
10276
\item[identtab\_init]
10277
\index{function!identtab\_init@{\sf identtab\_init}}
10278
\index{identtab\_init@{\sf identtab\_init}} initialization of the
10279
table of global identifiers\index{table!of global identifiers}.
10280
\item[allocate\_hastab\_loc]
10281
\index{function!allocate\_hastab\_loc@{\sf allocate\_hastab\_loc}}
10282
\index{allocate\_hastab\_loc@{\sf allocate\_hastab\_loc}}allocation
10283
of the hash table\index{table!hashing} of local variables.
10284
\item[allocate\_loc\_tables]
10285
\index{function!allocate\_loc\_tables@{\sf allocate\_loc\_tables}}
10286
\index{allocate\_loc\_tables@{\sf allocate\_loc\_tables} }allocation
10287
of table\index{table!of local variables} of identifiers of local
10288
variables. It is used each time a new block is entered.
10289
\item[clear\_hash\_tab\_declaration]
10290
\index{function!clear\_hash\_tab\_declaration@{\sf clear\_hash\_tab\_declaration}}
10291
\index{clear\_hash\_tab\_declaration@{\sf clear\_hash\_tab\_declaration}}
10292
\item[clear\_hash\_tab]
10293
\index{function!clear\_hash\_tab@{\sf clear\_hash\_tab}}
10294
\index{clear\_hash\_tab@{\sf clear\_hash\_tab}}
10295
\item[clear\_hash\_tab\_next\_declaration]
10296
\index{function!clear\_hash\_tab\_next\_declaration@{\sf clear\_hash\_tab\_next\_declaration}}
10297
\index{clear\_hash\_tab\_next\_declaration@{\sf clear\_hash\_tab\_next\_declaration}}
10298
\item[clear\_hash\_tab\_next]
10299
\index{function!clear\_hash\_tab\_next@{\sf clear\_hash\_tab\_next}}
10300
\index{clear\_hash\_tab\_next@{\sf clear\_hash\_tab\_next}}
10301
functions for initialization of different parts of hash
10302
table\index{table!hashing}. These functions are used after block is
10304
\item[point]\index{point@{\sf point}}
10305
\index{function!point@{\sf point}} returns the address of global
10306
variable or null if it is not declared. It prints an
10307
error\index{error} message as well.
10308
\item[point\_call]\index{point\_call@{\sf point\_call}}
10309
\index{function!point\_call@{\sf point\_call}} It is used
10311
\item to find if the identifier has a function type
10312
\item to fix the address (if the (formal) call was done prior to the
10313
definition of the function)
10314
\item to add the address to the list of addresses where to fix
10317
\item[has]\index{has@{\sf has}} \index{function!has@{\sf has}}
10318
\item[putstruct]\index{putstruct@{\sf putstruct}}
10319
\index{function!putstruct@{\sf putstruct}} the functions are
10320
used for storing global variables into the hash
10321
table\index{table!hashing}. The allocation of the
10322
memory\index{memory} is also done in the functions.
10323
\item[putstruct\_body]\index{putstruct\_body@{\sf putstruct\_body}}
10324
\index{function!putstruct\_body@{\sf putstruct\_body}}
10325
sets appropriate variables that the function was defined (not only
10327
\item[lookup]\index{lookup@{\sf lookup}}
10328
\index{variable!lookup@{\sf lookup}} returns pointer to the hash
10329
table\index{table!hashing} where the variable is stored.
10330
\item[hash\_code]\index{hash\_code@{\sf hash\_code}}
10331
\index{function!hash\_code@{\sf hash\_code}}
10332
see~\ref{storage_and_hash}.
10333
\item[hash\_code\_loc]\index{hash\_code\_loc@{\sf hash\_code\_loc}}
10334
\index{function!hash\_code\_loc@{\sf hash\_code\_loc}}
10335
the same as above but for local variables.
10336
\item[point\_loc]\index{point\_loc@{\sf point\_loc}}
10337
\index{function!point\_loc@{\sf point\_loc}} returns pointer
10338
to the hash table of local variables\index{table!of local variables}.
10339
\item[has\_loc]\index{has\_loc@{\sf has\_loc}}
10340
\index{function!has\_loc@{\sf has\_loc}}
10341
\item[putstruct\_loc]\index{putstruct\_loc@{\sf putstruct\_loc}}
10342
\index{function!putstruct\_loc@{\sf putstruct\_loc}}
10343
functions are used for storing local variables into the hash table.
10344
\item[lookup\_loc]\index{lookup\_loc@{\sf lookup\_loc}}
10345
\index{function!lookup\_loc@{\sf lookup\_loc}} returns
10346
pointer to the hash table where the local variable is stored.
10347
\item[add\_spec\_to\_has]
10348
\index{add\_spec\_to\_has@{\sf add\_spec\_to\_has}}
10349
\index{function!add\_spec\_to\_has@{\sf add\_spec\_to\_has}}
10350
to the function, the specifiers (type
10351
information)\index{type!internal} of parameters are added. If the
10352
function was already declared it finds out if declaration and
10353
definition (or two declarations) match.
10354
\item[add\_ident\_to\_has]
10355
\index{add\_ident\_to\_has@{\sf add\_ident\_to\_has}}
10356
\index{function!add\_ident\_to\_has@{\sf add\_ident\_to\_has}}
10357
the information in hash table about function identifiers of
10358
formal parameters\index{parameter!formal} is added. If the function
10359
was already declared it finds out if declaration and definition (or
10360
two declarations) match.
10361
\item[link\_function]\index{link\_function@{\sf link\_function}}
10362
\index{function!link\_function@{\sf link\_function}} sets
10363
addresses of remote functions\index{function!intrinsic}.
10364
\item[set\_value]\index{set\_value@{\sf set\_value}}
10365
\index{function!set\_value@{\sf set\_value}} gathers
10366
information for checking sets of local variables (used for issuing
10367
warnings\index{warning}). The information is checked after
10368
compilation of a function and/or block.
10369
\item[fix\_and\_clear\_goto\_table]
10370
\index{fix\_and\_clear\_goto\_table@{\sf fix\_and\_clear\_goto\_table}}
10371
\index{function!fix\_and\_clear\_goto\_table@{\sf fix\_and\_clear\_goto\_table}}
10372
scans the goto label table;\index{table!of labels} fix addresses of
10373
gotos.\index{statement!goto@{\sf goto}} This is processed after the
10374
return to the level zero of parsing (just before the virtual
10375
machine\index{virtual machine} runs).
10376
\item[has\_goto]\index{has\_goto@{\sf has\_goto}}
10377
\index{function!has\_goto@{\sf has\_goto}} adds a label into
10378
the hash table if it was not already in. It adds address of the
10379
goto\index{statement!goto@{\sf goto}} to the list of gotos.
10380
\item[has\_label]\index{has\_label@{\sf has\_label}}
10381
\index{function!has\_label@{\sf has\_label}} adds a label into
10382
the hash table. If it was in, issues an error\index{error} message.
10383
It adds address of the label to the internal representation.
10384
\item[lookup\_goto\_table]
10385
\index{lookup\_goto\_table@{\sf lookup\_goto\_table}}
10386
\index{function!lookup\_goto\_table@{\sf lookup\_goto\_table}}
10387
returns address of the hash table where the label is stored.
10388
\item[hash\_code\_goto]
10389
\index{hash\_code\_goto@{\sf hash\_code\_goto}}
10390
\index{function!hash\_code\_goto@{\sf hash\_code\_goto}}
10391
hash function for goto labels.
10392
\item[align\_memory]
10393
\index{align\_memory@{\sf align\_memory}}
10394
\index{function!align\_memory@{\sf align\_memory}} used for
10395
allocation of variables. Each type has to be properly aligned.
10396
\item[scope\_offset\_get]
10397
\index{scope\_offset\_get@{\sf scope\_offset\_get}}
10398
\index{function!scope\_offset\_get@{\sf scope\_offset\_get}}
10399
\item[scope\_offset\_set]
10400
\index{scope\_offset\_set@{\sf scope\_offset\_set}}
10401
\index{function!scope\_offset\_set@{\sf scope\_offset\_set}}
10402
Functions set and get global offset (valid for whole table). The
10403
functions are used if nesting scope is greater than zero, i.e. at
10404
least two different blocks exist.
10405
\item[move\_offset\_aligned]
10406
\index{move\_offset\_aligned@{\sf move\_offset\_aligned}}
10407
\index{function!move\_offset\_aligned@{\sf move\_offset\_aligned}}
10408
adjusting offsets according to size of type.
10409
\item[lookup\_type]\index{lookup\_type@{\sf lookup\_type}}
10410
\index{function!lookup\_type@{\sf lookup\_type}} returns
10411
address of the hash table where the type is stored.
10412
\item[has\_type]\index{has\_type@{\sf has\_type}}
10413
\index{function!has\_type@{\sf has\_type}}
10414
\item[putstruct\_type]\index{putstruct\_type@{\sf putstruct\_type}}
10415
\index{function!putstruct\_type@{\sf putstruct\_type}}
10416
process tags and type names. Information is put into the hash table.
10417
\item[putstruct\_type\_body]
10418
\index{putstruct\_type\_body@{\sf putstruct\_type\_body}}\
10419
\index{function!putstruct\_type\_body@{\sf putstruct\_type\_body}}
10420
allocates space for the type if it is necessary.
10421
\item[add\_spec\_to\_type]
10422
\index{add\_spec\_to\_type@{\sf add\_spec\_to\_type}}
10423
\index{function!add\_spec\_to\_type@{\sf add\_spec\_to\_type}}
10424
adds information about type specifiers of struct, union or enum
10425
fields to the hash table.
10426
\item[add\_ident\_to\_type]
10427
\index{add\_ident\_to\_type@{\sf add\_ident\_to\_type}}
10428
\index{function!add\_ident\_to\_type@{\sf add\_ident\_to\_type}}
10429
adds identifiers of struct, union or enum fields to the hash table.
10430
\item[allocate\_var]\index{allocate\_var@{\sf allocate\_var}}
10431
\index{function!allocate\_var@{\sf allocate\_var}}
10432
allocates memory\index{memory} for global variable.
10433
\item[allocate\_struct]\index{allocate\_struct@{\sf allocate\_struct}}
10434
\index{function!allocate\_struct@{\sf allocate\_struct}}
10435
counts memory size of structures.
10436
\item[find\_member]\index{find\_member@{\sf find\_member}}
10437
\index{function!find\_member@{\sf find\_member}} returns
10438
offset in the currently parsed structure (dereference of it is
10439
parsed) or -1 if name is not a member.
10440
\item[offset\_aggregate\_member]
10441
\index{offset\_aggregate\_member@{\sf offset\_aggregate\_member}}
10442
\index{function!offset\_aggregate\_member@{\sf offset\_aggregate\_member}}
10443
just a wrapper above the former function.
10444
\item[allocate\_aggregate]
10445
\index{allocate\_aggregate@{\sf allocate\_aggregate}}
10446
\index{function!allocate\_aggregate@{\sf allocate\_aggregate}}
10447
counts memory size of structures (calls {\sf allocate\_struct}) and
10448
aligns offsets of aggregate fields.
10449
\item[putstruct\_static]
10450
\index{putstruct\_static@{\sf putstruct\_static}}
10451
\index{function!putstruct\_static@{\sf putstruct\_static}}
10452
Static variables are put into tables.
10453
\item[enter\_file\_scope]
10454
\index{enter\_file\_scope@{\sf enter\_file\_scope}}
10455
\index{function!enter\_file\_scope@{\sf enter\_file\_scope}}
10456
\item[exit\_file\_scope]
10457
\index{exit\_file\_scope@{\sf exit\_file\_scope}}
10458
\index{function!exit\_file\_scope@{\sf exit\_file\_scope}}
10459
have special meaning. They are used in file scope static variables.
10460
\item[typedef\_p]\index{typedef\_p@{\sf typedef\_p}}
10461
\index{function!typedef\_p@{\sf typedef\_p}}
10462
If the name is declared as typedef return it as TYPENAME token
10463
\index{token!TYPENAME@{\bf TYPENAME}} - true (1);
10464
IDENT\index{token!INDEX@{\bf INDEX}} - false (0), otherwise.
10465
\item[get\_declaration\_line]
10466
\index{get\_declaration\_line@{\sf get\_declaration\_line}}
10467
\index{function!get\_declaration\_line@{\sf get\_declaration\_line}}
10468
Returns the declaration line of a variable. Called from error\_message
10469
function.\index{function!error\_message@{\sf error\_message}}
10470
\index{error\_message@{\sf error\_message}}
10471
\item[memory\_size]\index{memory\_size@{\sf memory\_size}}
10472
\index{function!memory\_size@{\sf memory\_size}} During
10473
initialization of variables, walk recursively down the type and set
10474
the size of the subtype of an aggregate.
10475
\item[check\_init\_bracket]
10476
\index{check\_init\_bracket@{\sf check\_init\_bracket}}
10477
\index{function!check\_init\_bracket@{\sf check\_init\_bracket}}
10478
The right initialization bracketing has the same number of brackets
10479
as is the number of subtypes. The function checks the number of
10480
subtypes. The return value is in {\sf level} variable.
10481
\item[get\_memory\_size]
10482
\index{get\_memory\_size@{\sf get\_memory\_size}}
10483
\index{function!get\_memory\_size@{\sf get\_memory\_size}}
10484
For the first initializer of the variable, the number of subtypes is
10485
evaluated and returned from the {\sf check\_init\_bracket}
10486
function. If the number of bracket is less than number of subtypes a
10487
warning is printed. The return value is the memory size of the
10489
\item[get\_field\_size]
10490
\index{get\_field\_size@{\sf get\_field\_size}}
10491
\index{function!get\_field\_size@{\sf get\_field\_size}}
10492
It is called during the variable initialization. The size of a
10493
sub-type of the aggregate is returned.
10494
\item[noninitialized\_loc]
10495
\index{noninitialized\_loc@{\sf noninitialized\_loc}}
10496
\index{function!noninitialized\_loc@{\sf noninitialized\_loc}}
10497
If the local variable was not initialized during declaration, the
10498
usage counter must be reset.
10501
\section{File `type.h'}\index{file!type.h}
10503
\begin{description}
10504
\item[INTERNAL\_TYPE]\index{macro!INTERNAL\_TYPE@{\bf INTERNAL\_TYPE}}
10505
\index{INTERNAL\_TYPE@{\bf INTERNAL\_TYPE}} macro for unfolding enum
10507
\item[intern\_arit\_class]
10508
\index{intern\_arit\_class@{\sf intern\_arit\_class}}
10509
\index{type!intern\_arit\_class@{\sf intern\_arit\_class}}
10510
enumeration type for internal arithmetical class
10511
(see~\ref{internal_type}).
10512
\item[PAR]\index{macro!PAR@{\bf PAR}}\index{PAR@{\bf PAR}} flag for
10513
formal parameter\index{parameter!formal}.
10514
\item[VAR]\index{macro!VAR@{\bf VAR}}\index{VAR@{\bf VAR}} flag for
10515
local variable\index{variable!local}.
10516
\item[intern\_func\_class]
10517
\index{intern\_func\_class@{\sf intern\_func\_class}}
10518
\index{type!intern\_func\_class@{\sf intern\_func\_class}}
10519
enumeration type for internal function class
10520
(see~\ref{internal_type}).
10521
\item[YES]\index{macro!YES@{\bf YES}}\index{YES@{\bf YES}} flag for
10522
remote function\index{function!intrinsic} with exported type of
10524
\item[NOT\_DEFINED]\index{macro!NOT\_DEFINED@{\bf NOT\_DEFINED}}
10525
\index{NOT\_DEFINED@{\bf NOT\_DEFINED}} not defined range for
10526
arrays. It is used mainly for formal
10527
parameters.\index{parameter!formal} For example, \verb|int z(int
10528
b[][3][3])|, the first subscript of the formal parameter \verb|b|
10529
has undefined size.
10530
\item[GLOBAL\_TYPE]\index{macro!GLOBAL\_TYPE@{\bf GLOBAL\_TYPE}}
10531
\index{GLOBAL\_TYPE@{\bf GLOBAL\_TYPE}} macro for unfolding enum
10533
\item[global\_type]\index{global\_type@{\sf global\_type}}
10534
\index{type!global\_type@{\sf global\_type}} enumeration
10535
type for type flag used in remote
10536
functions\index{function!intrinsic} with export types.
10537
\item[type\_qual]\index{type\_qual@{\sf type\_qual}}
10538
\index{type!type\_qual@{\sf type\_qual}} enumeration type for type
10540
\item[storage\_class\_specifier]
10541
\index{storage\_class\_specifier@{\sf storage\_class\_specifier}}
10542
\index{type!storage\_class\_specifier@{\sf storage\_class\_specifier}}
10543
enumeration type for storage class specifiers.
10544
\item[POINTER\_P]\index{macro!POINTER\_P@{\bf POINTER\_P}}
10545
\index{POINTER\_P@{\bf POINTER\_P}}
10546
\item[STRUCT\_P]\index{macro!STRUCT\_P@{\bf STRUCT\_P}}
10547
\index{STRUCT\_P@{\bf STRUCT\_P}}
10548
\item[UNION\_P]\index{macro!UNION\_P@{\bf UNION\_P}}
10549
\index{UNION\_P@{\bf UNION\_P}}
10550
\item[ENUM\_P]\index{macro!ENUM\_P@{\bf ENUM\_P}}
10551
\index{ENUM\_P@{\bf ENUM\_P}}
10552
\item[ARRAY\_P]\index{macro!ARRAY\_P@{\bf ARRAY\_P}}
10553
\index{ARRAY\_P@{\bf ARRAY\_P}}
10554
\item[SIMPLE\_P]\index{macro!SIMPLE\_P@{\bf SIMPLE\_P}}
10555
\index{SIMPLE\_P@{\bf SIMPLE\_P}}
10556
\item[LOCAL\_P]\index{macro!LOCAL\_P@{\bf LOCAL\_P}}
10557
\index{LOCAL\_P@{\bf LOCAL\_P}}
10558
\item[REMOTE\_P]\index{macro!REMOTE\_P@{\bf REMOTE\_P}}
10559
\index{REMOTE\_P@{\bf REMOTE\_P}}
10560
predicates for the field function class in the internal
10561
type\index{type!internal} (see~\ref{internal_type}).
10562
\item[STATIC\_P]\index{macro!STATIC\_P@{\bf STATIC\_P}}
10563
\index{STATIC\_P@{\bf STATIC\_P}} predicate for the field storage
10564
class specifier in the internal type\index{type!internal}
10565
(see~\ref{internal_type}).
10566
\item[VOID\_P]\index{macro!VOID\_P@{\bf VOID\_P}}
10567
\index{VOID\_P@{\bf VOID\_P}}
10568
\item[CHAR\_P]\index{macro!CHAR\_P@{\bf CHAR\_P}}
10569
\index{CHAR\_P@{\bf CHAR\_P}}
10570
\item[SHORT\_P]\index{macro!SHORT\_P@{\bf SHORT\_P}}
10571
\index{SHORT\_P@{\bf SHORT\_P}}
10572
\item[INTEGER\_P]\index{macro!INTEGER\_P@{\bf INTEGER\_P}}
10573
\index{INTEGER\_P@{\bf INTEGER\_P}}
10574
\item[LONG\_P]\index{macro!LONG\_P@{\bf LONG\_P}}
10575
\index{LONG\_P@{\bf LONG\_P}}
10576
\item[FLOAT\_P]\index{macro!FLOAT\_P@{\bf FLOAT\_P}}
10577
\index{FLOAT\_P@{\bf FLOAT\_P}}
10578
\item[DOUBLE\_P]\index{macro!DOUBLE\_P@{\bf DOUBLE\_P}}
10579
\index{DOUBLE\_P@{\bf DOUBLE\_P}}
10580
\item[SIGNED\_P]\index{macro!SIGNED\_P@{\bf SIGNED\_P}}
10581
\index{SIGNED\_P@{\bf SIGNED\_P}}
10582
\item[UNSIGNED\_P]\index{macro!UNSIGNED\_P@{\bf UNSIGNED\_P}}
10583
\index{UNSIGNED\_P@{\bf UNSIGNED\_p}}
10584
\item[UNUSED\_P]\index{macro!UNUSED\_P@{\bf UNUSED\_P}}
10585
\index{UNUSED\_P@{\bf UNUSED\_P}}
10586
predicates for the field attribute arit class in the internal
10587
type\index{type!internal} (see~\ref{internal_type}).
10588
\item[TYPES\_EQ\_P]\index{macro!TYPES\_EQ\_P@{\bf TYPES\_EQ\_P}}
10589
\index{TYPES\_EQ\_P@{\bf TYPES\_EQ\_P}}
10590
compares if subtype of the field attribute arit class is
10592
\item[CONST\_P]\index{macro!CONST\_P@{\bf CONST\_P}}
10593
\index{CONST\_P@{\bf CONST\_P}}
10594
predicate for const type qualifier.
10597
\section{File `virtual\_machine.c'}\index{file!virtual\_machine.c}
10599
\begin{description}
10600
\item[exec]\index{function!exec@{\sf exec}} \index{exec@{\sf exec}}
10601
wrapper to run the virtual machine. It checks if a virtual machine
10602
instruction was not interrupted\index{interrupt}.
10603
\item[exe]\index{function!exe@{\sf exe}} \index{exe@{\sf exe}} all
10604
instructions of the virtual machine are coded in this function.
10605
\item[vtrue]\index{function!vtrue@{\sf vtrue}}
10606
\index{vtrue@{\sf vtrue}} logical true. The value is stored on the
10607
temporary stack.\index{stack}
10608
\item[vfalse]\index{function!vfalse@{\sf vfalse}}
10609
\index{vfalse@{\sf vfalse}} logical false. The value is stored on
10610
the temporary stack.\index{stack}
10611
\item[div\_yes]\index{function!div\_yes@{\sf div\_yes}}
10612
\index{div\_yes@{\sf div\_yes}} integer division.\index{division}
10613
\item[divd\_yes]\index{function!divd\_yes@{\sf divd\_yes}}
10614
\index{divd\_yes@{\sf divd\_yes}} double division.\index{division}
10615
\item[divf\_yes] \index{function!divf\_yes@{\sf divf\_yes}}
10616
\index{divf\_yes@{\sf divf\_yes}} float division.\index{division}
10617
\item[divc\_yes]\index{function!divc\_yes@{\sf divc\_yes}}
10618
\index{divc\_yes@{\sf divc\_yes}} char division.\index{division}
10619
\item[mod\_yes]\index{function!mod\_yes@{\sf mod\_yes}}
10620
\index{mod\_yes@{\sf mod\_yes}} modulus.\index{modulus}
10621
\item[move\_stack\_aligned]
10622
\index{function!move\_stack\_aligned@{\sf move\_stack\_aligned}}
10623
\index{move\_stack\_aligned@{\sf move\_stack\_aligned}} the
10624
temporary stack\index{stack} has to be always aligned.
10627
\section{File `ys.h'}\index{file!ys.h}
10629
\begin{description}
10630
\item[yyparse]\index{function!yyparse@{\sf yyparse}}
10631
\index{yyparse@{\sf yyparse}} function prototype.
10634
\section{File `ys.y'}\index{file!ys.y}
10636
%The commented parser is in Appendix~\ref{commented_parser}.
10637
Some rules in the grammar are not designed as stated in~\cite{ansic}.
10638
It is partially because of one pass compiler design and fully
10639
interpretative approach. Compilation of this file may cause problems
10640
(see section~\ref{problems}).
10642
The biggest discrepancies between Standard ANSI C and \CiF\
10643
implementation is in parameter passing mechanism (see
10644
section~\ref{parameter_passing}). The bit-fields and preprocessing
10645
directives are not yet supported. The \CiF\ has no preprocessing
10646
option. This stuff will be included as soon as possible. The goal is
10647
convergence of the framework to the Standard ANSI C specification.
10650
\chapter{Some implementation details}
10652
\section{Postfix operators (postfix increment and decrement)}
10654
Compilation of postfix increment and decrement is based on the
10655
following observation:
10657
\item On the top of the arithmetic stack is the address of the
10660
\item If the operand is an array, finish evaluation of the
10662
\item If the operand is a structure or union, finish evaluation of
10664
\item If the operand is a pointer, add the size of the object it
10667
\item Create a copy of the value, which is stored on the top of the
10669
\item Exchange two addresses of the top most operands on the
10671
\item Create address copy of the top most operand on the arithmetic
10673
\item Push second operand on the arithmetic stack.
10674
\item Add two top most operands.
10675
\item Move the value on the top of the arithmetic stack to the top
10676
most but last address on the arithmetic stack.
10677
\item Pop the arithmetic stack.
10680
\section{Aggregate assigning}
10682
If the right side operand and the left side operand are aggregates of
10683
the same type, move a byte instructions are generated in the loop. The
10684
number of move instructions is generated accordingly to the memory
10685
size which the aggregate occupies.
10687
\chapter{Bug report}
10689
If you have found a bug please report this bug to authors at the
10690
following e-mail address:
10699
Please, include in your bug report:
10701
\item Platform on which the \CiF\ was running, i.e. machine, CPU,
10703
\item Version of the \CiF.
10704
\item Source file that caused the problem. We will appreciate if the
10705
source file will be as short as possible and still consists the bug
10706
you want to report. If you don't know how to isolate the bug, send
10708
\item Error message, if any, produced by the \CiF.
10709
\item Indicate if you did any changes to the source of the \CiF.
10713
We will try to fix the bug if it is reproducible on platforms that are
10716
\section{Problems}\label{problems}
10718
Problems occur sometimes during compilation of the parser
10719
(c-parser.c).\index{file!c-parser.c@{\sf c-parser.c}}
10720
\index{c-parser.c@{\sf c-parser.c}} This problem is due to the large
10721
{\sf switch} statement. Sometimes helps to specify -O2 optimization
10727
%\input{acknowledgment.tex}
10729
\bibliographystyle{plain}
10730
\bibliography{knia}
10732
\pagenumbering{roman}