lalr_state.html 45 KB
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83
   84
   85
   86
   87
   88
   89
   90
   91
   92
   93
   94
   95
   96
   97
   98
   99
  100
  101
  102
  103
  104
  105
  106
  107
  108
  109
  110
  111
  112
  113
  114
  115
  116
  117
  118
  119
  120
  121
  122
  123
  124
  125
  126
  127
  128
  129
  130
  131
  132
  133
  134
  135
  136
  137
  138
  139
  140
  141
  142
  143
  144
  145
  146
  147
  148
  149
  150
  151
  152
  153
  154
  155
  156
  157
  158
  159
  160
  161
  162
  163
  164
  165
  166
  167
  168
  169
  170
  171
  172
  173
  174
  175
  176
  177
  178
  179
  180
  181
  182
  183
  184
  185
  186
  187
  188
  189
  190
  191
  192
  193
  194
  195
  196
  197
  198
  199
  200
  201
  202
  203
  204
  205
  206
  207
  208
  209
  210
  211
  212
  213
  214
  215
  216
  217
  218
  219
  220
  221
  222
  223
  224
  225
  226
  227
  228
  229
  230
  231
  232
  233
  234
  235
  236
  237
  238
  239
  240
  241
  242
  243
  244
  245
  246
  247
  248
  249
  250
  251
  252
  253
  254
  255
  256
  257
  258
  259
  260
  261
  262
  263
  264
  265
  266
  267
  268
  269
  270
  271
  272
  273
  274
  275
  276
  277
  278
  279
  280
  281
  282
  283
  284
  285
  286
  287
  288
  289
  290
  291
  292
  293
  294
  295
  296
  297
  298
  299
  300
  301
  302
  303
  304
  305
  306
  307
  308
  309
  310
  311
  312
  313
  314
  315
  316
  317
  318
  319
  320
  321
  322
  323
  324
  325
  326
  327
  328
  329
  330
  331
  332
  333
  334
  335
  336
  337
  338
  339
  340
  341
  342
  343
  344
  345
  346
  347
  348
  349
  350
  351
  352
  353
  354
  355
  356
  357
  358
  359
  360
  361
  362
  363
  364
  365
  366
  367
  368
  369
  370
  371
  372
  373
  374
  375
  376
  377
  378
  379
  380
  381
  382
  383
  384
  385
  386
  387
  388
  389
  390
  391
  392
  393
  394
  395
  396
  397
  398
  399
  400
  401
  402
  403
  404
  405
  406
  407
  408
  409
  410
  411
  412
  413
  414
  415
  416
  417
  418
  419
  420
  421
  422
  423
  424
  425
  426
  427
  428
  429
  430
  431
  432
  433
  434
  435
  436
  437
  438
  439
  440
  441
  442
  443
  444
  445
  446
  447
  448
  449
  450
  451
  452
  453
  454
  455
  456
  457
  458
  459
  460
  461
  462
  463
  464
  465
  466
  467
  468
  469
  470
  471
  472
  473
  474
  475
  476
  477
  478
  479
  480
  481
  482
  483
  484
  485
  486
  487
  488
  489
  490
  491
  492
  493
  494
  495
  496
  497
  498
  499
  500
  501
  502
  503
  504
  505
  506
  507
  508
  509
  510
  511
  512
  513
  514
  515
  516
  517
  518
  519
  520
  521
  522
  523
  524
  525
  526
  527
  528
  529
  530
  531
  532
  533
  534
  535
  536
  537
  538
  539
  540
  541
  542
  543
  544
  545
  546
  547
  548
  549
  550
  551
  552
  553
  554
  555
  556
  557
  558
  559
  560
  561
  562
  563
  564
  565
  566
  567
  568
  569
  570
  571
  572
  573
  574
  575
  576
  577
  578
  579
  580
  581
  582
  583
  584
  585
  586
  587
  588
  589
  590
  591
  592
  593
  594
  595
  596
  597
  598
  599
  600
  601
  602
  603
  604
  605
  606
  607
  608
  609
  610
  611
  612
  613
  614
  615
  616
  617
  618
  619
  620
  621
  622
  623
  624
  625
  626
  627
  628
  629
  630
  631
  632
  633
  634
  635
  636
  637
  638
  639
  640
  641
  642
  643
  644
  645
  646
  647
  648
  649
  650
  651
  652
  653
  654
  655
  656
  657
  658
  659
  660
  661
  662
  663
  664
  665
  666
  667
  668
  669
  670
  671
  672
  673
  674
  675
  676
  677
  678
  679
  680
  681
  682
  683
  684
  685
  686
  687
  688
  689
  690
  691
  692
  693
  694
  695
  696
  697
  698
  699
  700
  701
  702
  703
  704
  705
  706
  707
  708
  709
  710
  711
  712
  713
  714
  715
  716
  717
  718
  719
  720
  721
  722
  723
  724
  725
  726
  727
  728
  729
  730
  731
  732
  733
  734
  735
  736
  737
  738
  739
  740
  741
  742
  743
  744
  745
  746
  747
  748
  749
  750
  751
  752
  753
  754
  755
  756
  757
  758
  759
  760
  761
  762
  763
  764
  765
  766
  767
  768
  769
  770
  771
  772
  773
  774
  775
  776
  777
  778
  779
  780
  781
  782
  783
  784
  785
  786
  787
  788
  789
  790
  791
  792
  793
  794
  795
  796
  797
  798
  799
  800
  801
  802
  803
  804
  805
  806
  807
  808
  809
  810
  811
  812
  813
  814
  815
  816
  817
  818
  819
  820
  821
  822
  823
  824
  825
  826
  827
  828
  829
  830
  831
  832
  833
  834
  835
  836
  837
  838
  839
  840
  841
  842
  843
  844
  845
  846
  847
  848
  849
  850
  851
  852
  853
  854
  855
  856
  857
  858
  859
  860
  861
  862
  863
  864
  865
  866
  867
  868
  869
  870
  871
  872
  873
  874
  875
  876
  877
  878
  879
  880
  881
  882
  883
  884
  885
  886
  887
  888
  889
  890
  891
  892
  893
  894
  895
  896
  897
  898
  899
  900
  901
  902
  903
  904
  905
  906
  907
  908
  909
  910
  911
  912
  913
  914
  915
  916
  917
  918
  919
  920
  921
  922
  923
  924
  925
  926
  927
  928
  929
  930
  931
  932
  933
  934
  935
  936
  937
  938
  939
  940
  941
  942
  943
  944
  945
  946
  947
  948
  949
  950
  951
  952
  953
  954
  955
  956
  957
  958
  959
  960
  961
  962
  963
  964
  965
  966
  967
  968
  969
  970
  971
  972
  973
  974
  975
  976
  977
  978
  979
  980
  981
  982
  983
  984
  985
  986
  987
  988
  989
  990
  991
  992
  993
  994
  995
  996
  997
  998
  999
 1000
 1001
 1002
 1003
 1004
 1005
 1006
 1007
 1008
 1009
 1010
 1011
 1012
 1013
 1014
 1015
 1016
 1017
 1018
 1019
 1020
 1021
 1022
 1023
 1024
 1025
 1026
 1027
 1028
 1029
 1030
 1031
 1032
 1033
 1034
 1035
 1036
 1037
 1038
 1039
 1040
 1041
 1042
 1043
 1044
 1045
 1046
 1047
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_01) on Mon Apr 23 21:09:00 GMT 2007 -->
<TITLE>
lalr_state
</TITLE>

