§1 1 1. Copyright. Copyright c Dave Bone 1998

advertisement
§1
subrule def Grammar
1. Copyright.
c Dave Bone 1998 - 2015
Copyright COPYRIGHT
1
2
SUBRULE DEF THREAD
subrule def Grammar
2. subrule def Thread.
Parse a rule’s subrule expression.
Example of a parallel-parser construct to parse:
/*
file: subrdef.txt
Why: some text examples of sub rule construct.
*/
->
||| "#NULL" NS_identifier::TH_identifier {
op
Csubrule_def* fsm = (Csubrule_def*)parser()->fsm_tbl();
fsm->subrule_def_->add_elem_to_subrule_vector(sf->p2__);
***
}
-> |?| {
op
CAbs_lr1_sym* sym = new LR1_err_no_open_brace;
sym->set_rc(*parser()->current_token(),*parser());
RSVP(sym);
parser()->set_stop_parse(true);
***
}
-> "{"
-> Rvector Rlint Rrhs_expr
3.
Fsm Csubrule def class.
4.
Csubrule def constructor directive.
h Csubrule def constructor directive 4 i ≡
subrule def = 0;
5.
Csubrule def op directive.
h Csubrule def op directive 5 i ≡
if (subrule def 6= 0) {
delete subrule def ;
subrule def = 0;
}
subrule def = new T subrule def ;
subrule def ~ set rc (∗parser ~ start token , __FILE__, __LINE__);
6.
Csubrule def user-declaration directive.
h Csubrule def user-declaration directive 6 i ≡
public: void add sdc to directive (yacco2 ::CAbs lr1 sym ∗ Dir , T syntax code ∗ Sdc );
T subrule def ∗ subrule def ;
§2
§7
subrule def Grammar
7.
CSUBRULE DEF USER-IMPLEMENTATION DIRECTIVE
Csubrule def user-implementation directive.
h Csubrule def user-implementation directive 7 i ≡
void Csubrule def ::add sdc to directive (yacco2 :: CAbs lr1 sym ∗ Dir , T syntax code ∗ Sdc ){ using
namespace NS yacco2 T enum;
using namespace NS yacco2 terminals;
yacco2 :: INTeid = Dir~ enumerated id ; switch (eid ) { case T Enum ::T T op : { T op ∗ k = (
T op ∗ ) Dir ;
k~ syntax code (Sdc );
break; }
default:
{
CAbs lr1 sym ∗ sym = new Err improper directive ;
sym~ set rc (∗Dir , __FILE__, __LINE__);
RSVP_FSM(sym );
parser ~ set stop parse (true );
}
}}
8.
Csubrule def user-prefix-declaration directive.
h Csubrule def user-prefix-declaration directive 8 i ≡
using namespace NS yacco2 terminals;
#include "lint_balls.h"
#include "cweb_or_c_k.h"
#include "subrule_vector.h"
#include "o2_sdc.h"
#include "identifier.h"
#include "dbl_colon.h"
#include "rhs_component.h"
#include "rtn_component.h"
#include "rhs_bnd.h"
#include "parallel_oper.h"
9.
Rsubrule def rule.
Use of |.|to make grammar lr(1) due to s/r conflict on |||.
Rsubrule_def
|.|
Rvector
Rcommon_comments
Rrhs_expr
h Rsubrule def subrule 1 op directive 9 i ≡
Csubrule def ∗ fsm = ( Csubrule def ∗ ) rule info .parser ~ fsm tbl ;
fsm~ subrule def ~ bld its tree ( );
RSVP(fsm~ subrule def );
fsm~ subrule def = 0;
10.
Rvector rule.
Rvector
|||
->
NS_subrule_vector::TH_subrule_vector
3
4
RCOMMON COMMENTS RULE
11.
subrule def Grammar
§11
Rcommon comments rule.
Basic possible lint balls and a single cweb comment fronting the sub rule definition.
Rcommon_comments
Rlint_epi
12.
Rcweb_k_epi
Rlint_epi
Rrhs expr rule.
Use of |.|to make grammar lr(1) due to s/r conflict on |||.
Rrhs_expr
RTorRcomponents_epi
Rstart_thread
Rlint_epi
Rlint_epi
Rchained_dispatcher
Rpotential_codeblk
Rbal_thread_expr
Rlint_epi
Rcalled_thd_eos
Rstart_thread
Rmust_eos
|.|
Rlint_epi
Rpotential_codeblk
Rbal_thread_expr
Rlint_epi
Rlint_epi
Rlint_epi
Rlint_epi
Rcalled_thd_eos
|.|
|.|
Rlint_epi
Rpotential_codeblk
Rlint_epi
Rcalled_proc_op
Rlint_epi
Rcalled_proc_eos
|.|
Rcalled_proc_op
Rlint_epi
Rpotential_codeblk
13.
Rlint_epi
Rchained_dispatcher
|.|
Rbal_called_proc_expr
Rlint_epi
Rpotential_codeblk
Rbal_called_proc_expr
Rlint_epi
Rlint_epi
Rlint_epi
Rcalled_proc_eos
Rlint_epi
Rlint_epi
Rrhs expr ’s subrule 1.
A regular grammar expression containing either or an α string of symbols drawn from the T or R
vocabularies. Why the |.| symbol following RTorRcomponents epi ? There is a shift / reduce conflict
caused by the ||| so let the reduce on this meta terminal.
RTorRcomponents_epi
|.|
1
2
Rmust_eos
3
Rpotential_codeblk
Rlint_epi
4
5
§14
subrule def Grammar
14.
Rrhs expr ’s subrule 2.
RRHS EXPR ’S SUBRULE 2
5
Your standard thread call expression.
Rstart_thread
1
Rlint_epi
Rbal_thread_expr
Rlint_epi
|.|
2
3
4
5
Rcalled_thd_eos
6
15.
Rlint_epi
Rpotential_codeblk
Rlint_epi
7
8
9
Rrhs expr ’s subrule 3.
The new back-to-back chained thread call dispatcher expression. Rchained dispatcher rule supports
nested chained calls. The returned output from the |t| expression becomes the input to the next
Rchained dispatcher |t| expression.
Rstart_thread
1
Rlint_epi
Rbal_thread_expr
Rlint_epi
|.|
2
3
4
5
Rchained_dispatcher
Rlint_epi
6
7
Rcalled_thd_eos
8
Rlint_epi
Rpotential_codeblk
9
10
Rlint_epi
11
16.
Rrhs expr ’s subrule 4.
Your chained procedure call expression. It can be used against a previous T element. Note: a R element
is not allowed as the chained procedure call uses the stacked T of the caller parser as its First set. So what
does Rxxx mean to it? nada.
Rcalled_proc_op
Rlint_epi
Rbal_called_proc_expr
Rlint_epi
1
2
3
4
|.|
Rcalled_proc_eos
Rlint_epi
Rpotential_codeblk
Rlint_epi
5
6
7
8
9
17.
Rrhs expr ’s subrule 5.
The new back-to-back chained thread call dispatcher expression.
Rcalled_proc_op
Rlint_epi
Rbal_called_proc_expr
Rlint_epi
1
2
3
4
|.|
Rchained_dispatcher
Rlint_epi
Rcalled_proc_eos
Rlint_epi
5
6
7
8
9
Rpotential_codeblk
Rlint_epi
10
11
6
RSTART THREAD RULE
18.
subrule def Grammar
Rstart thread rule.
Rstart_thread
|||
|||
NS_parallel_oper::TH_parallel_oper
h Rstart thread subrule 1 op directive 18 i ≡
Csubrule def ∗ fsm = ( Csubrule def ∗ ) rule info .parser ~ fsm tbl ;
T sym tbl report card report card ;
using namespace yacco2 stbl;
find sym in stbl (report card , ∗sf ~ p2 ~ id );
if (report card .action ≡ T sym tbl report card ::not fnd ) {
CAbs lr1 sym ∗ sym = new Err subrule use undefined T ;
sym~ set rc (∗rule info .parser ~ start token , __FILE__, __LINE__);
RSVP(sym );
rule info .parser ~ set stop parse (true );
return;
}
CAbs lr1 sym ∗ sym = report card .tbl entry ~ symbol ; T in stbl ∗ t = ( T in stbl ∗ ) sym ;
refered T ∗ rT = ∗(t~ xref t ( )~ rbegin ( ));
fsm~ subrule def ~ add elem to subrule vector (rT );
rT~ its subrule def (fsm~ subrule def );
19.
Rbal thread expr rule.
Rbal_thread_expr
Rrtned_T
20.
Rlint_epi
Rcalled_thread
Rrtned T rule.
Rrtned_T
|||
T-in-stbl
|||
|?|
NULL
|||
NULL
NS_rtn_component::TH_rtn_component
|?|
|||
21.
Rrtned T ’s subrule 1.
|||
1
T-in-stbl
2
NS_rtn_component::TH_rtn_component
3
h Rrtned T subrule 1 op directive 21 i ≡
Csubrule def ∗ fsm = ( Csubrule def ∗ ) rule info .parser ~ fsm tbl ;
refered T ∗ reft = ∗(sf ~ p2 ~ xref t ( )~ rbegin ( ));
fsm~ subrule def ~ add elem to subrule vector (reft );
reft~ its subrule def (fsm~ subrule def );
§18
§22
subrule def Grammar
22.
Rrtned T ’s subrule 2.
|||
|?|
1
2
RRTNED T ’S SUBRULE 2
NULL
3
Other returned types are errors.
h Rrtned T subrule 2 op directive 22 i ≡
CAbs lr1 sym ∗ sym = new Err not T for rtned token from th ( );
sym~ set rc (∗sf ~ p2 , __FILE__, __LINE__);
RSVP(sym );
rule info .parser ~ set stop parse (true );
23.
Rrtned T ’s subrule 3.
|?|
1
h Rrtned T subrule 3 op directive 23 i ≡
CAbs lr1 sym ∗ sym = new Err not T for rtned token from th ( );
sym~ set rc (∗sf ~ p1 , __FILE__, __LINE__);
RSVP(sym );
rule info .parser ~ set stop parse (true );
24.
Rrtned T ’s subrule 4.
|||
|||
1
2
NULL
3
h Rrtned T subrule 4 op directive 24 i ≡
Csubrule def ∗ fsm = ( Csubrule def ∗ ) rule info .parser ~ fsm tbl ;
fsm~ subrule def ~ add elem to subrule vector (sf ~ p2 );
25.
Rcalled thread rule.
Rcalled_thread
Rns
Rdbl_colon
Rth_name
RNULL
26.
Rns
1
Rcalled thread ’s subrule 1.
Rdbl_colon
2
Rth_name
3
h Rcalled thread subrule 1 op directive 26 i ≡
Csubrule def ∗ fsm = ( Csubrule def ∗ ) rule info .parser ~ fsm tbl ;
T called thread eosubrule ∗ sym = new T called thread eosubrule (sf ~ p1 ~ ns , sf ~ p3 ~ thd nm );
sym~ set rc (∗sf ~ p1 ~ ns , __FILE__, __LINE__);
sym~ its subrule def (fsm~ subrule def );
fsm~ subrule def ~ add elem to subrule vector (sym );
7
8
RNULL RULE
27.
subrule def Grammar
RNULL rule.
RNULL
|||
#NULL
NS_identifier::TH_identifier
h RNULL subrule 1 op directive 27 i ≡
Csubrule def ∗ fsm = ( Csubrule def ∗ ) rule info .parser ~ fsm tbl ;
T null call thread eosubrule ∗ sym = new T null call thread eosubrule ;
sym~ set rc (∗sf ~ p2 , __FILE__, __LINE__);
sym~ its subrule def (fsm~ subrule def );
fsm~ subrule def ~ add elem to subrule vector (sym );
sf ~ p2 ~ set auto delete (true );
28.
Rns rule.
Rns
|||
identifier
|||
|?|
NULL
NULL
|?|
29.
Rns user-declaration directive.
h Rns user-declaration directive 29 i ≡
public: T identifier ∗ ns ;
30.
Rns ’s subrule 1.
|||
1
identifier
2
NULL
3
h Rns subrule 1 op directive 30 i ≡
ns = sf ~ p2 ;
31.
Rns ’s subrule 2.
|||
|?|
1
2
NULL
3
h Rns subrule 2 op directive 31 i ≡
CAbs lr1 sym ∗ sym = new Err not id for ns in th stmt ( );
sym~ set rc (∗sf ~ p2 , __FILE__, __LINE__);
RSVP(sym );
rule info .parser ~ set stop parse (true );
§27
§32
subrule def Grammar
32.
Rns ’s subrule 3.
|?|
1
h Rns subrule 3 op directive 32 i ≡
CAbs lr1 sym ∗ sym = new Err not id for ns in th stmt ( );
sym~ set rc (∗sf ~ p1 , __FILE__, __LINE__);
RSVP(sym );
rule info .parser ~ set stop parse (true );
33.
Rdbl colon rule.
Rdbl_colon
|||
::
|||
|?|
NS_dbl_colon::TH_dbl_colon
NULL
|?|
34.
Rdbl colon ’s subrule 1.
|||
1
::
2
NS_dbl_colon::TH_dbl_colon
3
h Rdbl colon subrule 1 op directive 34 i ≡
sf ~ p2 ~ set auto delete (true );
35.
Rdbl colon ’s subrule 2.
|||
|?|
1
2
NULL
3
h Rdbl colon subrule 2 op directive 35 i ≡
CAbs lr1 sym ∗ sym = new Err not dbl colon in th stmt ( );
sym~ set rc (∗sf ~ p2 , __FILE__, __LINE__);
RSVP(sym );
rule info .parser ~ set stop parse (true );
36.
Rdbl colon ’s subrule 3.
|?|
1
h Rdbl colon subrule 3 op directive 36 i ≡
CAbs lr1 sym ∗ sym = new Err not dbl colon in th stmt ( );
sym~ set rc (∗sf ~ p1 , __FILE__, __LINE__);
RSVP(sym );
rule info .parser ~ set stop parse (true );
RNS ’S SUBRULE 3
9
10
RTH NAME RULE
37.
Rth name rule.
subrule def Grammar
Rth_name
|||
identifier
|||
|?|
NS_identifier::TH_identifier
NULL
|?|
38.
Rth name user-declaration directive.
h Rth name user-declaration directive 38 i ≡
public: T identifier ∗ thd nm ;
39.
Rth name ’s subrule 1.
|||
1
identifier
2
NS_identifier::TH_identifier
3
h Rth name subrule 1 op directive 39 i ≡
thd nm = sf ~ p2 ;
40.
Rth name ’s subrule 2.
|||
|?|
1
2
NULL
3
h Rth name subrule 2 op directive 40 i ≡
CAbs lr1 sym ∗ sym = new Err not id for th name in th stmt ( );
sym~ set rc (∗sf ~ p2 , __FILE__, __LINE__);
RSVP(sym );
rule info .parser ~ set stop parse (true );
Rth name ’s subrule 3.
41.
|?|
1
h Rth name subrule 3 op directive 41 i ≡
CAbs lr1 sym ∗ sym = new Err not id for th name in th stmt ( );
sym~ set rc (∗sf ~ p1 , __FILE__, __LINE__);
RSVP(sym );
rule info .parser ~ set stop parse (true );
§37
§42
subrule def Grammar
42.
Rcalled proc op rule.
RCALLED PROC OP RULE
Rcalled_proc_op
|||
|t|
NULL
h Rcalled proc op subrule 1 op directive 42 i ≡
Csubrule def ∗ fsm = ( Csubrule def ∗ ) rule info .parser ~ fsm tbl ;
T sym tbl report card report card ;
using namespace yacco2 stbl;
find sym in stbl (report card , ∗sf ~ p2 ~ id );
if (report card .action ≡ T sym tbl report card ::not fnd ) {
CAbs lr1 sym ∗ sym = new Err subrule use undefined T ;
sym~ set rc (∗rule info .parser ~ start token , __FILE__, __LINE__);
RSVP(sym );
rule info .parser ~ set stop parse (true );
return;
}
CAbs lr1 sym ∗ sym = report card .tbl entry ~ symbol ; T in stbl ∗ t = ( T in stbl ∗ ) sym ;
refered T ∗ rT = ∗(t~ xref t ( )~ rbegin ( ));
fsm~ subrule def ~ add elem to subrule vector (rT );
rT~ its subrule def (fsm~ subrule def );
43.
Rbal called proc expr rule.
Rbal_called_proc_expr
Rrtned_T
44.
Rlint_epi
Rcalled_proc_name
Rcalled proc name rule.
Rcalled_proc_name
Rns
Rdbl_colon
Rth_name
RNULL
45.
Rns
1
Rcalled proc name ’s subrule 1.
Rdbl_colon
2
Rth_name
3
h Rcalled proc name subrule 1 op directive 45 i ≡
Csubrule def ∗ fsm = ( Csubrule def ∗ ) rule info .parser ~ fsm tbl ;
T called thread eosubrule ∗ sym = new T called thread eosubrule (sf ~ p1 ~ ns , sf ~ p3 ~ thd nm );
sym~ set rc (∗sf ~ p1 ~ ns , __FILE__, __LINE__);
sym~ its subrule def (fsm~ subrule def );
fsm~ subrule def ~ add elem to subrule vector (sym );
11
12
RTORRCOMPONENTS EPI RULE
46.
RTorRcomponents epi rule.
subrule def Grammar
RTorRcomponents_epi
.
RTorRcomponents
47.
RTorRcomponents rule.
RTorRcomponents
RTorRcomponent
Rlint_epi
RTorRcomponents
48.
RTorRcomponent
Rlint_epi
RTorRcomponent rule.
RTorRcomponent
49.
|||
rule-in-stbl
|||
T-in-stbl
|||
|?|
NS_rhs_component::TH_rhs_component
NULL
NULL
RTorRcomponent ’s subrule 1.
|||
1
rule-in-stbl
2
NS_rhs_component::TH_rhs_component
3
h RTorRcomponent subrule 1 op directive 49 i ≡
Csubrule def ∗ fsm = ( Csubrule def ∗ ) rule info .parser ~ fsm tbl ;
refered rule ∗ refr = ∗(sf ~ p2 ~ xref r ( )~ rbegin ( ));
fsm~ subrule def ~ add elem to subrule vector (refr );
refr~ its subrule def (fsm~ subrule def );
50.
RTorRcomponent ’s subrule 2.
|||
1
T-in-stbl
2
NULL
3
h RTorRcomponent subrule 2 op directive 50 i ≡
Csubrule def ∗ fsm = ( Csubrule def ∗ ) rule info .parser ~ fsm tbl ;
refered T ∗ reft = ∗(sf ~ p2 ~ xref t ( )~ rbegin ( ));
fsm~ subrule def ~ add elem to subrule vector (reft );
reft~ its subrule def (fsm~ subrule def );
§46
§51
subrule def Grammar
51.
RTorRcomponent ’s subrule 3.
|||
|?|
1
2
RTORRCOMPONENT ’S SUBRULE 3
NULL
3
h RTorRcomponent subrule 3 op directive 51 i ≡
CAbs lr1 sym ∗ sym = new Err not T or R in subrule expr ( );
sym~ set rc (∗sf ~ p2 , __FILE__, __LINE__);
RSVP(sym );
rule info .parser ~ set stop parse (true );
52.
Rchained dispatcher rule.
Rchained_dispatcher
53.
|||
rule-in-stbl
|||
T-in-stbl
|||
|?|
NS_rhs_component::TH_rhs_component
NULL
NULL
Rchained dispatcher ’s subrule 1.
|||
1
rule-in-stbl
2
NS_rhs_component::TH_rhs_component
3
h Rchained dispatcher subrule 1 op directive 53 i ≡
Csubrule def ∗ fsm = ( Csubrule def ∗ ) rule info .parser ~ fsm tbl ;
refered rule ∗ refr = ∗(sf ~ p2 ~ xref r ( )~ rbegin ( ));
fsm~ subrule def ~ add elem to subrule vector (refr );
refr~ its subrule def (fsm~ subrule def );
Rchained dispatcher ’s subrule 2.
54.
|||
1
T-in-stbl
2
NULL
3
h Rchained dispatcher subrule 2 op directive 54 i ≡
Csubrule def ∗ fsm = ( Csubrule def ∗ ) rule info .parser ~ fsm tbl ;
CAbs lr1 sym ∗ sym = new Err not a Rule ( );
sym~ set rc (∗sf ~ p2 , __FILE__, __LINE__);
RSVP(sym );
rule info .parser ~ set stop parse (true );
55.
Rchained dispatcher ’s subrule 3.
|||
|?|
1
2
NULL
3
h Rchained dispatcher subrule 3 op directive 55 i ≡
CAbs lr1 sym ∗ sym = new Err not a Rule ( );
sym~ set rc (∗sf ~ p2 , __FILE__, __LINE__);
RSVP(sym );
rule info .parser ~ set stop parse (true );
13
14
RMUST EOS RULE
56.
Rmust eos rule.
subrule def Grammar
Rmust_eos
|||
eosubrule
NS_rhs_bnd::TH_rhs_bnd
|?|
|||
57.
|?|
NULL
Rmust eos ’s subrule 1.
|||
1
eosubrule
2
NS_rhs_bnd::TH_rhs_bnd
3
h Rmust eos subrule 1 op directive 57 i ≡
Csubrule def ∗ fsm = ( Csubrule def ∗ ) rule info .parser ~ fsm tbl ;
fsm~ subrule def ~ add elem to subrule vector (sf ~ p2 );
sf ~ p2 ~ its subrule def (fsm~ subrule def );
Rmust eos ’s subrule 2.
58.
|?|
1
h Rmust eos subrule 2 op directive 58 i ≡
CAbs lr1 sym ∗ sym = new Err not eos in subrule expr ( );
sym~ set rc (∗sf ~ p1 , __FILE__, __LINE__);
RSVP(sym );
rule info .parser ~ set stop parse (true );
Rmust eos ’s subrule 3.
59.
|||
|?|
1
2
NULL
3
h Rmust eos subrule 3 op directive 59 i ≡
CAbs lr1 sym ∗ sym = new Err not eos in subrule expr ( );
sym~ set rc (∗sf ~ p2 , __FILE__, __LINE__);
RSVP(sym );
rule info .parser ~ set stop parse (true );
sf ~ p2 ~ set auto delete (true );
60.
Rcalled thd eos rule.
Rcalled_thd_eos
|||
|?|
eosubrule
NS_rhs_bnd::TH_rhs_bnd
§56
§61
subrule def Grammar
61.
Rcalled thd eos ’s subrule 1.
|||
1
eosubrule
2
RCALLED THD EOS ’S SUBRULE 1
NS_rhs_bnd::TH_rhs_bnd
3
h Rcalled thd eos subrule 1 op directive 61 i ≡
Csubrule def ∗ fsm = ( Csubrule def ∗ ) rule info .parser ~ fsm tbl ;
fsm~ subrule def ~ add elem to subrule vector (sf ~ p2 );
sf ~ p2 ~ its subrule def (fsm~ subrule def );
62.
Rcalled thd eos ’s subrule 2.
|?|
1
h Rcalled thd eos subrule 2 op directive 62 i ≡
CAbs lr1 sym ∗ sym = new Err not eos in subrule expr ( );
sym~ set rc (∗sf ~ p1 , __FILE__, __LINE__);
RSVP(sym );
rule info .parser ~ set stop parse (true );
63.
Rcalled proc eos rule.
Rcalled_proc_eos
|||
eosubrule
NS_rhs_bnd::TH_rhs_bnd
|?|
64.
Rcalled proc eos ’s subrule 1.
|||
1
eosubrule
2
NS_rhs_bnd::TH_rhs_bnd
3
h Rcalled proc eos subrule 1 op directive 64 i ≡
Csubrule def ∗ fsm = ( Csubrule def ∗ ) rule info .parser ~ fsm tbl ;
fsm~ subrule def ~ add elem to subrule vector (sf ~ p2 );
sf ~ p2 ~ its subrule def (fsm~ subrule def );
Rcalled proc eos ’s subrule 2.
65.
|?|
1
h Rcalled proc eos subrule 2 op directive 65 i ≡
CAbs lr1 sym ∗ sym = new Err not eos in subrule expr ( );
sym~ set rc (∗sf ~ p1 , __FILE__, __LINE__);
RSVP(sym );
rule info .parser ~ set stop parse (true );
66.
Rpotential codeblk rule.
Rpotential_codeblk
Rpotential_directives
15
16
RPOTENTIAL DIRECTIVES RULE
67.
Rpotential directives rule.
subrule def Grammar
Rpotential_directives
.
{
Rlint_epi
Rclose_brace
68.
Rmust_directive_phrase
Rmaybe_more_directives
Rlint_epi
Rmust directive phrase rule.
Rmust_directive_phrase
Rdirective_cweb_k_epi
Rlint_epi
Rmust_directive
Rsyntax_code
Rlint_epi
h Rmust directive phrase subrule 1 op directive 68 i ≡
AST ∗ cwebt = sf ~ p1 ~ cweb t ;
Rmust directive ∗ dir = sf ~ p3 ;
Rsyntax code ∗ sdc = sf ~ p4 ;
if (cwebt 6= 0) {
sdc~ syntax code ~ add cweb marker (cwebt );
}
Csubrule def ∗ fsm = ( Csubrule def ∗ ) rule info .parser ~ fsm tbl ;
fsm~ add sdc to directive (dir~ directive , sdc~ syntax code );
69.
Rmust directive rule.
Rmust_directive
|||
#op
NS_identifier::TH_identifier
|||
|?|
NULL
|?|
70.
Rmust directive constructor directive.
h Rmust directive constructor directive 70 i ≡
directive = 0;
71.
Rmust directive op directive.
h Rmust directive op directive 71 i ≡
if (directive ≡ 0) return;
Csubrule def ∗ fsm = ( Csubrule def ∗ ) rule info .parser ~ fsm tbl ;
CAbs lr1 sym ∗ result = fsm~ subrule def ~ add directive to subrule (directive , rule info .parser );
if (result ≡ 0) return;
/∗ ok added ∗/
directive ~ set auto delete (true );
/∗ dup: delete when popped from stack ∗/
RSVP(result );
rule info .parser ~ set stop parse (true );
§67
§72
subrule def Grammar
72.
Rmust directive user-declaration directive.
RMUST DIRECTIVE USER-DECLARATION DIRECTIVE
h Rmust directive user-declaration directive 72 i ≡
CAbs lr1 sym ∗ directive ;
73.
Rmust directive ’s subrule 1.
|||
#op
1
2
NS_identifier::TH_identifier
3
h Rmust directive subrule 1 op directive 73 i ≡
directive = sf ~ p2 ;
74.
Rmust directive ’s subrule 2.
|||
|?|
1
2
NULL
3
h Rmust directive subrule 2 op directive 74 i ≡
directive = 0;
sf ~ p2 ~ set auto delete (true );
CAbs lr1 sym ∗ sym = new Err bad directive ;
sym~ set rc (∗sf ~ p2 , __FILE__, __LINE__);
RSVP(sym );
rule info .parser ~ set stop parse (true );
Rmust directive ’s subrule 3.
75.
|?|
1
h Rmust directive subrule 3 op directive 75 i ≡
CAbs lr1 sym ∗ sym = new Err no directive present ;
sym~ set rc (∗rule info .parser ~ current token ( ), __FILE__, __LINE__);
RSVP(sym );
rule info .parser ~ set stop parse (true );
76.
Rclose brace rule.
Rclose_brace
|?|
}
77.
Rclose brace ’s subrule 1.
|?|
1
h Rclose brace subrule 1 op directive 77 i ≡
CAbs lr1 sym ∗ sym = new Err no close brace ;
sym~ set rc (∗rule info .parser ~ current token ( ), __FILE__, __LINE__);
RSVP(sym );
rule info .parser ~ set stop parse (true );
17
18
RMAYBE MORE DIRECTIVES RULE
78.
Rmaybe more directives rule.
subrule def Grammar
Rmaybe_more_directives
.
Rmaybe_directive_phrases
79.
Rmaybe directive phrases rule.
Rmaybe_directive_phrases
Rmaybe_directive_phrase
Rmaybe_directive_phrases
80.
Rmaybe_directive_phrase
Rmaybe directive phrase rule.
Rmaybe_directive_phrase
Rdirective_cweb_k_epi
Rdirective
81.
Rlint_epi
Rsyntax_code
Rdirective
Rsyntax_code
Rlint_epi
Rlint_epi
Rmaybe directive phrase ’s subrule 1.
Rdirective_cweb_k_epi
Rlint_epi
1
2
Rdirective
3
Rsyntax_code
Rlint_epi
4
5
h Rmaybe directive phrase subrule 1 op directive 81 i ≡
AST ∗ cwebt = sf ~ p1 ~ cweb t ;
Rdirective ∗ dir = sf ~ p3 ;
Rsyntax code ∗ sdc = sf ~ p4 ;
if (cwebt 6= 0) {
sdc~ syntax code ~ add cweb marker (cwebt );
}
Csubrule def ∗ fsm = ( Csubrule def ∗ ) rule info .parser ~ fsm tbl ;
fsm~ add sdc to directive (dir~ directive , sdc~ syntax code );
82.
Rmaybe directive phrase ’s subrule 2.
Rdirective
1
Rsyntax_code
Rlint_epi
2
3
h Rmaybe directive phrase subrule 2 op directive 82 i ≡
Rdirective ∗ dir = sf ~ p1 ;
Rsyntax code ∗ sdc = sf ~ p2 ; Csubrule def ∗ fsm = ( Csubrule def ∗ ) rule info .parser ~ fsm tbl ;
fsm~ add sdc to directive (dir~ directive , sdc~ syntax code );
§78
§83
subrule def Grammar
83.
Rdirective phrase rule.
RDIRECTIVE PHRASE RULE
Rdirective_phrase
Rlint_epi
Rdirective_cweb_k_epi
Rlint_epi
Rdirective
Rsyntax_code
Rlint_epi
h Rdirective phrase subrule 1 op directive 83 i ≡
AST ∗ cwebt = sf ~ p2 ~ cweb t ;
Rdirective ∗ dir = sf ~ p4 ;
Rsyntax code ∗ sdc = sf ~ p5 ;
if (cwebt 6= 0) {
sdc~ syntax code ~ add cweb marker (cwebt );
}
Csubrule def ∗ fsm = ( Csubrule def ∗ ) rule info .parser ~ fsm tbl ;
fsm~ add sdc to directive (dir~ directive , sdc~ syntax code );
84.
Rdirective rule.
Rdirective
85.
|||
#op
NS_identifier::TH_identifier
|||
|?|
NULL
Rdirective constructor directive.
h Rdirective constructor directive 85 i ≡
directive = 0;
86.
Rdirective op directive.
h Rdirective op directive 86 i ≡
if (directive ≡ 0) return;
Csubrule def ∗ fsm = ( Csubrule def ∗ ) rule info .parser ~ fsm tbl ;
CAbs lr1 sym ∗ result = fsm~ subrule def ~ add directive to subrule (directive , rule info .parser );
if (result ≡ 0) return;
/∗ ok added ∗/
directive ~ set auto delete (true );
/∗ dup: delete when popped from stack ∗/
RSVP(result );
rule info .parser ~ set stop parse (true );
87.
Rdirective user-declaration directive.
h Rdirective user-declaration directive 87 i ≡
CAbs lr1 sym ∗ directive ;
88.
Rdirective ’s subrule 1.
|||
#op
1
2
NS_identifier::TH_identifier
3
h Rdirective subrule 1 op directive 88 i ≡
directive = sf ~ p2 ;
19
20
RDIRECTIVE ’S SUBRULE 2
89.
Rdirective ’s subrule 2.
|||
|?|
1
2
NULL
3
h Rdirective subrule 2 op directive 89 i ≡
directive = 0;
sf ~ p2 ~ set auto delete (true );
CAbs lr1 sym ∗ sym = new Err bad directive ;
sym~ set rc (∗sf ~ p2 , __FILE__, __LINE__);
RSVP(sym );
rule info .parser ~ set stop parse (true );
90.
Rsyntax code rule.
Rsyntax_code
91.
|||
syntax-code
|||
|?|
NS_o2_sdc::TH_o2_sdc
NULL
Rsyntax code constructor directive.
h Rsyntax code constructor directive 91 i ≡
syntax code = 0;
92.
Rsyntax code user-declaration directive.
h Rsyntax code user-declaration directive 92 i ≡
T syntax code ∗ syntax code ;
93.
Rsyntax code ’s subrule 1.
|||
syntax-code
1
2
NS_o2_sdc::TH_o2_sdc
3
h Rsyntax code subrule 1 op directive 93 i ≡
syntax code = sf ~ p2 ;
94.
Rsyntax code ’s subrule 2.
|||
|?|
1
2
NULL
3
h Rsyntax code subrule 2 op directive 94 i ≡
RSVP(sf ~ p2 );
rule info .parser ~ set stop parse (true );
95.
Rlint epi rule.
Rlint_epi
|||
|.|
lint
NS_lint_balls::TH_lint_balls
subrule def Grammar
§89
§96
subrule def Grammar
96.
Rdirective cweb k epi rule.
RDIRECTIVE CWEB K EPI RULE
Rdirective_cweb_k_epi
.
97.
NS_cweb_or_c_k::TH_cweb_or_c_k
|||
cweb-comment
|||
comment-overrun
|||
comment
NULL
NULL
Rdirective cweb k epi constructor directive.
h Rdirective cweb k epi constructor directive 97 i ≡
cweb t = 0;
98.
Rdirective cweb k epi user-declaration directive.
h Rdirective cweb k epi user-declaration directive 98 i ≡
AST ∗ cweb t ;
99.
Rdirective cweb k epi ’s subrule 2.
|||
1
cweb-comment
2
NS_cweb_or_c_k::TH_cweb_or_c_k
3
h Rdirective cweb k epi subrule 2 op directive 99 i ≡
T cweb comment ∗ k = sf ~ p2 ;
AST ∗ cwebk t = new AST(∗k);
cweb t = new AST( );
T cweb marker ∗ cw = new T cweb marker (cweb t );
cw~ set rc (∗k, __FILE__, __LINE__);
AST ::join pts (∗cweb t , ∗cwebk t );
AST ::set content (∗cweb t , ∗cw );
100.
|||
1
Rdirective cweb k epi ’s subrule 3.
comment-overrun
2
NULL
3
h Rdirective cweb k epi subrule 3 op directive 100 i ≡
RSVP(sf ~ p2 );
rule info .parser ~ set stop parse (true );
101.
|||
1
Rdirective cweb k epi ’s subrule 4.
comment
2
NULL
3
h Rdirective cweb k epi subrule 4 op directive 101 i ≡
sf ~ p2 ~ set auto delete (true );
21
22
RCWEB K EPI RULE
102.
subrule def Grammar
Rcweb k epi rule.
Rcweb_k_epi
NS_cweb_or_c_k::TH_cweb_or_c_k
|||
cweb-comment
|||
comment-overrun
|||
comment
NULL
NULL
.
103.
|||
1
Rcweb k epi ’s subrule 1.
cweb-comment
2
NS_cweb_or_c_k::TH_cweb_or_c_k
3
h Rcweb k epi subrule 1 op directive 103 i ≡
Csubrule def ∗ fsm = ( Csubrule def ∗ ) rule info .parser ~ fsm tbl ;
T cweb comment ∗ k = sf ~ p2 ;
AST ∗ cwebk t = new AST(∗k);
AST ∗ cweb t = new AST( );
T cweb marker ∗ cw = new T cweb marker (cweb t );
cw~ set rc (∗k, __FILE__, __LINE__);
AST ::join pts (∗cweb t , ∗cwebk t );
AST ::set content (∗cweb t , ∗cw );
fsm~ subrule def ~ add cweb marker (cweb t );
104.
|||
1
Rcweb k epi ’s subrule 2.
comment-overrun
2
NULL
3
h Rcweb k epi subrule 2 op directive 104 i ≡
RSVP(sf ~ p2 );
rule info .parser ~ set stop parse (true );
105.
|||
1
Rcweb k epi ’s subrule 3.
comment
2
NULL
3
h Rcweb k epi subrule 3 op directive 105 i ≡
sf ~ p2 ~ set auto delete (true );
§102
§106
subrule def Grammar
106.
First Set Language for O2linker .
/*
File: subrule_def.fsc
Date and Time: Fri Jan 2 15:33:55 2015
*/
transitive
y
grammar-name "subrule_def"
name-space
"NS_subrule_def"
thread-name "TH_subrule_def"
monolithic
n
file-name
"subrule_def.fsc"
no-of-T
569
list-of-native-first-set-terminals 0
end-list-of-native-first-set-terminals
list-of-transitive-threads 1
NS_subrule_vector::TH_subrule_vector
end-list-of-transitive-threads
list-of-used-threads 10
NS_cweb_or_c_k::TH_cweb_or_c_k
NS_dbl_colon::TH_dbl_colon
NS_identifier::TH_identifier
NS_lint_balls::TH_lint_balls
NS_o2_sdc::TH_o2_sdc
NS_parallel_oper::TH_parallel_oper
NS_rhs_bnd::TH_rhs_bnd
NS_rhs_component::TH_rhs_component
NS_rtn_component::TH_rtn_component
NS_subrule_vector::TH_subrule_vector
end-list-of-used-threads
fsm-comments
"Parse a subrule: into the valley of sin..."
FIRST SET LANGUAGE FOR
O2linker
23
24
107.
LR1 STATE NETWORK
subrule def Grammar
§107
Lr1 State Network.
State: 1 state type: s
subrule element
⇒
←
rule
c Rvector
c Rsubrule def
→ R#
2
1
⇒||| arbitration−code: ←
rule
→ R#
t Rvector
2
⇒−>
←
rule
t Rvector
⇒Rvector
←
rule
t Rsubrule def
⇒|.|
←
rule
c Rlint epi
c Rlint epi
t Rsubrule def
c Rcommon comments
→ R#
2
→ R#
1
→ R#
34
34
1
3
⇒Rcommon comments
←
rule
→ R#
16
c RTorRcomponents epi
c Rstart thread
5
c Rcalled proc op
13
c RTorRcomponent
18
c RTorRcomponent
18
c RTorRcomponent
18
t Rsubrule def
1
c Rrhs expr
4
c Rrhs expr
4
c Rrhs expr
4
c Rrhs expr
4
4
c Rrhs expr
c RTorRcomponents epi
16
c RTorRcomponents
17
c RTorRcomponents
17
sr# Po ←
1
1 ||| - > NS subrule vector::TH subrule vector
1
1 Rvector |.|
sr# Po ←
1
2 ->
sr# Po ←
1
3
sr# Po ←
1
2 |.|
sr#
1
2
1
1
sr#
1
1
1
1
2
3
1
3
2
4
5
1
2
2
1
State: 2 state type: s
subrule element
State: 3 state type: r
subrule element
State: 4 state type: s
subrule element
State: 5 state type: s
subrule element
Po ←
1 ||| lint NS lint balls::TH lint balls
1 |.|
3 Rcommon comments Rrhs expr
1 Rlint epi Rcweb k epi Rlint epi
Po
1
1
1
1
1
1
4
1
1
1
1
1
1
1
1
⇒||| arbitration−code: AR Rstart thread
←
rule
→ R# sr# Po
t RTorRcomponent
18 3
2
t Rstart thread
5
1
2
t Rcalled proc op
13 1
2
t RTorRcomponent
18 2
2
t RTorRcomponent
18 1
2
→ Brn Gto Red LA
1
2
3
1
4
13
→ Brn Gto Red LA
1
3
3
→ Brn Gto Red LA
1
0
3
1
→ Brn Gto Red LA
1
5
13
→ Brn
5
5
1
5
Gto
24
26
6
57
Red LA
25
26
13
59
←
→ Brn
6
||| ||| NS parallel oper::TH parallel oper
6
||| |t| NULL
6
||| rule-in-stbl NS rhs component::TH rhs component
6
||| T-in-stbl NULL
6
||| |?| NULL
6
Rrhs expr
1
Rstart thread Rlint epi
6
Rstart thread Rlint epi
6
Rcalled proc op Rlint epi
6
Rcalled proc op Rlint epi
6
RTorRcomponents epi |.|
6
RTorRcomponents
6
RTorRcomponents RT orRcomponent
6
6
RTorRcomponent Rlint epi
Gto
0
7
7
7
7
7
13
14
14
32
32
47
52
52
55
Red LA
6
1
9
10
12
11
8
13
27
31
46
42
51
52
54
56
Gto
8
9
10
11
12
Red LA
8
9
10
11
12
State: 6 state type: s/r
subrule element
←
|?|
|||
|t|
T-in-stbl
rule-in-stbl
State: 7 state type: s
subrule element
→ Brn
6
6
6
6
6
§107
subrule def Grammar
⇒|?|
←
rule
t RTorRcomponent
→ R#
18
⇒||| arbitration−code: ←
rule
→ R#
5
t Rstart thread
⇒|t|
←
rule
t Rcalled proc op
⇒T −in−stbl
←
rule
t RTorRcomponent
⇒rule−in−stbl
←
rule
t RTorRcomponent
⇒Rrhs expr
←
rule
t Rsubrule def
⇒Rstart thread
←
rule
c Rlint epi
c Rlint epi
t Rrhs expr
t Rrhs expr
⇒Rlint epi
←
rule
c Rrtned T
c Rrtned T
c Rrtned T
c Rrtned T
t Rrhs expr
t Rrhs expr
c Rbal thread expr
⇒Rbal thread expr
←
rule
c Rlint epi
c Rlint epi
t Rrhs expr
t Rrhs expr
⇒Rlint epi
←
rule
t Rrhs expr
→ R#
13
→ R#
18
→ R#
18
→ R#
1
→ R#
34
34
4
4
→ R#
7
7
7
7
4
4
6
→ R#
34
34
4
4
→ R#
4
LR1 STATE NETWORK
sr# Po ←
3
3
sr# Po ←
1
3
sr# Po ←
1
3
sr# Po ←
2
3
sr# Po ←
1
3
sr# Po ←
1
5
sr#
1
2
3
2
sr#
3
1
2
4
3
2
1
sr#
1
2
3
2
State: 8 state type: r
subrule element
State: 9 state type: r
subrule element
State: 10 state type: r
subrule element
State: 11 state type: r
subrule element
State: 12 state type: r
subrule element
State: 13 state type: r
subrule element
State: 14 state type: s
subrule element
Po ←
1 ||| lint NS lint balls::TH lint balls
1 |.|
2 Rlint epi Rbal thread expr
2 Rlint epi Rbal thread expr
Po
1
1
1
1
3
3
1
State: 15 state type: s
subrule element
←
|?|
||| T-in-stbl NS rtn component::TH rtn component
||| |?| NULL
||| ||| NULL
Rbal thread expr Rlint epi
Rbal thread expr Rlint epi
Rrtned T Rlint epi
State: 16 state type: s
subrule element
Po ←
1 ||| lint NS lint balls::TH lint balls
1 |.|
4 Rlint epi |.|
4 Rlint epi |.|
sr# Po ←
3
5 |.|
State: 17 state type: s
subrule element
25
→ Brn Gto Red LA
6
0
8
2
→ Brn Gto Red LA
6
0
9
2
→ Brn Gto Red LA
6
0
10 2
→ Brn Gto Red LA
6
0
11 2
→ Brn Gto Red LA
6
0
12 2
→ Brn Gto Red LA
1
0
13 3
→ Brn
14
14
6
6
Gto
24
26
15
15
Red LA
25
26
27
31
→ Brn
15
15
15
15
6
6
15
Gto
60
61
61
61
16
16
65
Red LA
60
64
62
63
27
31
72
→ Brn
16
16
6
6
Gto
24
26
17
17
Red LA
25
26
27
31
→ Brn Gto Red LA
6
18 27
26
LR1 STATE NETWORK
t Rrhs expr
⇒|.|
←
rule
c Rcalled thd eos
c Rchained dispatcher
c Rchained dispatcher
c Rchained dispatcher
c Rcalled thd eos
t Rrhs expr
t Rrhs expr
⇒Rchained dispatcher
←
rule
c Rlint epi
c Rlint epi
t Rrhs expr
⇒Rlint epi
←
rule
c Rcalled thd eos
c Rcalled thd eos
t Rrhs expr
⇒Rcalled thd eos
←
rule
c Rlint epi
c Rlint epi
t Rrhs expr
⇒Rlint epi
←
rule
c Rpotential directives
c Rpotential directives
t Rrhs expr
c Rpotential codeblk
⇒Rpotential codeblk
←
rule
c Rlint epi
c Rlint epi
t Rrhs expr
4
→ R#
21
19
19
19
21
4
4
→ R#
34
34
4
→ R#
21
21
4
→ R#
34
34
4
→ R#
24
24
4
23
→ R#
34
34
4
⇒||| arbitration−code: ←
rule
→ R#
34
t Rlint epi
⇒lint
←
rule
t Rlint epi
⇒|.|
→ R#
34
subrule def Grammar
2
sr#
2
1
3
2
1
3
2
sr#
1
2
3
sr#
2
1
3
sr#
1
2
3
sr#
1
2
3
1
sr#
1
2
3
5
Po
1
1
1
1
1
6
6
6
|.|
18
31
Gto
81
82
82
82
82
19
28
Red LA
81
85
83
84
86
27
31
→ Brn
19
19
6
Gto
24
26
20
Red LA
25
26
27
→ Brn
20
20
6
Gto
81
87
21
Red LA
81
86
27
→ Brn
21
21
6
Gto
24
26
22
Red LA
25
26
27
→ Brn
22
22
6
22
Gto
0
88
23
94
Red LA
22 2
93
27
94
→ Brn
23
23
6
Gto
24
26
27
Red LA
25
26
27
State: 18 state type: s
subrule element
←
→ Brn
|?|
18
||| rule-in-stbl NS rhs component::TH rhs component
18
||| |?| NULL
18
||| T-in-stbl NULL
18
||| eosubrule NS rhs bnd::TH rhs bnd
18
Rchained dispatcher Rlint epi
6
Rcalled thd eos Rlint epi
6
State: 19 state type: s
subrule element
Po ←
1 ||| lint NS lint balls::TH lint balls
1 |.|
7 Rlint epi Rcalled thd eos
State: 20 state type: s
subrule element
Po ←
1 |?|
1 ||| eosubrule NS rhs bnd::TH rhs bnd
8 Rcalled thd eos Rlint epi
State: 21 state type: s
subrule element
Po ←
1 ||| lint NS lint balls::TH lint balls
1 |.|
9 Rlint epi Rpotential codeblk Rlint epi
State: 22 state type: s/r
subrule element
Po ←
1
1 {
10 Rpotential codeblk Rlint epi
1 Rpotential directives
State: 23 state type: s
subrule element
Po ←
1 ||| lint NS lint balls::TH lint balls
1 |.|
11 Rlint epi
sr# Po ←
1
2 lint
sr# Po ←
1
3
State: 24 state type: s
subrule element
State: 25 state type: r
subrule element
State: 26 state type:
r
§107
→ Brn Gto Red LA
23 25 25
→ Brn Gto Red LA
23 0
25 4
§107
subrule def Grammar
←
rule
t Rlint epi
⇒Rlint epi
←
rule
t Rrhs expr
⇒Rcalled thd eos
←
rule
c Rlint epi
c Rlint epi
t Rrhs expr
⇒Rlint epi
←
rule
c Rpotential directives
c Rpotential directives
t Rrhs expr
c Rpotential codeblk
⇒Rpotential codeblk
←
rule
c Rlint epi
c Rlint epi
t Rrhs expr
⇒Rlint epi
←
rule
t Rrhs expr
⇒Rcalled proc op
←
rule
c Rlint epi
c Rlint epi
t Rrhs expr
t Rrhs expr
→ R#
34
→ R#
4
→ R#
34
34
4
→ R#
24
24
4
23
→ R#
34
34
4
→ R#
4
→ R#
34
34
4
4
⇒Rlint epi
←
rule
→ R#
7
c Rrtned T
c Rrtned T
7
c Rrtned T
7
7
c Rrtned T
c Rbal called proc expr
14
t Rrhs expr
4
4
t Rrhs expr
⇒Rbal called proc expr
←
rule
c Rlint epi
c Rlint epi
t Rrhs expr
→ R#
34
34
4
LR1 STATE NETWORK
sr# Po ←
2
2
sr# Po ←
3
12
sr#
1
2
2
sr#
1
2
2
1
sr#
1
2
2
sr#
3
1
2
4
1
4
5
sr#
1
2
4
State: 27 state type: r
subrule element
State: 28 state type: s
subrule element
Po ←
1 ||| lint NS lint balls::TH lint balls
1 |.|
7 Rlint epi Rpotential codeblk Rlint epi
State: 29 state type: s/r
subrule element
Po ←
1
1 {
8 Rpotential codeblk Rlint epi
1 Rpotential directives
State: 30 state type: s
subrule element
Po ←
1 ||| lint NS lint balls::TH lint balls
1 |.|
9 Rlint epi
sr# Po ←
2
10
sr#
1
2
4
5
subrule element
State: 31 state type: r
subrule element
State: 32 state type: s
subrule element
Po ←
1 ||| lint NS lint balls::TH lint balls
1 |.|
2 Rlint epi Rbal called proc expr
2 Rlint epi Rbal called proc expr
Po
1
1
1
1
1
3
3
State: 33 state type: s
subrule element
←
|?|
||| T-in-stbl NS rtn component::TH rtn component
||| |?| NULL
||| ||| NULL
Rrtned T Rlint epi
Rbal called proc expr Rlint epi
Rbal called proc expr Rlint epi
State: 34 state type: s
subrule element
Po ←
1 ||| lint NS lint balls::TH lint balls
1 |.|
4 Rlint epi |.|
27
→ Brn Gto Red LA
23 0
26 4
→ Brn Gto Red LA
6
0
27 3
→ Brn
28
28
6
Gto
24
26
29
Red LA
25
26
31
→ Brn
29
29
6
29
Gto
0
88
30
94
Red LA
29 2
93
31
94
→ Brn
30
30
6
Gto
24
26
31
Red LA
25
26
31
→ Brn Gto Red LA
6
0
31 3
→ Brn
32
32
6
6
Gto
24
26
33
33
Red LA
25
26
46
42
→ Brn
33
33
33
33
33
6
6
Gto
60
61
61
61
95
34
34
Red LA
60
64
62
63
101
46
42
→ Brn
34
34
6
Gto
24
26
35
Red LA
25
26
46
28
LR1 STATE NETWORK
t Rrhs expr
⇒Rlint epi
←
rule
t Rrhs expr
t Rrhs expr
⇒|.|
←
rule
c Rcalled proc eos
c Rchained dispatcher
c Rchained dispatcher
c Rcalled proc eos
c Rchained dispatcher
t Rrhs expr
t Rrhs expr
⇒Rchained dispatcher
←
rule
c Rlint epi
c Rlint epi
t Rrhs expr
⇒Rlint epi
←
rule
c Rcalled proc eos
c Rcalled proc eos
t Rrhs expr
⇒Rcalled proc eos
←
rule
c Rlint epi
c Rlint epi
t Rrhs expr
⇒Rlint epi
←
rule
c Rpotential directives
c Rpotential directives
t Rrhs expr
c Rpotential codeblk
⇒Rpotential codeblk
←
rule
c Rlint epi
c Rlint epi
t Rrhs expr
⇒Rlint epi
←
rule
t Rrhs expr
4
→ R#
4
4
→ R#
22
19
19
22
19
4
4
→ R#
34
34
4
→ R#
22
22
4
→ R#
34
34
4
→ R#
24
24
4
23
→ R#
34
34
4
→ R#
4
subrule def Grammar
5
4
Rlint epi
sr# Po ←
4
5 |.|
5
5 |.|
sr#
2
1
3
1
2
5
4
sr#
1
2
5
sr#
2
1
5
sr#
1
2
5
sr#
1
2
5
1
sr#
1
2
5
Po
1
1
1
1
1
6
6
|.|
State: 35 state type: s
subrule element
6
←
→ Brn
|?|
36
||| rule-in-stbl NS rhs component::TH rhs component
36
||| |?| NULL
36
||| eosubrule NS rhs bnd::TH rhs bnd
36
||| T-in-stbl NULL
36
Rchained dispatcher Rlint epi
6
Rcalled proc eos Rlint epi
6
Po ←
1 ||| lint NS lint balls::TH lint balls
1 |.|
7 Rlint epi Rcalled proc eos
State: 38 state type: s
subrule element
Po ←
1 |?|
1 ||| eosubrule NS rhs bnd::TH rhs bnd
8 Rcalled proc eos Rlint epi
State: 39 state type: s
subrule element
Po ←
1 ||| lint NS lint balls::TH lint balls
1 |.|
9 Rlint epi Rpotential codeblk Rlint epi
State: 40 state type: s/r
subrule element
Po ←
1
1 {
10 Rpotential codeblk Rlint epi
1 Rpotential directives
State: 41 state type: s
subrule element
Po ←
1 ||| lint NS lint balls::TH lint balls
1 |.|
11 Rlint epi
sr# Po ←
5
12
State: 42 state type: r
subrule element
42
→ Brn Gto Red LA
6
36 46
6
36 42
State: 36 state type: s
subrule element
State: 37 state type: s
subrule element
35
§107
Gto
102
103
103
103
103
37
43
Red LA
102
85
83
104
84
42
46
→ Brn
37
37
6
Gto
24
26
38
Red LA
25
26
42
→ Brn
38
38
6
Gto
102
105
39
Red LA
102
104
42
→ Brn
39
39
6
Gto
24
26
40
Red LA
25
26
42
→ Brn
40
40
6
40
Gto
0
88
41
94
Red LA
40 2
93
42
94
→ Brn
41
41
6
Gto
24
26
42
Red LA
25
26
42
→ Brn Gto Red LA
6
0
42 3
§107
subrule def Grammar
⇒Rcalled proc eos
←
rule
c Rlint epi
c Rlint epi
t Rrhs expr
→ R#
34
34
4
⇒Rlint epi
←
rule
c Rpotential directives
c Rpotential directives
t Rrhs expr
c Rpotential codeblk
⇒Rpotential codeblk
←
rule
c Rlint epi
c Rlint epi
t Rrhs expr
→ R#
34
34
4
⇒Rlint epi
←
rule
t Rrhs expr
⇒RT orRcomponents
←
rule
t Rrhs expr
→ R#
4
⇒Rmust eos
←
rule
c Rpotential directives
c Rpotential directives
t Rrhs expr
c Rpotential codeblk
⇒Rlint epi
←
rule
t Rrhs expr
sr#
1
2
4
sr#
1
2
4
1
sr#
1
2
4
State: 43 state type: s
subrule element
Po ←
1 ||| lint NS lint balls::TH lint balls
1 |.|
7 Rlint epi Rpotential codeblk Rlint epi
State: 44 state type: s/r
subrule element
Po ←
1
1 {
8 Rpotential codeblk Rlint epi
1 Rpotential directives
State: 45 state type: s
subrule element
Po ←
1 ||| lint NS lint balls::TH lint balls
1 |.|
9 Rlint epi
sr# Po ←
4
10
epi
⇒|.|
←
rule
c Rmust eos
c Rmust eos
c Rmust eos
t Rrhs expr
⇒Rpotential codeblk
←
rule
c Rlint epi
c Rlint epi
t Rrhs expr
→ R#
24
24
4
23
LR1 STATE NETWORK
→ R#
4
→ R#
20
20
20
4
→ R#
24
24
4
23
→ R#
34
34
4
→ R#
4
sr# Po ←
1
2 |.|
sr#
2
1
3
1
sr#
1
2
1
1
sr#
1
2
1
Po
1
1
1
3
State: 46 state type: r
subrule element
State: 47 state type: s
subrule element
State: 48 state type: s
subrule element
←
|?|
||| eosubrule NS rhs bnd::TH rhs bnd
||| |?| NULL
Rmust eos Rpotential codeblk Rlint epi
State: 49 state type: s/r
subrule element
Po ←
1
1 {
4 Rpotential codeblk Rlint epi
1 Rpotential directives
State: 50 state type: s
subrule element
Po ←
1 ||| lint NS lint balls::TH lint balls
1 |.|
5 Rlint epi
sr# Po ←
1
6
State: 51 state type: r
subrule element
29
→ Brn
43
43
6
Gto
24
26
44
Red LA
25
26
46
→ Brn
44
44
6
44
Gto
0
88
45
94
Red LA
44 2
93
46
94
→ Brn
45
45
6
Gto
24
26
46
Red LA
25
26
46
→ Brn Gto Red LA
6
0
46 3
→ Brn Gto Red LA
6
48 51
→ Brn
48
48
48
6
Gto
106
107
107
49
Red LA
106
109
108
51
→ Brn
49
49
6
49
Gto
0
88
50
94
Red LA
49 2
93
51
94
→ Brn
50
50
6
Gto
24
26
51
Red LA
25
26
51
→ Brn Gto Red LA
6
0
51 3
30
LR1 STATE NETWORK
⇒RT orRcomponents
←
rule
→ R#
16
t RTorRcomponents epi
c RTorRcomponent
18
c RTorRcomponent
18
c RTorRcomponent
18
t RTorRcomponents
17
⇒RT orRcomponent
←
rule
c Rlint epi
c Rlint epi
t RTorRcomponents
⇒Rlint epi
←
rule
t RTorRcomponents
⇒RT orRcomponent
←
rule
c Rlint epi
c Rlint epi
t RTorRcomponents
⇒Rlint epi
←
rule
t RTorRcomponents
⇒Rlint epi
←
rule
c Rcweb k epi
c Rcweb k epi
c Rcweb k epi
c Rcweb k epi
t Rcommon comments
⇒Rcweb k epi
←
rule
c Rlint epi
c Rlint epi
t Rcommon comments
⇒Rlint epi
←
rule
t Rcommon comments
⇒|?|
←
rule
t Rrtned T
⇒|||
arbitration−code: → R#
34
34
17
→ R#
17
→ R#
34
34
17
→ R#
17
→ R#
36
36
36
36
3
→ R#
34
34
3
→ R#
3
→ R#
7
subrule def Grammar
sr#
2
1
2
3
2
sr#
1
2
2
Po
2
1
1
1
2
State: 52 state type: s/r
subrule element
←
||| rule-in-stbl NS rhs component::TH rhs component
||| T-in-stbl NULL
||| |?| NULL
RTorRcomponent Rlint epi
State: 53 state type: s
subrule element
Po ←
1 ||| lint NS lint balls::TH lint balls
1 |.|
3 Rlint epi
State: 54 state type: r
subrule element
sr# Po ←
2
4
sr#
1
2
1
State: 55 state type: s
subrule element
Po ←
1 ||| lint NS lint balls::TH lint balls
1 |.|
2 Rlint epi
State: 56 state type: r
subrule element
sr# Po ←
1
3
sr#
4
1
2
3
1
sr#
1
2
1
Po
1
1
1
1
2
←
|||
|||
|||
State: 57 state type: s/r
subrule element
cweb-comment NS cweb or c k::TH cweb or c k
comment-overrun NULL
comment NULL
Rcweb k epi
Rlint epi
State: 58 state type: s
subrule element
Po ←
1 ||| lint NS lint balls::TH lint balls
1 |.|
3 Rlint epi
sr# Po ←
1
4
sr# Po ←
3
2
State: 59 state type: r
subrule element
State: 60 state type: r
subrule element
State: 61 state type:
s
§107
→ Brn
6
52
52
52
6
Gto
0
110
110
110
53
Red LA
52 1
12
11
8
54
→ Brn
53
53
6
Gto
24
26
54
Red LA
25
26
54
→ Brn Gto Red LA
6
0
54 2
→ Brn
55
55
6
Gto
24
26
56
Red LA
25
26
56
→ Brn Gto Red LA
6
0
56 2
→ Brn
57
57
57
57
5
Gto
0
111
111
111
58
Red LA
57 2
113
114
112
59
→ Brn
58
58
5
Gto
24
26
59
Red LA
25
26
59
→ Brn Gto Red LA
5
0
59 2
→ Brn Gto Red LA
15 0
60 2
§107
subrule def Grammar
←
rule
t Rrtned T
t Rrtned T
t Rrtned T
⇒|?|
←
rule
t Rrtned T
→ R#
7
7
7
→ R#
7
⇒||| arbitration−code: ←
rule
→ R#
t Rrtned T
7
⇒T −in−stbl
←
rule
t Rrtned T
⇒Rrtned T
←
rule
c Rlint epi
c Rlint epi
t Rbal thread expr
⇒Rlint epi
←
rule
c Rns
c Rns
c RNULL
c Rns
t Rbal thread expr
c Rcalled thread
c Rcalled thread
⇒|?|
←
t Rns
rule
→ R#
7
→ R#
34
34
6
→ R#
10
10
9
10
6
8
8
→ R#
10
⇒||| arbitration−code: ←
rule
→ R#
t Rns
10
t Rns
10
t RNULL
9
⇒|?|
←
t Rns
rule
⇒identif ier
←
rule
t Rns
⇒#N U LL
→ R#
10
→ R#
10
LR1 STATE NETWORK
sr#
2
4
1
Po ←
2 |?|
2 |||
2 T-in-stbl
State: 62 state type: r
subrule element
sr# Po ←
2
3
State: 63 state type: r
subrule element
sr# Po ←
4
3
State: 64 state type: r
subrule element
sr# Po ←
1
3
sr#
1
2
1
sr#
3
1
1
2
1
2
1
State: 65 state type: s
subrule element
Po ←
1 ||| lint NS lint balls::TH lint balls
1 |.|
2 Rlint epi Rcalled thread
Po
1
1
1
1
3
1
1
State: 66 state type: s
subrule element
←
|?|
||| identifier NULL
||| # NULL NS identifier::TH identifier
||| |?| NULL
Rcalled thread
RNULL
Rns
Rdbl colon
sr# Po ←
3
2
sr#
2
1
1
subrule element
Po ←
2 |?|
2 identifier
2
# NULL
sr# Po ←
2
3
sr# Po ←
1
3
State: 67 state type: r
subrule element
State: 68 state type: s
subrule element
State: 69 state type: r
subrule element
State: 70 state type: r
subrule element
State: 71 state type:
r
→ Brn
15
15
15
Gto
62
63
64
31
Red LA
62
63
64
→ Brn Gto Red LA
15 0
62 2
→ Brn Gto Red LA
15 0
63 2
→ Brn Gto Red LA
15 0
64 2
→ Brn
65
65
15
Gto
24
26
66
Red LA
25
26
72
→ Brn
66
66
66
66
15
66
66
Gto
67
68
68
68
72
73
74
Red LA
67
70
71
69
72
73
80
→ Brn Gto Red LA
66 0
67 5
→ Brn
66
66
66
Gto
69
70
71
Red LA
69
70
71
→ Brn Gto Red LA
66 0
69 5
→ Brn Gto Red LA
66 0
70 5
32
LR1 STATE NETWORK
←
rule
t RNULL
⇒Rcalled thread
←
rule
t Rbal thread expr
⇒RN U LL
←
rule
t Rcalled thread
⇒Rns
←
rule
c Rdbl colon
c Rdbl colon
c Rdbl colon
t Rcalled thread
⇒Rdbl colon
←
rule
c Rth name
c Rth name
c Rth name
t Rcalled thread
⇒|?|
←
rule
t Rth name
→ R#
9
→ R#
6
→ R#
8
→ R#
11
11
11
8
→ R#
12
12
12
8
→ R#
12
⇒||| arbitration−code: ←
rule
→ R#
t Rth name
12
t Rth name
12
⇒|?|
←
rule
t Rth name
⇒identif ier
←
rule
t Rth name
⇒Rth name
←
rule
t Rcalled thread
⇒|?|
←
rule
t Rcalled thd eos
⇒|||
←
→ R#
12
→ R#
12
→ R#
8
→ R#
21
subrule def Grammar
sr# Po ←
1
3
sr# Po ←
1
4
sr# Po ←
2
2
sr#
3
2
1
1
sr#
3
1
2
1
Po
1
1
1
2
Po
1
1
1
3
→ R#
State: 72 state type: r
subrule element
State: 73 state type: r
subrule element
State: 74 state type: s
subrule element
←
|?|
||| |?| NULL
||| :: NS dbl colon::TH dbl colon
Rdbl colon Rth name
State: 75 state type: s
subrule element
←
|?|
||| identifier NS identifier::TH identifier
||| |?| NULL
Rth name
sr# Po ←
3
2
sr# Po ←
2
2 |?|
1
2 identifier
sr# Po ←
2
3
sr# Po ←
1
3
sr# Po ←
1
4
sr# Po ←
2
2
arbitration−code: rule
subrule element
sr# Po ←
State: 76 state type: r
subrule element
State: 77 state type: s
subrule element
State: 78 state type: r
subrule element
State: 79 state type: r
subrule element
State: 80 state type: r
subrule element
State: 81 state type: r
subrule element
State: 82 state type: s
subrule element
§107
→ Brn Gto Red LA
66 0
71 2
→ Brn Gto Red LA
15 0
72 2
→ Brn Gto Red LA
66 0
73 2
→ Brn
74
74
74
66
Gto
115
116
116
75
Red LA
115
117
118
80
→ Brn
75
75
75
66
Gto
76
77
77
80
Red LA
76
79
78
80
→ Brn Gto Red LA
75 0
76 2
→ Brn Gto Red LA
75 78 78
75 79 79
→ Brn Gto Red LA
75 0
78 2
→ Brn Gto Red LA
75 0
79 2
→ Brn Gto Red LA
66 0
80 2
→ Brn Gto Red LA
18 0
81 2
→ Brn Gto Red LA
§107
t
t
t
t
subrule def Grammar
19
19
19
21
Rchained dispatcher
Rchained dispatcher
Rchained dispatcher
Rcalled thd eos
⇒|?|
←
rule
t Rchained dispatcher
⇒T −in−stbl
←
rule
t Rchained dispatcher
⇒rule−in−stbl
←
rule
t Rchained dispatcher
⇒eosubrule
←
rule
t Rcalled thd eos
→ R#
19
→ R#
19
→ R#
19
→ R#
21
⇒||| arbitration−code: ←
rule
→ R#
t Rcalled thd eos
21
3
2
1
1
2
2
2
2
→ R#
34
34
24
T-in-stbl
rule-in-stbl
eosubrule
sr# Po ←
3
3
sr# Po ←
2
3
sr# Po ←
1
3
sr# Po ←
1
3
sr# Po ←
1
2 eosubrule
⇒Rlint epi
←
rule
→ R#
c Rdirective cweb k epi
35
c Rdirective cweb k epi
35
c Rdirective cweb k epi
35
c Rdirective cweb k epi
35
t Rpotential directives
24
c Rmust directive phrase
25
⇒Rmust directive phrase
←
rule
→
c Rdirective cweb k epi
c Rmaybe more directives
c Rdirective
c Rdirective cweb k epi
c Rdirective
c Rdirective cweb k epi
c Rdirective cweb k epi
t Rpotential directives
c Rmaybe more directives
c Rmaybe directive phrases
R#
35
28
32
35
32
35
35
24
28
29
sr#
1
2
2
sr#
1
2
3
4
2
1
sr#
1
1
1
2
2
3
4
2
2
2
18
18
18
18
|?|
⇒{
←
rule
c Rlint epi
c Rlint epi
t Rpotential directives
33
LR1 STATE NETWORK
State: 83 state type: r
subrule element
State: 84 state type: r
subrule element
→ Brn Gto Red LA
18 0
84 2
State: 85 state type: r
subrule element
→ Brn Gto Red LA
18 0
85 2
State: 86 state type: r
subrule element
→ Brn Gto Red LA
18 0
86 2
State: 87 state type: s
subrule element
→ Brn Gto Red LA
20 86 86
Po ←
1 ||| lint NS lint balls::TH lint balls
1 |.|
2 Rlint epi Rmust directive phrase
Po
1
1
1
1
1
1
1
4
1
1
←
|||
|||
|||
83
84
85
86
→ Brn Gto Red LA
18 0
83 2
State: 88 state type: s
subrule element
Po
1
1
1
1
3
1
83
84
85
86
→ Brn
88
88
22
State: 89 state type: s/r
subrule element
Gto
24
26
89
→
Red LA
25
26
93
Brn
89
cweb-comment NS cweb or c k::TH cweb or c k
89
comment-overrun NULL
89
comment NULL
89
Rmust directive phrase Rmaybe more directives Rclose brace 22
Rdirective cweb k epi Rlint epi
89
State: 90 state type: s/r
subrule element
Gto
0
119
119
119
90
123
2
←
||| # op NS identifier::TH identifier
||| cweb-comment NS cweb or c k::TH cweb or c k
||| |?| NULL
||| comment-overrun NULL
||| comment NULL
Rmaybe more directives Rclose brace
→ Brn
90
90
90
90
90
90
90
22
Rmaybe directive phrases
90
Rmaybe directive phrases Rmaybe directive phrase
90
Gto
0
0
128
128
128
128
128
91
131
131
Red LA
90 2
90 6
130
121
129
122
120
93
131
132
Red LA
89 2
121
122
120
93
127
34
LR1 STATE NETWORK
c Rmaybe directive phrases
c Rmaybe directive phrase
c Rmaybe directive phrase
29
30
30
⇒Rmaybe more directives
←
rule
→ R#
27
c Rclose brace
c Rclose brace
27
24
t Rpotential directives
⇒Rclose brace
←
rule
c Rlint epi
c Rlint epi
t Rpotential directives
⇒Rlint epi
←
rule
t Rpotential directives
⇒Rpotential directives
←
rule
t Rpotential codeblk
→ R#
34
34
24
→ R#
24
→ R#
23
⇒Rrtned T
←
rule
→ R#
c Rlint epi
34
c Rlint epi
34
t Rbal called proc expr
14
⇒Rlint epi
←
rule
→ R#
c Rns
10
c Rns
10
c RNULL
9
c Rns
10
c Rcalled proc name
15
c Rcalled proc name
15
t Rbal called proc expr
14
⇒RN U LL
←
rule
t Rcalled proc name
⇒Rns
←
rule
c Rdbl colon
c Rdbl colon
c Rdbl colon
t Rcalled proc name
⇒Rdbl
colon
→ R#
15
→ R#
11
11
11
15
subrule def Grammar
1
2
1
sr#
1
2
2
sr#
1
2
2
1
1
1
Rsyntax code
Rdirective cweb k epi Rlint epi
Rdirective
State: 91 state type: s
subrule element
Po ←
1 |?|
1 }
5 Rclose brace Rlint epi
State: 92 state type: s
subrule element
Po ←
1 ||| lint NS lint balls::TH lint balls
1 |.|
6 Rlint epi
State: 93 state type: r
subrule element
sr# Po ←
2
7
State: 94 state type: r
subrule element
sr# Po ←
1
2
sr#
1
2
1
sr#
3
1
1
2
2
1
1
State: 95 state type: s
subrule element
Po ←
1 ||| lint NS lint balls::TH lint balls
1 |.|
2 Rlint epi Rcalled proc name
Po
1
1
1
1
1
1
3
State: 96 state type: s
subrule element
←
|?|
||| identifier NULL
||| # NULL NS identifier::TH identifier
||| |?| NULL
RNULL
Rns
Po
1
1
1
2
Rdbl colon
Rcalled proc name
sr# Po ←
2
2
sr#
3
2
1
1
90
90
90
Rmaybe directive phrase
State: 97 state type: r
subrule element
State: 98 state type: s
subrule element
←
|?|
||| |?| NULL
||| :: NS dbl colon::TH dbl colon
Rdbl colon Rth name
State: 99 state type:
s
§107
141 141
133 135
136 140
→ Brn
91
91
22
Gto
142
143
92
Red LA
142
143
93
→ Brn
92
92
22
Gto
24
26
93
Red LA
25
26
93
→ Brn Gto Red LA
22 0
93 2
→ Brn Gto Red LA
22 0
94 2
→ Brn
95
95
33
Gto
24
26
96
Red LA
25
26
101
→ Brn
96
96
96
96
96
96
33
Gto
67
68
68
68
97
98
101
Red LA
67
70
71
69
97
100
101
→ Brn Gto Red LA
96 0
97 2
→ Brn
98
98
98
96
Gto
115
116
116
99
Red LA
115
117
118
100
§107
←
c
c
c
t
subrule def Grammar
rule
Rth name
Rth name
Rth name
Rcalled proc name
⇒Rth name
←
rule
t Rcalled proc name
→ R#
12
12
12
15
→ R#
15
⇒Rcalled proc name
←
rule
→ R#
14
t Rbal called proc expr
⇒|?|
←
rule
t Rcalled proc eos
→ R#
22
⇒||| arbitration−code: ←
rule
→ R#
t Rchained dispatcher
19
t Rchained dispatcher
19
t Rchained dispatcher
19
t Rcalled proc eos
22
⇒eosubrule
←
rule
t Rcalled proc eos
→ R#
22
⇒||| arbitration−code: ←
rule
→ R#
t Rcalled proc eos
22
⇒|?|
←
rule
t Rmust eos
→ R#
20
⇒||| arbitration−code: ←
rule
→ R#
20
t Rmust eos
t Rmust eos
20
⇒|?|
←
rule
t Rmust eos
⇒eosubrule
←
rule
t Rmust eos
⇒|||
←
→ R#
20
→ R#
20
LR1 STATE NETWORK
sr#
3
1
2
1
Po
1
1
1
3
←
subrule element
|?|
||| identifier NS identifier::TH identifier
||| |?| NULL
Rth name
sr# Po ←
1
4
sr# Po ←
1
4
sr# Po ←
2
2
sr#
3
2
1
1
Po ←
2 |?|
2 T-in-stbl
2 rule-in-stbl
2 eosubrule
sr# Po ←
1
3
sr# Po ←
1
2 eosubrule
sr# Po ←
2
2
sr# Po ←
3
2 |?|
1
2 eosubrule
sr# Po ←
3
3
sr# Po ←
1
3
arbitration−code: rule
→ R#
sr# Po ←
State: 100 state type: r
subrule element
State: 101 state type: r
subrule element
State: 102 state type: r
subrule element
State: 103 state type: s
subrule element
State: 104 state type: r
subrule element
State: 105 state type: s
subrule element
State: 106 state type: r
subrule element
State: 107 state type: s
subrule element
State: 108 state type: r
subrule element
State: 109 state type: r
subrule element
State: 110 state type: s
subrule element
→ Brn
99
99
99
96
Gto
76
77
77
100
35
Red LA
76
79
78
100
→ Brn Gto Red LA
96 0
100 2
→ Brn Gto Red LA
33 0
101 2
→ Brn Gto Red LA
36 0
102 2
→ Brn
36
36
36
36
Gto
83
84
85
104
Red LA
83
84
85
104
→ Brn Gto Red LA
36 0
104 2
→ Brn Gto Red LA
38 104 104
→ Brn Gto Red LA
48 0
106 7
→ Brn Gto Red LA
48 108 108
48 109 109
→ Brn Gto Red LA
48 0
108 7
→ Brn Gto Red LA
48 0
109 7
→ Brn Gto Red LA
36
LR1 STATE NETWORK
t RTorRcomponent
t RTorRcomponent
t RTorRcomponent
18
18
18
⇒||| arbitration−code: ←
rule
→ R#
36
t Rcweb k epi
t Rcweb k epi
36
36
t Rcweb k epi
⇒comment
←
rule
t Rcweb k epi
⇒cweb−comment
←
rule
t Rcweb k epi
⇒comment−overrun
←
rule
t Rcweb k epi
⇒|?|
←
rule
t Rdbl colon
→ R#
36
→ R#
36
→ R#
36
→ R#
11
⇒||| arbitration−code: ←
rule
→ R#
11
t Rdbl colon
t Rdbl colon
11
⇒|?|
←
rule
t Rdbl colon
⇒::
←
rule
t Rdbl colon
→ R#
11
→ R#
11
⇒||| arbitration−code: ←
rule
→ R#
t Rdirective cweb k epi
35
35
t Rdirective cweb k epi
t Rdirective cweb k epi
35
⇒comment
←
rule
→ R#
t Rdirective cweb k epi
35
⇒cweb−comment
←
rule
→ R#
t Rdirective cweb k epi
35
subrule def Grammar
3
2
1
sr#
3
1
2
2
2
2
rule-in-stbl
State: 111 state type: s
subrule element
Po ←
2 comment
2 cweb-comment
2 comment-overrun
sr# Po ←
3
3
sr# Po ←
1
3
sr# Po ←
2
3
sr# Po ←
3
2
sr# Po ←
2
2 |?|
1
2 ::
sr# Po ←
2
3
sr# Po ←
1
3
sr#
4
2
3
52
52
52
|?|
T-in-stbl
State: 112 state type: r
subrule element
State: 113 state type: r
subrule element
State: 114 state type: r
subrule element
State: 115 state type: r
subrule element
State: 116 state type: s
subrule element
State: 117 state type: r
subrule element
State: 118 state type: r
subrule element
State: 119 state type: s
subrule element
Po ←
2 comment
2 cweb-comment
2 comment-overrun
sr# Po ←
4
3
sr# Po ←
2
3
State: 120 state type: r
subrule element
State: 121 state type: r
subrule element
→ Brn
57
57
57
§107
8
11
12
8
11
12
Gto
112
113
114
Red LA
112
113
114
→ Brn Gto Red LA
57 0
112 2
→ Brn Gto Red LA
57 0
113 2
→ Brn Gto Red LA
57 0
114 2
→ Brn Gto Red LA
74 0
115 5
→ Brn Gto Red LA
74 117 117
74 118 118
→ Brn Gto Red LA
74 0
117 5
→ Brn Gto Red LA
74 0
118 5
→ Brn
89
89
89
Gto
120
121
122
Red LA
120
121
122
→ Brn Gto Red LA
89 0
120 2
→ Brn Gto Red LA
89 0
121 2
§107
subrule def Grammar
⇒comment−overrun
←
rule
→ R#
35
t Rdirective cweb k epi
⇒Rdirective cweb k epi
←
rule
→ R#
c Rlint epi
34
34
c Rlint epi
t Rmust directive phrase
25
⇒Rlint epi
←
rule
→ R#
26
c Rmust directive
c Rmust directive
26
26
c Rmust directive
25
t Rmust directive phrase
⇒Rmust directive
←
rule
→ R#
c Rsyntax code
33
c Rsyntax code
33
t Rmust directive phrase
25
⇒Rsyntax code
←
rule
→ R#
c Rlint epi
34
c Rlint epi
34
t Rmust directive phrase
25
⇒Rlint epi
←
rule
→ R#
t Rmust directive phrase
25
⇒||| arbitration−code: ←
rule
→ R#
t Rdirective
32
t Rdirective cweb k epi
35
t Rdirective
32
35
t Rdirective cweb k epi
t Rdirective cweb k epi
35
⇒|?|
←
rule
t Rdirective
⇒#op
←
rule
t Rdirective
⇒Rmaybe
←
→ R#
32
→ R#
32
LR1 STATE NETWORK
sr# Po ←
3
3
sr#
1
2
1
sr#
3
2
1
1
sr#
1
2
1
sr#
1
2
1
Po ←
1 ||| lint NS lint balls::TH lint balls
1 |.|
2 Rlint epi Rmust directive
Po
1
1
1
3
→ R#
State: 124 state type: s
subrule element
←
|?|
||| |?| NULL
||| # op NS identifier::TH identifier
Rmust directive Rsyntax code
State: 125 state type: s
subrule element
Po ←
1 ||| syntax-code NS o2 sdc::TH o2 sdc
1 ||| |?| NULL
4 Rsyntax code Rlint epi
State: 126 state type: s
subrule element
Po ←
1 ||| lint NS lint balls::TH lint balls
1 |.|
5 Rlint epi
State: 127 state type: r
subrule element
sr# Po ←
2
3
sr# Po ←
1
3
State: 128 state type: s
subrule element
sr# Po ←
Gto
24
26
124
Red LA
25
26
127
→ Brn
124
124
124
89
Gto
144
145
145
125
Red LA
144
146
147
127
→ Brn
125
125
89
Gto
148
148
126
Red LA
150
149
127
→ Brn
126
126
89
Gto
24
26
127
Red LA
25
26
127
→ Brn
90
90
90
90
90
State: 129 state type: r
subrule element
Gto
129
120
130
121
122
Red LA
129
120
130
121
122
→ Brn Gto Red LA
90 0
129 9
State: 130 state type: r
subrule element
State: 131 state type: s/r
subrule element
→ Brn
123
123
89
→ Brn Gto Red LA
89 0
127 8
Po ←
2 |?|
2 comment
2
# op
2 cweb-comment
2 comment-overrun
directive phrases
rule
→ Brn Gto Red LA
89 0
122 2
State: 123 state type: s
subrule element
sr# Po ←
1
6
sr#
2
4
1
2
3
State: 122 state type: r
subrule element
37
→ Brn Gto Red LA
90 0
130 9
2
→ Brn Gto Red LA
38
c
t
c
c
c
c
c
t
c
c
LR1 STATE NETWORK
Rdirective cweb k epi
Rmaybe more directives
Rdirective
Rdirective cweb k epi
Rdirective
Rdirective cweb k epi
Rdirective cweb k epi
Rmaybe directive phrases
Rmaybe directive phrase
Rmaybe directive phrase
35
28
32
35
32
35
35
29
30
30
⇒Rmaybe directive phrase
←
rule
→ R#
t Rmaybe directive phrases 29
⇒Rdirective
←
rule
→
c Rsyntax code
c Rsyntax code
t Rmaybe directive phrase
⇒Rsyntax code
←
rule
→
c Rlint epi
c Rlint epi
t Rmaybe directive phrase
R#
33
33
30
R#
34
34
30
⇒Rlint epi
←
rule
→ R#
t Rmaybe directive phrase 30
⇒Rdirective cweb k epi
←
rule
→
c Rlint epi
c Rlint epi
t Rmaybe directive phrase
⇒Rlint epi
←
rule
→
c Rdirective
c Rdirective
t Rmaybe directive phrase
⇒Rdirective
←
rule
→
c Rsyntax code
c Rsyntax code
t Rmaybe directive phrase
⇒Rsyntax code
←
rule
c Rlint epi
R#
34
34
30
R#
32
32
30
R#
33
33
30
→ R#
34
subrule def Grammar
1
2
1
2
2
3
4
2
2
1
1
2
1
1
1
1
1
2
1
1
||| # op NS identifier::TH identifier
||| cweb-comment NS cweb or c k::TH cweb or c k
||| |?| NULL
||| comment-overrun NULL
||| comment NULL
Rmaybe directive phrase
Rdirective
sr# Po ←
2
3
sr#
1
2
2
sr#
1
2
2
sr#
1
2
1
sr#
1
2
1
State: 132 state type: r
subrule element
State: 133 state type: s
subrule element
Po ←
1 ||| syntax-code NS o2 sdc::TH o2 sdc
1 ||| |?| NULL
2 Rsyntax code Rlint epi
State: 134 state type: s
subrule element
Po ←
1 ||| lint NS lint balls::TH lint balls
1 |.|
3 Rlint epi
sr# Po ←
2
4
sr#
1
2
1
Rsyntax code
Rlint epi
Rdirective cweb k epi
State: 135 state type: r
subrule element
State: 136 state type: s
subrule element
Po ←
1 ||| lint NS lint balls::TH lint balls
1 |.|
2 Rlint epi Rdirective
State: 137 state type: s
subrule element
Po ←
1 ||| # op NS identifier::TH identifier
1 ||| |?| NULL
3 Rdirective Rsyntax code
State: 138 state type: s
subrule element
Po ←
1 ||| syntax-code NS o2 sdc::TH o2 sdc
1 ||| |?| NULL
4 Rsyntax code Rlint epi
sr# Po ←
1
1 |||
State: 139 state type: s
subrule element
lint NS lint balls::TH lint balls
131
90
131
131
131
131
131
90
131
131
0
0
128
128
128
128
128
132
133
136
§107
131 2
131 6
130
121
129
122
120
132
135
140
→ Brn Gto Red LA
90 0
132 8
→ Brn
133
133
131
Gto
148
148
134
Red LA
150
149
135
→ Brn
134
134
131
Gto
24
26
135
Red LA
25
26
135
→ Brn Gto Red LA
131 0
135 8
→ Brn
136
136
131
Gto
24
26
137
Red LA
25
26
140
→ Brn
137
137
131
Gto
151
151
138
Red LA
130
129
140
→ Brn
138
138
131
Gto
148
148
139
Red LA
150
149
140
→ Brn Gto Red LA
139 24 25
§107
subrule def Grammar
c Rlint epi
t Rmaybe directive phrase
LR1 STATE NETWORK
34
30
⇒Rlint epi
←
rule
→ R#
t Rmaybe directive phrase 30
⇒Rmaybe directive phrase
←
rule
→ R#
t Rmaybe directive phrases 29
⇒|?|
←
rule
t Rclose brace
⇒}
←
rule
t Rclose brace
⇒|?|
←
rule
t Rmust directive
→ R#
27
→ R#
27
→ R#
26
⇒||| arbitration−code: ←
rule
→ R#
t Rmust directive
26
t Rmust directive
26
⇒|?|
←
rule
t Rmust directive
⇒#op
←
rule
t Rmust directive
→ R#
26
→ R#
26
⇒||| arbitration−code: ←
rule
→ R#
t Rsyntax code
33
33
t Rsyntax code
⇒|?|
←
rule
t Rsyntax code
⇒syntax−code
←
rule
t Rsyntax code
→ R#
33
→ R#
33
⇒||| arbitration−code: ←
rule
→ R#
t Rdirective
32
2
1
1
5
139 26 26
131 140 140
|.|
Rlint epi
sr# Po ←
1
6
sr# Po ←
1
2
sr# Po ←
1
2
sr# Po ←
2
2
sr# Po ←
3
2
sr# Po ←
2
2 |?|
1
2
# op
sr# Po ←
2
3
sr# Po ←
1
3
sr# Po ←
2
2 |?|
1
2 syntax-code
sr# Po ←
2
3
sr# Po ←
1
3
sr# Po ←
2
2 |?|
39
State: 140 state type: r
subrule element
State: 141 state type: r
subrule element
State: 142 state type: r
subrule element
State: 143 state type: r
subrule element
State: 144 state type: r
subrule element
State: 145 state type: s
subrule element
State: 146 state type: r
subrule element
State: 147 state type: r
subrule element
State: 148 state type: s
subrule element
State: 149 state type: r
subrule element
State: 150 state type: r
subrule element
State: 151 state type: s
subrule element
→ Brn Gto Red LA
131 0
140 8
→ Brn Gto Red LA
90 0
141 8
→ Brn Gto Red LA
91 0
142 2
→ Brn Gto Red LA
91 0
143 2
→ Brn Gto Red LA
124 0
144 9
→ Brn Gto Red LA
124 146 146
124 147 147
→ Brn Gto Red LA
124 0
146 9
→ Brn Gto Red LA
124 0
147 9
→ Brn Gto Red LA
125 149 149
125 150 150
→ Brn Gto Red LA
125 0
149 2
→ Brn Gto Red LA
125 0
150 2
→ Brn Gto Red LA
137 129 129
40
LR1 STATE NETWORK
t Rdirective
32
subrule def Grammar
1
2
# op
§107
137 130 130
§108
subrule def Grammar
108.
Index.
− > : 10.
::: 33.
: 46, 67, 78, 96, 102.
|.| : 9, 12, 95.
# NULL: 27.
# op: 69, 84.
||| : 10, 18, 20, 27, 28, 33, 37, 42, 48, 52, 56, 60,
63, 69, 84, 90, 95, 96, 102.
|?| : 20, 28, 33, 37, 48, 52, 56, 60, 63, 69,
76, 84, 90.
|t| : 42.
__FILE__: 5, 7, 18, 22, 23, 26, 27, 31, 32, 35,
36, 40, 41, 42, 45, 51, 54, 55, 58, 59, 62, 65,
74, 75, 77, 89, 99, 103.
__LINE__: 5, 7, 18, 22, 23, 26, 27, 31, 32, 35,
36, 40, 41, 42, 45, 51, 54, 55, 58, 59, 62, 65,
74, 75, 77, 89, 99, 103.
action : 18, 42.
add cweb marker : 68, 81, 83, 103.
add directive to subrule : 71, 86.
add elem to subrule vector : 18, 21, 24, 26, 27, 42,
45, 49, 50, 53, 57, 61, 64.
add sdc to directive : 6, 7, 68, 81, 82, 83.
AR Rstart thread : 107.
AST: 68, 81, 83, 98, 99, 103.
bld its tree : 9.
CAbs lr1 sym : 6, 7, 18, 22, 23, 31, 32, 35, 36,
40, 41, 42, 51, 54, 55, 58, 59, 62, 65, 71, 72,
74, 75, 77, 86, 87, 89.
comment: 96, 102.
comment−overrun: 96, 102.
Csubrule def : 7, 9, 18, 21, 24, 26, 27, 42, 45, 49,
50, 53, 54, 57, 61, 64, 68, 71, 81, 82, 83, 86, 103.
current token : 75, 77.
cw : 99, 103.
cweb−comment: 96, 102.
cweb t : 68, 81, 83, 97, 98, 99, 103.
cwebk t : 99, 103.
cwebt : 68, 81, 83.
Dir : 6, 7.
dir : 68, 81, 82, 83.
directive : 68, 70, 71, 72, 73, 74, 81, 82, 83,
85, 86, 87, 88, 89.
eid : 7.
enumerated id : 7.
eosubrule: 56, 60, 63.
Err bad directive : 74, 89.
Err improper directive : 7.
Err no close brace : 77.
Err no directive present : 75.
Err not a Rule : 54, 55.
INDEX
41
Err not dbl colon in th stmt : 35, 36.
Err not eos in subrule expr : 58, 59, 62, 65.
Err not id for ns in th stmt : 31, 32.
Err not id for th name in th stmt : 40, 41.
Err not T for rtned token from th : 22, 23.
Err not T or R in subrule expr : 51.
Err subrule use undefined T : 18, 42.
find sym in stbl : 18, 42.
fsm : 9, 18, 21, 24, 26, 27, 42, 45, 49, 50, 53, 54,
57, 61, 64, 68, 71, 81, 82, 83, 86, 103.
fsm tbl : 9, 18, 21, 24, 26, 27, 42, 45, 49, 50, 53,
54, 57, 61, 64, 68, 71, 81, 82, 83, 86, 103.
id : 18, 42.
identifier: 28, 37.
INT: 7.
its subrule def : 18, 21, 26, 27, 42, 45, 49, 50,
53, 57, 61, 64.
join pts : 99, 103.
lint: 95.
not fnd : 18, 42.
NS_cweb_or_c_k::TH_cweb_or_c_k: 96, 102.
NS_dbl_colon::TH_dbl_colon: 33.
NS_identifier::TH_identifier: 27, 37, 69, 84.
NS_lint_balls::TH_lint_balls: 95.
NS_o2_sdc::TH_o2_sdc: 90.
NS_parallel_oper::TH_parallel_oper: 18.
NS_rhs_bnd::TH_rhs_bnd: 56, 60, 63.
NS_rhs_component::TH_rhs_component: 48, 52.
NS_rtn_component::TH_rtn_component: 20.
NS_subrule_vector::TH_subrule_vector: 10.
ns : 26, 29, 30, 45.
NS yacco2 T enum: 7.
NS yacco2 terminals: 7, 8.
NULL: 20, 28, 33, 37, 42, 48, 52, 56, 69, 84,
90, 96, 102.
parser : 5, 7, 9, 18, 21, 22, 23, 24, 26, 27, 31, 32,
35, 36, 40, 41, 42, 45, 49, 50, 51, 53, 54, 55,
57, 58, 59, 61, 62, 64, 65, 68, 71, 74, 75, 77,
81, 82, 83, 86, 89, 94, 100, 103, 104.
p1 : 23, 26, 32, 36, 41, 45, 58, 62, 65, 68, 81, 82.
p2 : 18, 21, 22, 24, 27, 30, 31, 34, 35, 39, 40, 42,
49, 50, 51, 53, 54, 55, 57, 59, 61, 64, 73, 74, 82,
83, 88, 89, 93, 94, 99, 100, 101, 103, 104, 105.
p3 : 26, 45, 68, 81.
p4 : 68, 81, 83.
p5 : 83.
Rbal_called_proc_expr: 12.
Rbal_thread_expr: 12.
Rbal called proc expr : 43.
Rbal thread expr : 19.
rbegin : 18, 21, 42, 49, 50, 53.
42
INDEX
Rcalled_proc_eos: 12.
Rcalled_proc_name: 43.
Rcalled_proc_op: 12.
Rcalled_thd_eos: 12.
Rcalled_thread: 19.
Rcalled proc eos : 63, 64, 65.
Rcalled proc name : 44, 45.
Rcalled proc op : 42.
Rcalled thd eos : 60, 61, 62.
Rcalled thread : 25, 26.
Rchained_dispatcher: 12.
Rchained dispatcher : 15, 52, 53, 54, 55.
Rclose_brace: 67.
Rclose brace : 76, 77.
Rcommon_comments: 9.
Rcommon comments : 11.
Rcweb_k_epi: 11.
Rcweb k epi : 102, 103, 104, 105.
Rdbl_colon: 25, 44.
Rdbl colon : 33, 34, 35, 36.
Rdirective: 80, 83.
Rdirective : 81, 82, 83, 84, 88, 89.
Rdirective_cweb_k_epi: 68, 80, 83.
Rdirective cweb k epi : 96, 99, 100, 101.
Rdirective phrase : 83.
refered rule : 49, 53.
refered T : 18, 21, 42, 50.
refr : 49, 53.
reft : 21, 50.
report card : 18, 42.
result : 71, 86.
Rlint_epi: 11, 12, 19, 43, 47, 67, 68, 80, 83.
Rlint epi : 95.
Rmaybe_directive_phrase: 79.
Rmaybe_directive_phrases: 78, 79.
Rmaybe_more_directives: 67.
Rmaybe directive phrase : 80, 81, 82.
Rmaybe directive phrases : 79.
Rmaybe more directives : 78.
Rmust_directive: 68.
Rmust_directive_phrase: 67.
Rmust_eos: 12.
Rmust directive : 68, 69, 73, 74, 75.
Rmust directive phrase : 68.
Rmust eos : 56, 57, 58, 59.
Rns : 28, 30, 31, 32.
Rns: 25, 44.
RNULL: 27.
RNULL: 25, 44.
Rpotential_codeblk: 12.
Rpotential_directives: 66.
Rpotential codeblk : 66.
subrule def Grammar
§108
Rpotential directives : 67.
Rrhs_expr: 9.
Rrhs expr : 12, 13, 14, 15, 16, 17.
Rrtned_T: 19, 43.
Rrtned T : 20, 21, 22, 23, 24.
Rstart_thread: 12.
Rstart thread : 18.
Rsubrule def : 9.
RSVP: 9, 18, 22, 23, 31, 32, 35, 36, 40, 41, 42,
51, 54, 55, 58, 59, 62, 65, 71, 74, 75, 77,
86, 89, 94, 100, 104.
RSVP_FSM: 7.
Rsyntax_code: 68, 80, 83.
Rsyntax code : 68, 81, 82, 83, 90, 93, 94.
rT : 18, 42.
Rth_name: 25, 44.
Rth name : 37, 39, 40, 41.
RTorRcomponent: 47.
RTorRcomponent : 48, 49, 50, 51.
RTorRcomponents : 47.
RTorRcomponents: 46, 47.
RTorRcomponents_epi: 12.
RTorRcomponents epi : 13, 46.
rule−in−stbl: 48, 52.
rule info : 9, 18, 21, 22, 23, 24, 26, 27, 31, 32,
35, 36, 40, 41, 42, 45, 49, 50, 51, 53, 54, 55,
57, 58, 59, 61, 62, 64, 65, 68, 71, 74, 75, 77,
81, 82, 83, 86, 89, 94, 100, 103, 104.
Rvector : 10.
Rvector: 9.
Rxxx : 16.
Sdc : 6, 7.
sdc : 68, 81, 82, 83.
set auto delete : 27, 34, 59, 71, 74, 86, 89, 101, 105.
set content : 99, 103.
set rc : 5, 7, 18, 22, 23, 26, 27, 31, 32, 35, 36,
40, 41, 42, 45, 51, 54, 55, 58, 59, 62, 65, 74,
75, 77, 89, 99, 103.
set stop parse : 7, 18, 22, 23, 31, 32, 35, 36, 40,
41, 42, 51, 54, 55, 58, 59, 62, 65, 71, 74, 75,
77, 86, 89, 94, 100, 104.
sf : 18, 21, 22, 23, 24, 26, 27, 30, 31, 32, 34, 35,
36, 39, 40, 41, 42, 45, 49, 50, 51, 53, 54, 55, 57,
58, 59, 61, 62, 64, 65, 68, 73, 74, 81, 82, 83, 88,
89, 93, 94, 99, 100, 101, 103, 104, 105.
start token : 5, 18, 42.
subrule def : 2.
subrule def : 4, 5, 6, 9, 18, 21, 24, 26, 27, 42, 45,
49, 50, 53, 57, 61, 64, 71, 86, 103.
sym : 7, 18, 22, 23, 26, 27, 31, 32, 35, 36, 40, 41,
42, 45, 51, 54, 55, 58, 59, 62, 65, 74, 75, 77, 89.
symbol : 18, 42.
§108
subrule def Grammar
syntax−code: 90.
syntax code : 7.
syntax code : 68, 81, 82, 83, 91, 92, 93.
T−in−stbl: 20, 48, 52.
T called thread eosubrule : 26, 45.
T cweb comment : 99, 103.
T cweb marker : 99, 103.
T Enum : 7.
T identifier : 29, 38.
T in stbl : 18, 42.
T null call thread eosubrule : 27.
T op : 7.
T subrule def : 5, 6.
T sym tbl report card : 18, 42.
T syntax code : 6, 7, 92.
T T op : 7.
tbl entry : 18, 42.
thd nm : 26, 38, 39, 45.
true : 7, 18, 22, 23, 27, 31, 32, 34, 35, 36, 40, 41,
42, 51, 54, 55, 58, 59, 62, 65, 71, 74, 75, 77,
86, 89, 94, 100, 101, 104, 105.
xref r : 49, 53.
xref t : 18, 21, 42, 50.
yacco2 : 6, 7.
yacco2 stbl: 18, 42.
INDEX
43
44
NAMES OF THE SECTIONS
h Csubrule def constructor directive 4 i
h Csubrule def op directive 5 i
h Csubrule def user-declaration directive 6 i
h Csubrule def user-implementation directive 7 i
h Csubrule def user-prefix-declaration directive 8 i
h RNULL subrule 1 op directive 27 i
h RTorRcomponent subrule 1 op directive 49 i
h RTorRcomponent subrule 2 op directive 50 i
h RTorRcomponent subrule 3 op directive 51 i
h Rcalled proc eos subrule 1 op directive 64 i
h Rcalled proc eos subrule 2 op directive 65 i
h Rcalled proc name subrule 1 op directive 45 i
h Rcalled proc op subrule 1 op directive 42 i
h Rcalled thd eos subrule 1 op directive 61 i
h Rcalled thd eos subrule 2 op directive 62 i
h Rcalled thread subrule 1 op directive 26 i
h Rchained dispatcher subrule 1 op directive 53 i
h Rchained dispatcher subrule 2 op directive 54 i
h Rchained dispatcher subrule 3 op directive 55 i
h Rclose brace subrule 1 op directive 77 i
h Rcweb k epi subrule 1 op directive 103 i
h Rcweb k epi subrule 2 op directive 104 i
h Rcweb k epi subrule 3 op directive 105 i
h Rdbl colon subrule 1 op directive 34 i
h Rdbl colon subrule 2 op directive 35 i
h Rdbl colon subrule 3 op directive 36 i
h Rdirective constructor directive 85 i
h Rdirective op directive 86 i
h Rdirective subrule 1 op directive 88 i
h Rdirective subrule 2 op directive 89 i
h Rdirective user-declaration directive 87 i
h Rdirective cweb k epi constructor directive 97 i
h Rdirective cweb k epi subrule 2 op directive 99 i
h Rdirective cweb k epi subrule 3 op directive 100 i
h Rdirective cweb k epi subrule 4 op directive 101 i
h Rdirective cweb k epi user-declaration directive 98 i
h Rdirective phrase subrule 1 op directive 83 i
h Rmaybe directive phrase subrule 1 op directive 81 i
h Rmaybe directive phrase subrule 2 op directive 82 i
h Rmust directive constructor directive 70 i
h Rmust directive op directive 71 i
h Rmust directive subrule 1 op directive 73 i
h Rmust directive subrule 2 op directive 74 i
h Rmust directive subrule 3 op directive 75 i
h Rmust directive user-declaration directive 72 i
h Rmust directive phrase subrule 1 op directive 68 i
h Rmust eos subrule 1 op directive 57 i
h Rmust eos subrule 2 op directive 58 i
h Rmust eos subrule 3 op directive 59 i
h Rns subrule 1 op directive 30 i
h Rns subrule 2 op directive 31 i
h Rns subrule 3 op directive 32 i
subrule def Grammar
subrule def Grammar
h Rns user-declaration directive 29 i
h Rrtned T subrule 1 op directive 21 i
h Rrtned T subrule 2 op directive 22 i
h Rrtned T subrule 3 op directive 23 i
h Rrtned T subrule 4 op directive 24 i
h Rstart thread subrule 1 op directive 18 i
h Rsubrule def subrule 1 op directive 9 i
h Rsyntax code constructor directive 91 i
h Rsyntax code subrule 1 op directive 93 i
h Rsyntax code subrule 2 op directive 94 i
h Rsyntax code user-declaration directive 92 i
h Rth name subrule 1 op directive 39 i
h Rth name subrule 2 op directive 40 i
h Rth name subrule 3 op directive 41 i
h Rth name user-declaration directive 38 i
NAMES OF THE SECTIONS
45
subrule def Grammar
Date:
File:
January 2, 2015 at 15:39
subrule def.lex
Ns:
Version: 1.0
NS subrule def
Debug: true
Grammar Comments:
Type: Thread
Parse a subrule: into the valley of sin...
562 element(s) in Lookahead Expression below
eolr − ||| − |.| − |t|
Section Page
Copyright . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1
subrule def Grammar
TABLE OF CONTENTS
subrule def Thread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Fsm Csubrule def class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Csubrule def constructor directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Csubrule def op directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Csubrule def user-declaration directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Csubrule def user-implementation directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Csubrule def user-prefix-declaration directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Rsubrule def rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Rvector rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Rcommon comments rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Rrhs expr rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Rrhs expr ’s subrule 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Rrhs expr ’s subrule 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Rrhs expr ’s subrule 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Rrhs expr ’s subrule 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Rrhs expr ’s subrule 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Rstart thread rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Rbal thread expr rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Rrtned T rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Rrtned T ’s subrule 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Rrtned T ’s subrule 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Rrtned T ’s subrule 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Rrtned T ’s subrule 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Rcalled thread rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Rcalled thread ’s subrule 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
RNULL rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Rns rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Rns user-declaration directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Rns ’s subrule 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Rns ’s subrule 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Rns ’s subrule 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Rdbl colon rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Rdbl colon ’s subrule 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Rdbl colon ’s subrule 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Rdbl colon ’s subrule 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Rth name rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Rth name user-declaration directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Rth name ’s subrule 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Rth name ’s subrule 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Rth name ’s subrule 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Rcalled proc op rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Rbal called proc expr rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Rcalled proc name rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Rcalled proc name ’s subrule 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
RTorRcomponents epi rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
RTorRcomponents rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
RTorRcomponent rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
RTorRcomponent ’s subrule 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
RTorRcomponent ’s subrule 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
RTorRcomponent ’s subrule 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Rchained dispatcher rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Rchained dispatcher ’s subrule 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
1
2
2
2
2
2
3
3
3
3
4
4
4
5
5
5
5
6
6
6
6
7
7
7
7
7
8
8
8
8
8
9
9
9
9
9
10
10
10
10
10
11
11
11
11
12
12
12
12
12
13
13
13
2
TABLE OF CONTENTS
subrule def Grammar
Rchained dispatcher ’s subrule 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Rchained dispatcher ’s subrule 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Rmust eos rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Rmust eos ’s subrule 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Rmust eos ’s subrule 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Rmust eos ’s subrule 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Rcalled thd eos rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Rcalled thd eos ’s subrule 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Rcalled thd eos ’s subrule 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Rcalled proc eos rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Rcalled proc eos ’s subrule 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Rcalled proc eos ’s subrule 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Rpotential codeblk rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Rpotential directives rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Rmust directive phrase rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Rmust directive rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Rmust directive constructor directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Rmust directive op directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Rmust directive user-declaration directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Rmust directive ’s subrule 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Rmust directive ’s subrule 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Rmust directive ’s subrule 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Rclose brace rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Rclose brace ’s subrule 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Rmaybe more directives rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Rmaybe directive phrases rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Rmaybe directive phrase rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Rmaybe directive phrase ’s subrule 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Rmaybe directive phrase ’s subrule 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Rdirective phrase rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Rdirective rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Rdirective constructor directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Rdirective op directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Rdirective user-declaration directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Rdirective ’s subrule 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Rdirective ’s subrule 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Rsyntax code rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Rsyntax code constructor directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Rsyntax code user-declaration directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Rsyntax code ’s subrule 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Rsyntax code ’s subrule 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Rlint epi rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Rdirective cweb k epi rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Rdirective cweb k epi constructor directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Rdirective cweb k epi user-declaration directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Rdirective cweb k epi ’s subrule 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Rdirective cweb k epi ’s subrule 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Rdirective cweb k epi ’s subrule 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Rcweb k epi rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Rcweb k epi ’s subrule 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Rcweb k epi ’s subrule 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Rcweb k epi ’s subrule 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
13
13
14
14
14
14
14
15
15
15
15
15
15
16
16
16
16
16
17
17
17
17
17
17
18
18
18
18
18
19
19
19
19
19
19
20
20
20
20
20
20
20
21
21
21
21
21
21
22
22
22
22
subrule def Grammar
TABLE OF CONTENTS
3
First Set Language for O2linker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
23
Lr1 State Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
24
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
41
Download