1 04/25/85  lalr, lrk
  2 
  3 Syntax:  lalr path {control_args}
  4 
  5 
  6 Function:  Invokes the LALR compiler to translate a source
  7    segment containing the text of the LALR source into a set of
  8    tables located in an object segment.  The object segment is
  9    given two names consisting of the entryname portion of the
 10    source segment with the suffixes grammar and result.  A
 11    listing segment is optionally produced.  Packaged forms of
 12    the tables may be requested.  These segments are placed in
 13    your working directory.
 14 
 15 
 16 Arguments:
 17 path
 18    is the pathname of the LALR source segment containing the
 19    grammar to be processed.  The lalr suffix is assumed if not
 20    supplied.  This argument may be an archive component
 21    pathname.
 22 
 23 
 24 Control arguments:
 25 -brief, -bf
 26    suppresses the display to the user_output I/O switch of the
 27    inadequate sets encountering indefinite or infinite look
 28    ahead or exceeding the maximum allowed look ahead (see
 29    Chapter 8, LALR Theory in the LALR Manual).  Such sets are
 30    still displayed in the listing.
 31 -long, -lg
 32    causes inadequate sets leading to indefinite or infinite look
 33    ahead or exceeding the maximum allowed look ahead to be
 34    identified on the user_output I/O switch (see Chapter 8, LALR
 35    Theory in the LALR Manual).  (Default)
 36 -dpda
 37    causes the complete LALR procedure to be executed to generate
 38    a new result segment.  (Default)
 39 -no_dpda, -nd
 40    causes only the first pass and the listing passes of LALR to
 41    be executed.  This allows a new semantics segment to be created
 42    and/or listings to be produced at considerably less expense
 43    than a normal LALR generation.  When this option is used, the
 44    result segment (or a link to it) from a previous LALR generation
 45    using the source named by the path argument must exist in the
 46    working directory.  Also the current grammar must be
 47    equivalent to the grammar from which result segment was
 48    generated.  Each rule (or alternative if the -production control
 49    was used) must have the same semantic action as the same rule
 50    (or alternative) in the original grammar.
 51 
 52 
 53 -embedded_semantics
 54    indicates that the source segment is in the embedded semantics
 55    format.  (Default)
 56 -end_of_information {X}, -end_of_info {X}, -eoi {X}
 57    causes the generated parser to use a production whose right
 58    hand side is your start symbol followed by an
 59    end-of-information symbol to create the augmented grammar.
 60    (Default).  If the optional argument X is present,
 61    it is made a synonym of the anonymous end-of-information
 62    terminal.
 63 -no_end_of_information, -no_end_of_info, -neoi
 64    causes the generated parser to use a production whose right
 65    hand side is simply your start symbol to create the augmented
 66    grammar.
 67 -hash N
 68    set the hash value of the variable and terminal tables to N.
 69    The default is 1021.
 70 -mark X
 71    marks terminal X as an alternative to an unreserved keyword.
 72    (see Unreserved Keywords in Chapter 2 of the LALR Manual).
 73 -no_mark
 74    generates a parser with no marked terminal.  (Default)
 75 
 76 
 77 -optimize, -ot
 78    is the same as -optimize_reads, -optimize_applies, and
 79    -optimize_looks altogether.
 80 -no_optimize, -not
 81    is the same as -no_optimize_reads, -no_optimize_applies, and
 82    -no_optimize_looks altogether.
 83 -optimize_applies
 84    performs certain optimizations on the generated DPDA that
 85    primarily affect apply states.
 86 -no_optimize_applies
 87    does not perform the optimizations primarily affecting apply
 88    states.  (Default)
 89 -optimize_looks
 90    performs certain optimizations on the generated DPDA that
 91    primarily affect look states.
 92 -no_optimize_looks
 93    does not perform the optimizations primarily affecting apply
 94    states.  (Default)
 95 -optimize_reads
 96    performs certain optimizations on the generated DPDA that
 97    primarily affect read states.
 98 -no_optimize_reads
 99    does not perform the optimizations primarily affecting read