<META NAME="keywords" CONTENT="java_cup.lalr_state class">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="lalr_state";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/lalr_state.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../java_cup/lalr_item_set.html" title="class in java_cup"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../java_cup/lalr_transition.html" title="class in java_cup"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../index.html?java_cup/lalr_state.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="lalr_state.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
java_cup</FONT>
<BR>
Class lalr_state</H2>
<PRE>
java.lang.Object
<IMG SRC="../resources/inherit.gif" ALT="extended by "><B>java_cup.lalr_state</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>lalr_state</B><DT>extends java.lang.Object</DL>
</PRE>

<P>
This class represents a state in the LALR viable prefix recognition machine.
A state consists of an LALR item set and a set of transitions to other
states under terminal and non-terminal symbols. Each state represents
a potential configuration of the parser. If the item set of a state
includes an item such as: <pre>
[A ::= B * C d E , {a,b,c}]
</pre>
this indicates that when the parser is in this state it is currently
looking for an A of the given form, has already seen the B, and would
expect to see an a, b, or c after this sequence is complete. Note that
the parser is normally looking for several things at once (represented
by several items). In our example above, the state would also include
items such as: <pre>
[C ::= * X e Z, {d}]
[X ::= * f, {e}]
</pre>
to indicate that it was currently looking for a C followed by a d (which
would be reduced into a C, matching the first symbol in our production
above), and the terminal f followed by e.<p>

At runtime, the parser uses a viable prefix recognition machine made up
of these states to parse. The parser has two operations, shift and reduce.
In a shift, it consumes one Symbol and makes a transition to a new state.
This corresponds to "moving the dot past" a terminal in one or more items
in the state (these new shifted items will then be found in the state at
the end of the transition). For a reduce operation, the parser is
signifying that it is recognizing the RHS of some production. To do this
it first "backs up" by popping a stack of previously saved states. It
pops off the same number of states as are found in the RHS of the
production. This leaves the machine in the same state is was in when the
parser first attempted to find the RHS. From this state it makes a
transition based on the non-terminal on the LHS of the production. This
corresponds to placing the parse in a configuration equivalent to having
replaced all the symbols from the the input corresponding to the RHS with
the symbol on the LHS.
<P>

<P>
<DL>
<DT><B>Version:</B></DT>
<DD>last updated: 7/3/96</DD>
<DT><B>Author:</B></DT>
<DD>Frank Flannery</DD>
<DT><B>See Also:</B><DD><A HREF="../java_cup/lalr_item.html" title="class in java_cup"><CODE>lalr_item</CODE></A>,
<A HREF="../java_cup/lalr_item_set.html" title="class in java_cup"><CODE>lalr_item_set</CODE></A>,
<A HREF="../java_cup/lalr_transition.html" title="class in java_cup"><CODE>lalr_transition</CODE></A></DL>
<HR>