100    states.  (Default)
101 
102 
103 -production, -prod
104    causes the DPDA to be generated with apply state tables that
105    contain the production number but not the rule and
106    alternative numbers.  This control argument also affects the
107    generation of the semantics segment.
108 -rule
109    causes the DPDA to be generated with apply state tables that
110    contain the rule, alternative, and the production number.
111    (Default).  This control argument may be overridden by a
112    later -production or -rule_only control argument.
113    This control argument also affects the generation of the
114    semantics segment.
115 -rule_only
116    causes the DPDA to be generated with apply state tables that
117    contain the rule number but not the alternative and production
118    numbers.  This form of DPDA offers greater opportunity for
119    optimization than that produced when either the -production or
120    -rule control is in effect.  This control argument also
121    affects the generation of the semantics segment.
122 -semantics {X}, -sem {X}
123    produces a semantics segment named X.  X may not be
124    The equals convention is applied to the entryname of X and
125    the entryname or component name of the source segment.
126    The suffix(es) of the resultant entryname must be pl1 or
127    incl.pl1 (PL/1 source).  If no suffix is present, incl.pl1 is
128    assumed.  If incl is present, it is treated as incl.pl1.  If
129    X is not given, "=_s.pl1" is assumed.  Note: this control
130    argument is meaningless with a separate semantics format
131    source segment.
132 -no_semantics, -nsem
133    does not produce a semantics segment.  (Default)
134 
135 
136 -semantics_header, -semhe
137    causes a "program header" to be generated for the semantics
138    segment.  (Default)
139 -no_semantics_header, -nsemhe
140    causes the "program header" to be omitted from the generated
141    semantics segment.
142 -separate_semantics {N}, -sep_sem {N}
143    indicates that the source segment is in the separate
144    semantics format.  The optional argument N positionally
145    specifies which argument in the parser's call to the
146    semantics will be the rule or production number required by
147    the transfer vector used with the Multics packaged tables
148    object segment and alm source segment forms of the parse
149    tables.  The lalr_parser_ subroutine used in the lalrp
150    command requires N to be 3.  If N is omitted, the first
151    argument is used.
152 
153 
154 -table {X{.incl.pl1}}, -tb {X{.incl.pl1}}
155    produces a packaged form of the result segment in a table
156    named X and an appropriately named source segment declaring
157    the components of the table.  X may not be an archive
158    component pathname.  The equals convention is applied to the
159    entryname of X and the entryname (or component name in case
160    of an archive component) of the source segment.  The table is
161    produced as a Multics object segment.  If X is not given,
162    "=_t" is assumed.  This control argument implies the
163    -terminals_hash_list, -terminals_list, -variables_list,
164    -production_names and -synonyms control arguments described
165    below.
166 -no_table, -ntb
167    does nt produce the table described above.  This control
168    argument implies the -no_terminals_list,
169    -no_terminals_hash_list, -no_production_names, and
170    -no_variables_list control arguments described below.
171    (Default)
172 -alm
173    produce the table as an alm segment X.alm and a Multics PL/1
174    include segment named X.incl.pl1.  X is the name supplied
175    with the -table control argument less all suffixes.  If -alm
176    is in effect but the -table parameter is not, -table =_t is
177    assumed.
178 -no_alm
179    does not produce the table in the form described above for
180    the -alm control argument.
181 -production_names, -pn
182    include the production names in the table.  This control
183    argument implies the -variables_list control argument
184    described below.
185 -no_production_names, -npn
186    does not include the production names in the table.
187    Note that -production_names -no_production_names has the
188    same effect as -variables_list. (Default)
189 
190 
191 -synonyms, -syn
192    include the terminal encoding as a field in the terminals
193    list instead of using the index to the terminals list as the
194    encoded value.  This option is forced if the grammar names
195    one or more synonyms.  This option is meaningless unless the
196    -terminals_list control argument is also specified or
197    implied.
198 -no_synonyms, -nsyn
199    do not include the terminal encoding as a field in the
200    terminals list unless the grammar explicitly names one or
201    more synonyms.
202 -terminals_hash_list, -thl
203    include the terminals list and terminals hash list in the
204    table.
205 -no_terminals_hash_list, -nthl
206    does not include the terminals hash list in the table.
207    Note that -terminals_hash_list -no_terminals_hash_list
208    has the same effect as -terminals_list.  (Default)
209 -terminals_list, -tl
210    include the terminals list in the table.
211 -no_terminals_list, -ntl
212    does not include the terminals list in the table.
213    This control argument implies the -no_terminals_hash_list
214    control argument.  (Default)
215 -variables_list, -vl
216    include the variables list in the table.
217 -no_variables_list, -nvl
218    does not include the variables list in the table.
219    This control argument implies the -no_production_names
220    control argument.  (Default)
221 
222 
223 -controls, -ctl
224    includes the grammar's control lines, if any, in the output
225    list.  This control argument implies -source.
226 -no_controls, -nctl
227    does not include the grammar's control lines, if any, in the
228    output list if one is produced.  Note that
229    -controls -no_controls is equivalent to -source.  (Default)
230 -count, -ct
231    produces a list of statistics about the tables.  This will go
232    to user_output if no other option is present which provides a
233    list segment.
234 -no_count, -nct
235    does not produce a list of statistics about the tables.
236    (Default)
237 -dpda_xref, -dx
238    includes cross reference lists of states, terminals, and
239    variables in the "machine" listing of the DPDA.  If the
240    source segment is in the separate semantics format, the
241    semantic actions are also cross referenced.  This control
242    argument implies the -dpda control argument.
243 -no_dpda_xref, -ndx
244    does not include any DPDA cross reference lists in the
245    "machine" listing of the DPDA.  Note that -dpda_xref
246    -no_dpda_xref is equivalent to -dpda.  (Default)
247 
248 
249 -line_length N, -ll N
250    causes the listing to be prepared with lines no longer than N
251    characters.  If this control argument is not specified, a
252    line length of 136 characters is assumed.
253 -list, -ls
254    produces a "machine" listing of the DPDA resulting from the
255    LALR execution.
256 -no_list, -nls
257    does not produce a "machine" listing of the DPDA resulting
258    from the LALR execution.  (Default)
259 -long_source, -lgsc
260    produces a line-numbered listing of the rules of the grammar
261    and the associated semantics.  If this control argument is
262    used with separate semantics format source segments, it has
263    the same effect as -source.
264 -no_long_source, -nlgsc
265    does not include the semantics in the source listing.
266    Note that -long_source -no_long_source is equivalent
267    to -source.  (Default)
268 -page_length N, -pl N
269    prints the "machine" listing of the DPDA so that no more than
270    N lines are on a page.  If this control argument is not
271    specified, a page length of 60 lines is assumed.
272 
273 
274 -source, -sc
275    produces a line-numbered listing of the rules of the grammar.
276    No semantics are listed, only the rules.
277 -no_source, -nsc
278    does not produce a listing of the grammar or the associated
279    semantics.  (Default)
280 -ss
281    produces source and symbols.
282 -nss
283    is the same as -no_source -no_symbols
284 -ssl
285    produces source, symbols, and list.
286 -nssl
287    is the same as -no_source -no_symbols -no_list
288 -symbols, -sb
289    produces a cross reference listing of the terminals and
290    variables used in the grammar.  If the source segment is in
291    the separate semantics format, a cross reference listing of
292    the semantic actions used is also produced.
293 -no_symbols, -nsb
294    does not produce a listing of the terminals and variables
295    used in the grammar.  (Default)
296 
297 
298 -terminals, -terms, -term
299    produces a listing of the terminals in encoding order,
300    showing the encoding.  If the source segment is in the
301    separate semantics format, a listing of semantic actions
302    indexed by the referencing rule number or production number,
303    as appropriate, is also produced.
304 -no_terminals, -no_terms, -no_term
305    does not produce a listing of the terminals in encoded order.
306    (Default)
307 -time, -tm
308    prints a table after translation giving the time (in CPU
309    seconds), the number of page faults, and measures of other
310    resources used by each phase of the translator.  This output
311    will go to the user_output I/O switch if no other option
312    which provides a list segment is present.  This information
313    is also available from the command lalr$times invoked
314    immediately after a translation.
315 -no_time, -ntm
316    does not print a table after translation giving the amounts
317    of CPU time and other resources used by each of the phases of
318    the translator.  (Default)
319 
320 
321 Notes:
322 If the source segment is named X.lalr, the list segment will be
323 named X.g.list.  This is done so that if you choose to have your
324 semantics segment named X.pl1, the generation listing and
325 compilation listing will not be in conflict.
326 
327 If the -separate_semantics or -alm control arguments are used,
328 the -table control argument must also be in effect.
329 
330 Use of a DPDA with optimized reads requires a parser PL/1
331 procedure designed (or generated) according to the requirements
332 given in the June 13, 1981 or later version of this
333 specification.
334 
335 Use of a DPDA with optimized looks requires a parser PL/1
336 procedure designed (or generated) according to the requirements
337 given in the September 18, 1982 or later version of this
338 specification.
339 
340 The LALR command supports the program_interrupt command by
341 continuing after receiving a program_interrupt signal as if the
342 -brief control argument had been specified in the command line.
343 
344 For a description and syntax of the grammar source input, see
345 Chapter 3 of the LALR Manual.