<P>
<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;java.util.Hashtable</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#_all">_all</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Collection of all states.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;java.util.Hashtable</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#_all_kernels">_all_kernels</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hash table to find states by their kernels (i.e, the original,
unclosed, set of items -- which uniquely define the state).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#_index">_index</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Index of this state in the parse tables</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../java_cup/lalr_item_set.html" title="class in java_cup">lalr_item_set</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#_items">_items</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The item set for this state.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../java_cup/lalr_transition.html" title="class in java_cup">lalr_transition</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#_transitions">_transitions</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;List of transitions out of this state.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#next_index">next_index</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Static counter for assigning unique state indexes.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#lalr_state(java_cup.lalr_item_set)">lalr_state</A></B>(<A HREF="../java_cup/lalr_item_set.html" title="class in java_cup">lalr_item_set</A>&nbsp;itms)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor for building a state from a set of items.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#add_transition(java_cup.symbol, java_cup.lalr_state)">add_transition</A></B>(<A HREF="../java_cup/symbol.html" title="class in java_cup">symbol</A>&nbsp;on_sym,
<A HREF="../java_cup/lalr_state.html" title="class in java_cup">lalr_state</A>&nbsp;to_st)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add a transition out of this state to another.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.util.Enumeration</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#all()">all</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Collection of all states.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../java_cup/lalr_state.html" title="class in java_cup">lalr_state</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#build_machine(java_cup.production)">build_machine</A></B>(<A HREF="../java_cup/production.html" title="class in java_cup">production</A>&nbsp;start_prod)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Build an LALR viable prefix recognition machine given a start
production.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#build_table_entries(java_cup.parse_action_table, java_cup.parse_reduce_table)">build_table_entries</A></B>(<A HREF="../java_cup/parse_action_table.html" title="class in java_cup">parse_action_table</A>&nbsp;act_table,
<A HREF="../java_cup/parse_reduce_table.html" title="class in java_cup">parse_reduce_table</A>&nbsp;reduce_table)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fill in the parse table entries for this state.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#dump_state(java_cup.lalr_state)">dump_state</A></B>(<A HREF="../java_cup/lalr_state.html" title="class in java_cup">lalr_state</A>&nbsp;st)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Helper routine for debugging -- produces a dump of the given state
onto System.out.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#equals(java_cup.lalr_state)">equals</A></B>(<A HREF="../java_cup/lalr_state.html" title="class in java_cup">lalr_state</A>&nbsp;other)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equality comparison.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#equals(java.lang.Object)">equals</A></B>(java.lang.Object&nbsp;other)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generic equality comparison.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../java_cup/lalr_state.html" title="class in java_cup">lalr_state</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#find_state(java_cup.lalr_item_set)">find_state</A></B>(<A HREF="../java_cup/lalr_item_set.html" title="class in java_cup">lalr_item_set</A>&nbsp;itms)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Find and return state with a given a kernel item set (or null if not
found).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#fix_with_precedence(java_cup.production, int, java_cup.parse_action_row, java_cup.parse_action)">fix_with_precedence</A></B>(<A HREF="../java_cup/production.html" title="class in java_cup">production</A>&nbsp;p,
int&nbsp;term_index,
<A HREF="../java_cup/parse_action_row.html" title="class in java_cup">parse_action_row</A>&nbsp;table_row,
<A HREF="../java_cup/parse_action.html" title="class in java_cup">parse_action</A>&nbsp;act)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Procedure that attempts to fix a shift/reduce error by using
precedences.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#hashCode()">hashCode</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Produce a hash code.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#index()">index</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Index of this state in the parse tables</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../java_cup/parse_action.html" title="class in java_cup">parse_action</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#insert_action(java_cup.parse_action, java_cup.parse_action, int)">insert_action</A></B>(<A HREF="../java_cup/parse_action.html" title="class in java_cup">parse_action</A>&nbsp;a1,
<A HREF="../java_cup/parse_action.html" title="class in java_cup">parse_action</A>&nbsp;a2,
int&nbsp;act_type)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../java_cup/parse_action.html" title="class in java_cup">parse_action</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#insert_reduce(java_cup.parse_action, java_cup.parse_action)">insert_reduce</A></B>(<A HREF="../java_cup/parse_action.html" title="class in java_cup">parse_action</A>&nbsp;a1,
<A HREF="../java_cup/parse_action.html" title="class in java_cup">parse_action</A>&nbsp;a2)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../java_cup/parse_action.html" title="class in java_cup">parse_action</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#insert_shift(java_cup.parse_action, java_cup.parse_action)">insert_shift</A></B>(<A HREF="../java_cup/parse_action.html" title="class in java_cup">parse_action</A>&nbsp;a1,
<A HREF="../java_cup/parse_action.html" title="class in java_cup">parse_action</A>&nbsp;a2)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../java_cup/lalr_item_set.html" title="class in java_cup">lalr_item_set</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#items()">items</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The item set for this state.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#number()">number</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Indicate total number of states there are.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#propagate_all_lookaheads()">propagate_all_lookaheads</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Propagate lookahead sets through the constructed viable prefix
recognizer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#propagate_lookaheads()">propagate_lookaheads</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Propagate lookahead sets out of this state.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#report_conflicts(java_cup.terminal_set)">report_conflicts</A></B>(<A HREF="../java_cup/terminal_set.html" title="class in java_cup">terminal_set</A>&nbsp;conflict_set)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Produce warning messages for all conflicts found in this state.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#report_reduce_reduce(java_cup.lalr_item, java_cup.lalr_item)">report_reduce_reduce</A></B>(<A HREF="../java_cup/lalr_item.html" title="class in java_cup">lalr_item</A>&nbsp;itm1,
<A HREF="../java_cup/lalr_item.html" title="class in java_cup">lalr_item</A>&nbsp;itm2)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Produce a warning message for one reduce/reduce conflict.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#report_shift_reduce(java_cup.lalr_item, int)">report_shift_reduce</A></B>(<A HREF="../java_cup/lalr_item.html" title="class in java_cup">lalr_item</A>&nbsp;red_itm,
int&nbsp;conflict_sym)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Produce a warning message for one shift/reduce conflict.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#toString()">toString</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convert to a string.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../java_cup/lalr_transition.html" title="class in java_cup">lalr_transition</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../java_cup/lalr_state.html#transitions()">transitions</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;List of transitions out of this state.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, finalize, getClass, notify, notifyAll, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="_all"><!-- --></A><H3>
_all</H3>
<PRE>
protected static java.util.Hashtable <B>_all</B></PRE>
<DL>
<DD>Collection of all states.
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="_all_kernels"><!-- --></A><H3>
_all_kernels</H3>
<PRE>
protected static java.util.Hashtable <B>_all_kernels</B></PRE>
<DL>
<DD>Hash table to find states by their kernels (i.e, the original,
unclosed, set of items -- which uniquely define the state). This table
stores state objects using (a copy of) their kernel item sets as keys.
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="next_index"><!-- --></A><H3>
next_index</H3>
<PRE>
protected static int <B>next_index</B></PRE>
<DL>
<DD>Static counter for assigning unique state indexes.
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="_items"><!-- --></A><H3>
_items</H3>
<PRE>
protected <A HREF="../java_cup/lalr_item_set.html" title="class in java_cup">lalr_item_set</A> <B>_items</B></PRE>
<DL>
<DD>The item set for this state.
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="_transitions"><!-- --></A><H3>
_transitions</H3>
<PRE>
protected <A HREF="../java_cup/lalr_transition.html" title="class in java_cup">lalr_transition</A> <B>_transitions</B></PRE>
<DL>
<DD>List of transitions out of this state.
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="_index"><!-- --></A><H3>
_index</H3>
<PRE>
protected int <B>_index</B></PRE>
<DL>
<DD>Index of this state in the parse tables
<P>
<DL>
</DL>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="lalr_state(java_cup.lalr_item_set)"><!-- --></A><H3>
lalr_state</H3>
<PRE>
public <B>lalr_state</B>(<A HREF="../java_cup/lalr_item_set.html" title="class in java_cup">lalr_item_set</A>&nbsp;itms)
throws <A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></PRE>
<DL>
<DD>Constructor for building a state from a set of items.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>itms</CODE> - the set of items that makes up this state.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></CODE></DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="all()"><!-- --></A><H3>
all</H3>
<PRE>
public static java.util.Enumeration <B>all</B>()</PRE>
<DL>
<DD>Collection of all states.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="number()"><!-- --></A><H3>
number</H3>
<PRE>
public static int <B>number</B>()</PRE>
<DL>
<DD>Indicate total number of states there are.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="find_state(java_cup.lalr_item_set)"><!-- --></A><H3>
find_state</H3>
<PRE>
public static <A HREF="../java_cup/lalr_state.html" title="class in java_cup">lalr_state</A> <B>find_state</B>(<A HREF="../java_cup/lalr_item_set.html" title="class in java_cup">lalr_item_set</A>&nbsp;itms)</PRE>
<DL>
<DD>Find and return state with a given a kernel item set (or null if not
found). The kernel item set is the subset of items that were used to
originally create the state. These items are formed by "shifting the
dot" within items of other states that have a transition to this one.
The remaining elements of this state's item set are added during closure.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>itms</CODE> - the kernel set of the state we are looking for.</DL>
</DD>
</DL>
<HR>

<A NAME="items()"><!-- --></A><H3>
items</H3>
<PRE>
public <A HREF="../java_cup/lalr_item_set.html" title="class in java_cup">lalr_item_set</A> <B>items</B>()</PRE>
<DL>
<DD>The item set for this state.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="transitions()"><!-- --></A><H3>
transitions</H3>
<PRE>
public <A HREF="../java_cup/lalr_transition.html" title="class in java_cup">lalr_transition</A> <B>transitions</B>()</PRE>
<DL>
<DD>List of transitions out of this state.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="index()"><!-- --></A><H3>
index</H3>
<PRE>
public int <B>index</B>()</PRE>
<DL>
<DD>Index of this state in the parse tables
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="dump_state(java_cup.lalr_state)"><!-- --></A><H3>
dump_state</H3>
<PRE>
protected static void <B>dump_state</B>(<A HREF="../java_cup/lalr_state.html" title="class in java_cup">lalr_state</A>&nbsp;st)
throws <A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></PRE>
<DL>
<DD>Helper routine for debugging -- produces a dump of the given state
onto System.out.
<P>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="propagate_all_lookaheads()"><!-- --></A><H3>
propagate_all_lookaheads</H3>
<PRE>
protected static void <B>propagate_all_lookaheads</B>()
throws <A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></PRE>
<DL>
<DD>Propagate lookahead sets through the constructed viable prefix
recognizer. When the machine is constructed, each item that results
in the creation of another such that its lookahead is included in the
other's will have a propagate link set up for it. This allows additions
to the lookahead of one item to be included in other items that it
was used to directly or indirectly create.
<P>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="add_transition(java_cup.symbol, java_cup.lalr_state)"><!-- --></A><H3>
add_transition</H3>
<PRE>
public void <B>add_transition</B>(<A HREF="../java_cup/symbol.html" title="class in java_cup">symbol</A>&nbsp;on_sym,
<A HREF="../java_cup/lalr_state.html" title="class in java_cup">lalr_state</A>&nbsp;to_st)
throws <A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></PRE>
<DL>
<DD>Add a transition out of this state to another.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>on_sym</CODE> - the symbol the transition is under.<DD><CODE>to_st</CODE> - the state the transition goes to.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="build_machine(java_cup.production)"><!-- --></A><H3>
build_machine</H3>
<PRE>
public static <A HREF="../java_cup/lalr_state.html" title="class in java_cup">lalr_state</A> <B>build_machine</B>(<A HREF="../java_cup/production.html" title="class in java_cup">production</A>&nbsp;start_prod)
throws <A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></PRE>
<DL>
<DD>Build an LALR viable prefix recognition machine given a start
production. This method operates by first building a start state
from the start production (based on a single item with the dot at
the beginning and EOF as expected lookahead). Then for each state
it attempts to extend the machine by creating transitions out of
the state to new or existing states. When considering extension
from a state we make a transition on each symbol that appears before
the dot in some item. For example, if we have the items: <pre>
[A ::= a b * X c, {d,e}]
[B ::= a b * X d, {a,b}]
</pre>
in some state, then we would be making a transition under X to a new
state. This new state would be formed by a "kernel" of items
corresponding to moving the dot past the X. In this case: <pre>
[A ::= a b X * c, {d,e}]
[B ::= a b X * Y, {a,b}]
</pre>
The full state would then be formed by "closing" this kernel set of
items so that it included items that represented productions of things
the parser was now looking for. In this case we would items
corresponding to productions of Y, since various forms of Y are expected
next when in this state (see lalr_item_set.compute_closure() for details
on closure). <p>

The process of building the viable prefix recognizer terminates when no
new states can be added. However, in order to build a smaller number of
states (i.e., corresponding to LALR rather than canonical LR) the state
building process does not maintain full loookaheads in all items.
Consequently, after the machine is built, we go back and propagate
lookaheads through the constructed machine using a call to
propagate_all_lookaheads(). This makes use of propagation links
constructed during the closure and transition process.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>start_prod</CODE> - the start production of the grammar
<DT><B>Throws:</B>
<DD><CODE><A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></CODE><DT><B>See Also:</B><DD><A HREF="../java_cup/lalr_item_set.html#compute_closure()"><CODE>lalr_item_set.compute_closure()</CODE></A>,
<A HREF="../java_cup/lalr_state.html#propagate_all_lookaheads()"><CODE>propagate_all_lookaheads()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="propagate_lookaheads()"><!-- --></A><H3>
propagate_lookaheads</H3>
<PRE>
protected void <B>propagate_lookaheads</B>()
throws <A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></PRE>
<DL>
<DD>Propagate lookahead sets out of this state. This recursively
propagates to all items that have propagation links from some item
in this state.
<P>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="build_table_entries(java_cup.parse_action_table, java_cup.parse_reduce_table)"><!-- --></A><H3>
build_table_entries</H3>
<PRE>
public void <B>build_table_entries</B>(<A HREF="../java_cup/parse_action_table.html" title="class in java_cup">parse_action_table</A>&nbsp;act_table,
<A HREF="../java_cup/parse_reduce_table.html" title="class in java_cup">parse_reduce_table</A>&nbsp;reduce_table)
throws <A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></PRE>
<DL>
<DD>Fill in the parse table entries for this state. There are two
parse tables that encode the viable prefix recognition machine, an
action table and a reduce-goto table. The rows in each table
correspond to states of the machine. The columns of the action table
are indexed by terminal symbols and correspond to either transitions
out of the state (shift entries) or reductions from the state to some
previous state saved on the stack (reduce entries). All entries in the
action table that are not shifts or reduces, represent errors. The
reduce-goto table is indexed by non terminals and represents transitions
out of a state on that non-terminal.<p>
Conflicts occur if more than one action needs to go in one entry of the
action table (this cannot happen with the reduce-goto table). Conflicts
are resolved by always shifting for shift/reduce conflicts and choosing
the lowest numbered production (hence the one that appeared first in
the specification) in reduce/reduce conflicts. All conflicts are
reported and if more conflicts are detected than were declared by the
user, code generation is aborted.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>act_table</CODE> - the action table to put entries in.<DD><CODE>reduce_table</CODE> - the reduce-goto table to put entries in.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="fix_with_precedence(java_cup.production, int, java_cup.parse_action_row, java_cup.parse_action)"><!-- --></A><H3>
fix_with_precedence</H3>
<PRE>
protected boolean <B>fix_with_precedence</B>(<A HREF="../java_cup/production.html" title="class in java_cup">production</A>&nbsp;p,
int&nbsp;term_index,
<A HREF="../java_cup/parse_action_row.html" title="class in java_cup">parse_action_row</A>&nbsp;table_row,
<A HREF="../java_cup/parse_action.html" title="class in java_cup">parse_action</A>&nbsp;act)
throws <A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></PRE>
<DL>
<DD>Procedure that attempts to fix a shift/reduce error by using
precedences. --frankf 6/26/96
if a production (also called rule) or the lookahead terminal
has a precedence, then the table can be fixed. if the rule
has greater precedence than the terminal, a reduce by that rule
in inserted in the table. If the terminal has a higher precedence,
it is shifted. if they have equal precedence, then the associativity
of the precedence is used to determine what to put in the table:
if the precedence is left associative, the action is to reduce.
if the precedence is right associative, the action is to shift.
if the precedence is non associative, then it is a syntax error.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>p</CODE> - the production<DD><CODE>term_index</CODE> - the index of the lokahead terminal<DD><CODE>parse_action_row</CODE> - a row of the action table<DD><CODE>act</CODE> - the rule in conflict with the table entry
<DT><B>Throws:</B>
<DD><CODE><A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="insert_action(java_cup.parse_action, java_cup.parse_action, int)"><!-- --></A><H3>
insert_action</H3>
<PRE>
protected <A HREF="../java_cup/parse_action.html" title="class in java_cup">parse_action</A> <B>insert_action</B>(<A HREF="../java_cup/parse_action.html" title="class in java_cup">parse_action</A>&nbsp;a1,
<A HREF="../java_cup/parse_action.html" title="class in java_cup">parse_action</A>&nbsp;a2,
int&nbsp;act_type)
throws <A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></PRE>
<DL>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="insert_shift(java_cup.parse_action, java_cup.parse_action)"><!-- --></A><H3>
insert_shift</H3>
<PRE>
protected <A HREF="../java_cup/parse_action.html" title="class in java_cup">parse_action</A> <B>insert_shift</B>(<A HREF="../java_cup/parse_action.html" title="class in java_cup">parse_action</A>&nbsp;a1,
<A HREF="../java_cup/parse_action.html" title="class in java_cup">parse_action</A>&nbsp;a2)
throws <A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></PRE>
<DL>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="insert_reduce(java_cup.parse_action, java_cup.parse_action)"><!-- --></A><H3>
insert_reduce</H3>
<PRE>
protected <A HREF="../java_cup/parse_action.html" title="class in java_cup">parse_action</A> <B>insert_reduce</B>(<A HREF="../java_cup/parse_action.html" title="class in java_cup">parse_action</A>&nbsp;a1,
<A HREF="../java_cup/parse_action.html" title="class in java_cup">parse_action</A>&nbsp;a2)
throws <A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></PRE>
<DL>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="report_conflicts(java_cup.terminal_set)"><!-- --></A><H3>
report_conflicts</H3>
<PRE>
protected void <B>report_conflicts</B>(<A HREF="../java_cup/terminal_set.html" title="class in java_cup">terminal_set</A>&nbsp;conflict_set)
throws <A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></PRE>
<DL>
<DD>Produce warning messages for all conflicts found in this state.
<P>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="report_reduce_reduce(java_cup.lalr_item, java_cup.lalr_item)"><!-- --></A><H3>
report_reduce_reduce</H3>
<PRE>
protected void <B>report_reduce_reduce</B>(<A HREF="../java_cup/lalr_item.html" title="class in java_cup">lalr_item</A>&nbsp;itm1,
<A HREF="../java_cup/lalr_item.html" title="class in java_cup">lalr_item</A>&nbsp;itm2)
throws <A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></PRE>
<DL>
<DD>Produce a warning message for one reduce/reduce conflict.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>itm1</CODE> - first item in conflict.<DD><CODE>itm2</CODE> - second item in conflict.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="report_shift_reduce(java_cup.lalr_item, int)"><!-- --></A><H3>
report_shift_reduce</H3>
<PRE>
protected void <B>report_shift_reduce</B>(<A HREF="../java_cup/lalr_item.html" title="class in java_cup">lalr_item</A>&nbsp;red_itm,
int&nbsp;conflict_sym)
throws <A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></PRE>
<DL>
<DD>Produce a warning message for one shift/reduce conflict.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>red_itm</CODE> - the item with the reduce.<DD><CODE>conflict_sym</CODE> - the index of the symbol conflict occurs under.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../java_cup/internal_error.html" title="class in java_cup">internal_error</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="equals(java_cup.lalr_state)"><!-- --></A><H3>
equals</H3>
<PRE>
public boolean <B>equals</B>(<A HREF="../java_cup/lalr_state.html" title="class in java_cup">lalr_state</A>&nbsp;other)</PRE>
<DL>
<DD>Equality comparison.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="equals(java.lang.Object)"><!-- --></A><H3>
equals</H3>
<PRE>
public boolean <B>equals</B>(java.lang.Object&nbsp;other)</PRE>
<DL>
<DD>Generic equality comparison.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>equals</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="hashCode()"><!-- --></A><H3>
hashCode</H3>
<PRE>
public int <B>hashCode</B>()</PRE>
<DL>
<DD>Produce a hash code.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>hashCode</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public java.lang.String <B>toString</B>()</PRE>
<DL>
<DD>Convert to a string.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/lalr_state.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../java_cup/lalr_item_set.html" title="class in java_cup"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../java_cup/lalr_transition.html" title="class in java_cup"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../index.html?java_cup/lalr_state.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="lalr_state.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

</BODY>
</HTML>