## Copyright

Copyright (c) Dave Bone 1998 - 2015_mpost_output_**Grammar.**

Write out the _cweb_'s representation of the grammar's code and _mpost_'s railroad diagrams. These appropriate files have the grammar's name along with extension "w" for _cweave_ to compile and extension "mp" for _mpost_ to draw from.

Enjoy the art work. All the grammar's vocabulary are cross referenced to accomodate the grammar writer. The railroad diagrams show left recursion and where the subrule has appropriate syntax directed code, it redraws the subrule with each element's position number below it. This aids in the writing of syntax directed code when individual parameters are referenced by use of the _sf_ stack frame structure. Each element within the stack frame has a naming convention of _p#___ where the number sign is the element's position within the subrule sentence relative to 1.

Fodder to this grammar is provided by the tree container doing a prefix traverse. Why a prefix traverse? The parent node allowed me to declare the _mpost_ variables before their use.

Caveat: Grammar c++ comments must observe _cweave_ dictums: underscored items like variable names must be enclosed with \(|\) and the number sign "#" must use its literal of backslash #. Without these observances, _pdftex_ will honk.

## 3 Fsm Cmpost_output class.

### Cmpost_output constructor directive.

( Cmpost_output constructor directive 4) =  MPOST_CWEB_LOAD_XLATE_CHRS(this);

## 5 Cmpost_output op directive.

Due to a MS 2005 Visual Studio defficiency, part of the ctor's initialization is included here instead of all being done by MPOST_CWEB_EMIT_PREFIX_CODE. The reason is noted in the documentation of _o2externs_.

\(\langle\)Cmpost_output op directive 5\(\rangle\equiv\)

_no_subrules_per_rule_.push_back\((0)\);

**time_t**_theTime_\(=\)time\((0)\);

**char**\(*\)_cTime_\(=\)time\((\&\)_theTime_\()\);

**gened_date_time_\(+\)\(=\)string\((\)cTime\()\)**;

**int**\(n=\)_gened_date_time_\(\_\)_find\((\)'\(\backslash\)n'\()\);

_gened_date_time\([n]\)\(=\)'\(\cup\)'_;

_mp_dimension_. \(+\)\(=\)"\(\_\)abcdefghijklmnopqrstuvwxyz\({}^{\ast}\);

_w_fig_no_\(=\)\(0\);

_rule_def_\(=\)\(0\);

_subrule_def_\(=\)\(0\);

_rule_no_\(=\)\(0\);

_subrule_no_\(=\)\(0\);

_elem_no_\(=\)\(0\);

_no_of_rules_\(=\)\(0\);

_no_of_subrules_\(=\)\(0\);

_mp_filename_\(+\)\(=\)_grammar_filename_prefix_\(c\_str\)\(()\);

_mp_filename_\(+\)\(=\)".mp";

_omp_file_open_(_mp_filename_\(c\_str\)\(()\),_ios_base\(\,\)\(


## 6 Cmpost_output user-declaration directive

\(\langle\)Cmpost_output user-declaration directive \(\;\rangle\equiv\)

\(\langle\)**public**: **char**_big_buf_[BIG_BUFFER_32K]; _std_::_map_\(<\)**int**\(\;\), _std_::_string_\(>\)_xlated_names_.; _std_::_vector_\(<\)**int\(>\)_no_subrules_per_rule_.;

\(std::\)_string_gened_date_time_.;

\(std::\)_string_mp_filename_.;

\(std::\)_ofstream_omp_file_.;

\(std::\)_string_w_filename_.;

\(std::\)_string_w_index_filename_.;

\(std::\)_ofstream_ow_file_.;

\(std::\)_ofstream_ow_index_file_.;

\(std::\)_ofstream_ow_err_file_.;

\(std::\)_ofstream_ow_lrk_file_.;

\(std::\)_string_grammar_filename_prefix_.;

\(std::\)_string_fq_filename_noext_.;

**int**_w_fig_no_.;

**int**_rule_no_.;

**int**_subrule_no_.;

**int**_elem_no_.;

**int**_no_of_rules_.;

**int**_no_of_subrules_.;

\(std::\)_string_rule_name_.;

\(std::\)_string_elem_name_.;

\(rule\_def\)\(*\)_rule_def_.;

\(T\_\)_subrule_def_.;

\(std::\)_string_mp_dimension_.;

**static**: **void**_MPOST_CWEB_gen_dimension_name_(_Cmpost_output_*_Fsm_,_std::_string_\(\&\)_Mp_obj_name_,**int**_Dimension_);

**static**: **void**_MPOST_CWEB_calc_mp_obj_name_(_Cmpost_output_*_Fsm_,_std::_string_\(\&\)_Mp_obj_name_,**int**_Elem_no_);

**static**: **void**_MPOST_CWEB_wrt_mp_rhs_elem_(_Cmpost_output_*_Fsm_,_std::_string_\(\&\)_Elem_name_,

\(std::\)_string_\(\&\)_Drw_how_);

**static**: **void**_MPOST_CWEB_gen_sr_elem_xrefs_(_Cmpost_output_*_Fsm_,_AST*_Subrule_tree_);

**static**: **void**_MPOST_CWEB_woutput_sr_sdcode_(_Cmpost_output_*_Fsm_,_T_subrule_def_*_Subrule_def_);

**static**: **void**_MPOST_CWEB_wrt_fsm_(_Cmpost_output_*_Fsm_,_T_fsm_phrase_*_Fsm_phrase_);

**static**: **void**_MPOST_CWEB_wrt_rule_s_lhs_sdc_(_Cmpost_output_*_Fsm_,_rule_def_*_Rule_def_);

**static**: **bool**_MPOST_CWEB_should_subrule_be_printed_(_Cmpost_output_*_Fs_,_T_subrule_def_*_Subrule_def_);

**static**: **void**_MPOST_CWEB_xref_refered_T_(_Cmpost_output_*_Fsm_,_refered_T_*R_T_);

**static**: **void**_MPOST_CWEB_xref_refered_rule_(_Cmpost_output_*_Fsm_,_refered_rule_*_R_rule_);

**static**: **void**_MPOST_CWEB_LOAD_XLATE_CHRS_(_Cmpost_output_*_Fsm_);

**static**: **void**_MPOST_CWEB_EMIT_PREFIX_CODE_(_Cmpost_output_*_Fsm_);

**static**: **void**_MPOST_CWEB_wrt_T_(_Cmpost_output_*_Fsm_,_T_terminals_phrase_*_T_phrase_);

**static**: **void**_MPOST_CWEB_wrt_Err_(_Cmpost_output_*_Fsm_,_T_error_symbols_phrase_*_Err_phrase_);

**static**: **void**_MPOST_CWEB_wrt_Lrk_(_Cmpost_output_*_Fsm_,_T_lr1_k_phrase_*_Lrk_phrase_);

\(std::\)_list_\(<\)_NS_yacco2_terminals_::_rule_def_\(*\)_>_rules_for_fs_prt_;

**static**: **void**_MPOST_CWEB_crt_rhs_sym_str_(_state_element_*se,_std::_string_*_Xlated_str_);

**7.** **Cmpost_output user-prefix-declaration directive.** ( Cmpost_output user-prefix-declaration directive \(\tau\)) \(\equiv\)

#include "time.h"

#include "o2_externs.h" extern void \(\mathit{XLATE\_SYMBOLS\_FOR\_cweave}(\mathbf{const}\ \mathbf{char}\ *\mathit{Sym\_to\_xlate},\mathbf{char}\ *\mathit{Xlated\_sym})\); extern void \(\mathbf{PR\_RULE\_S\_FIRST\_SET}(\mathit{std::ofstream}\ \&\ \mathit{Ofile},\mathit{NS\_yacco2\_terminals}::\mathit{rule\_def}\ *\mathit{Rule\_def})\); extern int\(\mathit{MPOST\_CWEB\_xlated\_symbol}(\mathbf{AST}\ *\mathit{Sym},\mathbf{char}\ *\mathit{Xlated\_sym})\); extern\(\mathit{STATES\_type}\mathbf{LR1\_STATES}\); extern\(\mathit{COMMON\_LA\_SETS\_type}\mathbf{COMMON\_LA\_SETS}\);

#include "cweave_fsm.sdc.h"

#include "cweave_lhs.sdc.h"

#include "cweave_sdc.h"

#include "cweave_T_sdc.h"




**if** (_se_-_next_state_element_-_reduced_state_\(\neq 0\))_ {

_find_reduced_stateno = se_-_next_state_element_-_reduced_state_-_state_no._;

}

}

_fsm_-_MPOST_CWEB_crt_rhs_sym_str_(_se_,_&rhs_syms_str_);

_sprintf_(_fsm_-_big_buff_,_w_stateno_subrule_,(_elem_pos \(\equiv 1\))? "c" : "t",_rule_name_,_rd_-_rule_no_( ),

_srd_-_subrule_no_of_rule_( ),_elem_pos_,_rhs_syms_str_c_str_( ),_se_-_closure_state_-_state_no._,

_(_se_-_goto_state_\(\neq 0\))? _se_-_goto_state_-_state_no._:0,_find_reduced_stateno_,_la_set_no_);

_fsm_-_ow_file_\(\ll\)_fsm_-_big_buff_\(\ll\)_endl_;

}

_fsm_-_ow_file_\(\ll\)"}"\(\ll\)_endl_;

}

_KCHARPw_end = "@**_Index.";

_fsm_-_ow_file_\(\ll\)_w_end \(\ll\)_endl_;

_fsm_-_ow_file_\(\ll\)_close_( );

**9.** _Rgrammar_phrase_

**10.** _Rks_epi rule.**

Due to technical problems with the _convertMPtoPDF_ macro, the epsilon subrule is drawn with a dot.

Rks_epi

**11.** _Rks_epi

**12.** _Rk_rule.**

(Rk subrule 1 op directive 12) \(\equiv\)

_Cmpost_output \(*\)fsm_ = ( _Cmpost_output \(*\)_) _rule_info_parser_\(\rightarrow\)fsm_tbl_;

WRT_CWEB_MARKER(_&fsm_-_ow_file_,_sf_-_p1_-_ast_( ));

**13.**: _Rfsm_phrase_

Rfsm_phrase (Rfsm_phrase subrule 1 op directive 13) \(\equiv\)_

_Cmpost_output \(*\)fsm =_ (_Cmpost_output \(*\)_) _rule_info_parser_~fsm_tbl_; _fsm_-MPOST_CWEB_wrt_fsm_(_fsm_,_sf_-_p1_);
**14.**: _Rparallel_phrase_

Rparallel_phrase (parallel-parser-phrase)

15.**: _RT_enum_phrase_

RT_enum_phrase (Rerr_phrase subrule 1 op directive 16) \(\equiv\)_

_Cmpost_output \(*\)fsm =_ (_Cmpost_output \(*\)_) _rule_info_parser_~fsm_tbl_; _fsm_-MPOST_CWEB_wrt_Err_(_fsm_,_sf_-_p1_);
**17.**: _Rrc_phrase_

Rrc_phrase (rc-phrase)

18.**: _Rlr1_k_phrase_

Rlr1_k_phrase (Rlrl_k_phrase subrule 1 op directive 18) \(\equiv\)_

_Cmpost_output \(*\)fsm =_ (_Cmpost_output \(*\)_) _rule_info_parser_~fsm_tbl_; _fsm_-MPOST_CWEB_wrt_Lrk_(_fsm_,_sf_-_p1_);
**19.**: _Rterms_phrase_

Rterms_phrase (Rterms_phrase subrule 1 op directive 19) \(\equiv\)_

_Cmpost_output \(*\)fsm =_ (_Cmpost_output \(*\)_) _rule_info_parser_~fsm_tbl_; _fsm_-MPOST_CWEB_wrt_T_(_fsm_,_sf_-_p1_);

**20**. _Brule_phrase_rule.**

Define the number of rules for _mpost_.

**Rule_phrase**

(Rule_phrase subrule 1 op directive 20) \(\equiv\)

_Cmpost_output_\(\ast\)_fsm_ = ( _Cmpost_output_\(\ast\))_rule_info_parser_\(\rightarrow\)_fsm_tbl_.;

_fsm_no_of_rules_ = _sf_-_p1_\(\rightarrow\)_rules_alphabet_()_-_size_();

KCHARP_mp_no_of_rules = "no_of_rules"_i:=_%i;";

_sprintf_(_fsm_big_buf_,_mp_no_of_rules_,_fsm_no_of_rules_);

_fsm_omp_file_\(\ll\)_fsm_big_buf_\(\ll\)_end_;

**21**. _Brules_rule.**

**Rrules**

**Rksepi**

**Rksepi**

**Rksepi**

**Rksepi**

**22**. _Brule_rule.**

**Rule_def**

**Rsubrules**


_Rsubrules_rule.

Rsubrules

Rsubrule

Rsubrules

Rsubrules

Rsubrules

Rsubrule

Rsubrule_def

Relements

## 26 _Rsubrule_def rule._

Rsubrule_def

The _eosurbule_ T has no meaning in the drawn subrule. It is just a specific end-of-subrule indicator. So it is removed from the rhs element count of the subrule for _mpost_ processing so that it does not get drawn. The balance of the logic relates to _cweb_'s document: comments about the subrule and the appropriate _mpost_ rendering.

One subtlety is the forced drawing of a single subrule that also has a rule's lhs syntax directed code. Normally i save the redrawing of the subrule as the forest and the tree is the same. But having the rule syntax code requires to have the subrule directive. Without it there are 2 code directives back-to-back that honks.

\(\langle\)Rsubrule_def subrule 1 op directive 26\(\rangle\equiv\)

_Cmpost_output \(*\)fsm =_ (_Cmpost_output \(*\)_) _rule_info__parser____fsm_tbl__;

_+fsm-w_fig_no__;

_+fsm-subrule_no__;

_fsm-elem_no__ =_ 0;

_fsm-subrule_def__ =_ _sf__-p1__;_

**int**_no_elements = fsm-subrule_def__-no_of_elems_ () -1;

**if**_(no_elements \(\equiv 0\)) no_elements =_ 1; /* epsilon subrule */

KCHARP_mp_rule_s_subrule_no_elems_ = "rule_s_subrule_no_elems_[%i][%i]:=_%i;";

_sprintf_(_fsm-big_buff__,_mp_rule_s_subrule_no_elems_,_fsm-rule_no__,_fsm-subrule_no__,_elements_);

_fsm-omp_file__\(\ll\)fsm-big_buff__\(\ll\)endl_;

**if**_(fsm-MPOST_CWEB_should_subrule_be_printed_(_fsm_,_fsm-subrule_def__) \(\equiv\)_false_) return;

KCHARP_rname = fsm-rule_def__-rule_name_()^-_c_str_();

KCHARP_subrule_cweb = "@*%_ul%s|^s_subrule_%i. \%break\n";

**if**_((fsm-rule_def__-rule_lhs_() \(\neq 0\)) \(\vee\)(_fsm-no_of_subrules_ \(>1\))) {

_sprintf_(_fsm_-big_buff__,_subrule_cweb_,_rname_,_fsm-subrule_no__);

_fsm-ow_file__\(\ll\)fsm-big_buff__;

**if**_(fsm-subrule_def__-cweb_marker_() \(\neq 0\)) {

WRT_CWEB_MARKER(&_fsm-ow_file__,_fsm-subrule_def__-cweb_marker_());

_cout \(\ll\)"subrule's_cweb_marker_for_rule:\(\ll\)_rname \(\ll\)endl_;

**else**_{

_cout \(\ll\)"no_subrule's_cweb_marker_for_rule:\(\ll\)_rname \(\ll\)endl_;

**}

KCHARP_subrule_cweb_diagram = "\fbreak""\convertMPtoPDF{%s.%i}{1}{1}n";

**if**_((fsm-rule_def__-rule_lhs_() \(\neq 0\)) \(\vee\)(_fsm-no_of_subrules_ \(>1\))) {

_sprintf_(_fsm-big_buff__,_subrule_cweb_diagram_,_fsm-grammar_filename_prefix__c_str_(),_fsm-w_fig_no__);

_fsm-ow_file__\(\ll\)fsm-big_buff__;

**}

_fsm-MPOST_CWEB_woutput_sr_sdcode_(_fsm_,_fsm-subrule_def__);

**27**. _Relements rule._

Relements


**31**: _Relement's subrule 3._

(Relement subrule 3 op directive 31) \(\equiv\)

_Cmpost_output \(*\)fsm =_ (_Cmpost_output \(*\)_) _rule_info__parser__~fsm_tbl__;

_+fsm_-elem_no__;

**if**_(fsm_-elem_no__ \(\equiv\)1_ {_/*_epsilon */_std__::stringmp_obj_type_("Circle_solid");

_std__::stringmp_elem_name_("u");

_fsm_-_MPOST_CWEB_wrt_mp_rhs_elem_(_fsm_,_mp_elem_name_,_mp_obj_type_);
## 32. _Relement_'s subrule 4.

Why is there a re-aligning on the number of _rule_s_subrule_no_elems_? Two reasons: Due to the tree walk being top down, initially the number of items are determined by the _subrule_ - _def_ T before processing the actual subrule sentence. Due to the calling of threads, this number gets shrunk as i combine the 3 parts of the called thread into 1 item. Though it looks like a mistake in the emitted _mpost_ code, it's a slight inefficiency to manage a nice picture.

This comment hold for the other version of thread call below.

(Relement subrule 4 op directive 32) \(\equiv\)

_Cmpost_output \(*\)fsm =_ (_Cmpost_output \(*\)_) _rule_info_parser_~fsm_tbl_;

KCHARP_realign_nos = "rule_s_subrule_no_elems[%i][%i]:=_%i;";

_sprintf (fsm_big_buf_, _re_align_nos_, _fsm_rule_no_, _fsm_subrule_no_, 3);

_fsm_omp_file_ \(\ll\)_fsm_big_buf_\(\ll\) "%_re-align_cnt" \(\ll\)_endl_;

_+fsm_elem_no_.;

_std \(::\)stringmp_obj_type_("Circle_dotted");

_std \(::\)stringmp_elem_name_;

**if** (_sf_-_p1_-_its_t_def_ ()_-_enum_id_ () \(\equiv\)_T_Enum_::_T_LR1_parallel_operator_) {

_mp_elem_name +="||";

**else** {

_mp_elem_name +="|t|";

_fsm_-_MPOST_CWEB_wrt_mp_rhs_elem_(_fsm_, _mp_elem_name_, _mp_obj_type_);

_+fsm_elem_no_.;

_mp_obj_type_clear_ ();

_mp_obj_type += "Circle_dotted";

_mp_elem_name.clear_ ();

_mp_elem_name += _sf_-_p2_-_t_in_stdl_ ()_-_t_def_ ()_-_t_name_ ()_-_c_str_ ();

_string \(::\)size_typex = mp_elem_name.find_("\\\"");

**if** (_x \(\neq\)string \(::\)npos_) {

_mp_elem_name.erase_ ();

_mp_elem_name += "char(34)";

_}_fsm_-_MPOST_CWEB_wrt_mp_rhs_elem_(_fsm_, _mp_elem_name_, _mp_obj_type_);

_+fsm_elem_no_.;

_mp_elem_name.clear_ ();

_mp_obj_type.clear_ ();

_mp_obj_type_ += "Box_dotted";

_mp_elem_name += _sf_-_p3_-_ns_ ()_-_identifier_ ()_-_c_str_ ();

_mp_elem_name += "::";

_mp_elem_name += _sf_-_p3_-_called_thread_name_ ()_-_identifier_ ()_-_c_str_ ();

_fsm_-_MPOST_CWEB_wrt_mp_rhs_elem_(_fsm_, _mp_elem_name_, _mp_obj_type_);
## 33. _Relement's subrule 5._

(Relement subrule 5 op directive 33) \(\equiv\)

_Cmpost_output \(*\) fsm =_ (_Cmpost_output \(*\)_) _rule_info__._parser__-fsm_tbl__;

KCHARP_realign_nos =_ "rule_s_subrule_no_elems[%i][%i]:=_%i;";

_sprintf_(fsm-big_buf_, _re_align_nos, fsm-rule_no_, _fsm-subrule_no_, 3);

_fsm-omp_file_\(\ll\)_fsm-big_buf_\(\ll\)"%_re-align_cnt" \(\ll\)_end_;

_++fsm-elem_no_;

_std_::_stringmp_obj_type_("Circle_dotted");

_std_::_stringmp_elem_name_;

**if**: (_sf-p1__-its_t_def_()-enum_id_() \(\equiv\)_T_Enum_::_T_LR1_parallel_operator_) {

_mp_elem_name_ +="||!";

**else**: {

_mp_elem_name_ +="||!";

_fsm-MPOST_CWEB_wrt_mp_rhs_elem_(_fsm_, _mp_elem_name_, _mp_obj_type_);

_mp_elem_name_._clear_();

_+fsm-elem_no_;

_mp_elem_name_ += _sf-p2__-t_in_std_()-_t_def_()-_t_name_()-_c_str_();

_string_::_size_type_x = _mp_elem_name_find_("\\");

**if**: (_x \(\neq\)_string_::_npos_) {

_mp_elem_name_clear_();

_mp_elem_name_ +="char(34)";

}

_fsm-MPOST_CWEB_wrt_mp_rhs_elem_(_fsm_, _mp_elem_name_, _mp_obj_type_);

_+fsm-elem_no_.;

_mp_elem_name_._clear_();

_mp_obj_type_._clear_();

_mp_obj_type_ +="Box_dotted";

_mp_elem_name_ +="NULL";

_fsm-MPOST_CWEB_wrt_mp_rhs_elem_(_fsm_, _mp_elem_name_, _mp_obj_type_);

**34.** _Relement's subrule 6._

(Relement subrule 6 op directive 34) \(\equiv\)

_Cmpost_output \(*\)fsm \(=\)_ ( _Cmpost_output \(*\)_) _rule_info__parser__~fsm_tbl__;

_+fsm_-elem_no_;

_std \(::\)stringmp_obj_type_("Circle_solid");

_std \(::\)stringmp_elem_name_(_sf~p1__-_t_in_stbl_(_)~t_def_(_)~t_name_(_)~c_str_(_));

_string \(::\)size_typex = mp_elem_name_find_("\(\backslash\backslash\)");

**if** (\(x\neq\)ring::\(npos\)) {

_mp_elem_name_._erase_();

_mp_elem_name \(+\)="char(34)";

}

_fsm_-MPOST_CWEB_wrt_mp_rhs_elem_(_fsm_,_mp_elem_name_,_mp_obj_type_);

_+fsm_-elem_no_;

_mp_obj_type_._clear_();

_mp_obj_type_ \(+\)="Circle_solid";

_mp_elem_name_._clear_();

_mp_elem_name_\(+\)=_sf~p2__-_t_in_stbl_(_)~t_def_(_)~t_name_(_)~c_str_(_);

_x = mp_elem_name_._find_("\(\backslash\backslash\)");

**if** (\(x\neq\)string::\(npos\)) {

_mp_elem_name_._erase_();

_mp_elem_name_\(+\)="char(34)";

}

_fsm_-_MPOST_CWEB_wrt_mp_rhs_elem_(_fsm_,_mp_elem_name_,_mp_obj_type_);

**35.** **First Set Language for \(O_{2}^{linker}\).**

/*  File: mpost_output.fsc  Date and Time: Fri Jan 2 15:33:44 2015  */  transitive n  grammar-name "mpost_output"  name-space "NS_mpost_output"  thread-name "Cmpost_output"  monolithic y  file-name "mpost_output.fsc"  no-of-T 569  list-of-native-first-set-terminals 1  T_grammar_phrase  end-list-of-native-first-set-terminals  list-of-transitive-threads 0  end-list-of-transitive-threads  list-of-used-threads 0  end-list-of-used-threads  fsm-comments  "Output grammar rules railroad diagrams for mpost that cweb program uses."








**37. Index.**

\(\epsilon\) : 10.

|.|: 14, 28.

__: 2.

__: FILE_: 5.

__: LINE_: 5.

_add_token_to_error_queue_: 5.

_append_: 8.

_arbitrator_name_: 8.

AST: 6, 7.

_ast_: 12.

_begin_: 8, 23.

_big_buf_: 6, 8, 20, 23, 26, 32, 33.

BIG_BUFFER_32K: 6.

_c_str_: 5, 8, 23, 26, 29, 30, 32, 33, 34.

_CAbs_lr1_sym_: 5.

called thread eosubrule: 28.

_called_thread_name_: 32.

_clear_: 8, 29, 32, 33, 34.

_close_: 8.

_closure_state_: 8.

_Cmpost_output_: 6, 8, 12, 13, 16, 18, 19, 20, 23, 26, 29, 30, 31, 32, 33, 34.

_common_la_set_idx_: 8.

COMMON_LA_SETS: 7.

_COMMON_LA_SETS_type_: 7.

_convertMPtoPDF_: 10.

_cout_: 26.

_cTime_: 5.

_cTime_: 5.

_cur_state_: 8.

_cur_sym_: 8.

_cveave_: 2.

_cweb_: 2, 23, 26.

_cweb_marker_: 12.

_cweb_marker_: 23, 26.

_def_: 32.

_Dimension_: 6.

_Dru_how_: 6.

_Elem_name_: 6.

_elem_name_: 6.

_elem_no_: 5, 6, 26, 29, 30, 31, 32, 33, 34.

_elem_pos_: 8.

_end_: 8, 23.

_end_: 8, 20, 23, 26, 32, 33.

_entry_symbol_literal_: 8.

_enum_id_: 32, 33.

eog: 8.

eosubrule_: 28.

_eosubrule_: 26.

_errase_: 32, 34.

_Err_bad_filename_: 5.

_err_file_: 5.

_Err_phrase_: 6.

_error-symbols-phrase_: 16.

_false_: 26.

_fig_no_: 8.

_find_: 5, 29, 32, 33, 34.

_find_reduced_stateno_: 8.

_fu_filename_noext_: 6, 8.

_Fs_: 6.

_Fsm_: 6.

_fsm_: 8, 12, 13, 16, 18, 19, 20, 23, 26, 29, 30,

31, 32, 33, 34.

fsm-phrase_: 13.

_Fsm_phrase_: 6.

_fsm_tbl_: 8, 12, 13, 16, 18, 19, 20, 23, 26, 29,

30, 31, 32, 33, 34.

_gened_date_time_: 5, 6.

_goto_state_: 8.

grammar-phrase_: 9.

_grammar_filename_prefix_: 5, 6, 23, 26.

_identifier_: 32.

_ie_: 23.

_ios_: 5.

_ios_base_: 5.

_iterator_: 23.

_its_rule_def_: 8.

_its_t_def_: 32, 33.

_KCHARP_: 5, 8, 20, 23, 26, 32, 33.

_la_set_no_: 8.

_la_set_no_template_: 8.

_list_: 6.

_lrk_file_: 5.

_Lrk_phrase_: 6.

lr1-k-phrase_: 18.

LR1_PARALLEL_OPERATOR: 8.

LR1_STATES: 7, 8.

_map_: 6.

_Max_cweb_item_size_: 8.

_mp_dimension_: 5, 6.

_mp_elem_name_: 29, 30, 31, 32, 33, 34.

_mp_end_: 8.

_mp_figure_: 8.

_mp_filename_: 5, 6.

_mp_init_vars_: 8.

_mp_no_of_rules_: 20.

_Mp_obj_name_: 6.

_mp_obj_type_: 29, 30, 31, 32, 33, 34.

_mp_rule_names_: 23.

_mp_rules_s_no_rhs_: 23.

_mp_rules_s_subrule_no_elems_: 26.

_mpost_: 2, 8, 20, 23, 26, 29, 32.

_MPOST_CWEB_calc_mp_obj_name_: 6.

_MPOST_CWEB_crt_rhs_sym_str_: 6, 8.

_MPOST_CWEB_EMIT_PREFIX_CODE_: 5, 6.

_MPOST_CWEB_gen_dimension_name_: 6.

_MPOST_CWEB_gen_sr_elem_xrefs_: 6, 23.

_MPOST_CWEB_LOAD_XLATE_CHRS_: 4, 6.

_MPOST_CWEB_should_subrule_be_printed_: 6, 26.

_MPOST_CWEB_output_sr_sdcode_: 6, 26.

_MPOST_CWEB_wrt_Err_: 6, 16.

_MPOST_CWEB_wrt_fsm_: 6, 13.

_MPOST_CWEB_wrt_Lrk_: 6, 18.

_MPOST_CWEB_wrt_mp_rhs_elem_: 6, 29, 30,

_MPOST_CWEB_wrt_rule_slhs_sdc_: 6, 23.

_MPOST_CWEB_wrt_T_: 6, 19.

_MPOST_CWEB_clated_symbol_: 7, 8.

_MPOST_CWEB_ref_ref_red_rule_: 6.

_MPOST_CWEB_ref_ref_red_T_: 6.

_mpost_output_: 2.

_n_: 5.

_next_state_element_: 8.

_no_elements_: 26.

_no_of_elems_: 26.

_no_of_rules_: 5, 6, 8, 20.

_no_of_subrules_: 5, 6, 23, 26.

_no_srs_: 8.

_no_subrules_23.

_no_subrules_per_rule_: 5, 6, 8, 23.

_npos_: 29, 32, 33, 34.

_ns_: 32.

_NS_vacc02_terminals_: 6, 7.

null call thread eosubrule: 28.

_nxtsym_1_: 8.

_nxtsym_2_: 8.

_Ofile_: 7.

_ofstream_: 6, 7.

_omp_file_: 5, 6, 8, 20, 23, 26, 32, 33.

_open_: 5.

_out_: 5.

_ow_err_file_: 5, 6.

_ow_file_: 5, 6, 8, 12, 23, 26.

_ow_index_file_: 5, 6.

_ow_lrk_file_: 5, 6.

_ow_to_file_: 5, 6.

_o2extra_: 5.

parallel-parser-phrase: 14.

_parser_: 5, 8, 12, 13, 16, 18, 19, 20, 23, 26, 29,

_30, 31, 32, 33, 34.

_pdftex_: 2.

_previous_state_: 8.

PRT_RULE_S_FIRST_SET: 7.

_push_back_: 5, 23.

_p1_: 12, 13, 16, 18, 19, 20, 23, 26, 29, 30,

_32, 33, 34.

_p2_: 32, 33, 34.

_p3_: 32.

_r_def_: 30.

_R_rule_: 6.

R_T_: 6.

rc-phrase: 17.

_rd_: 8.

_re_align_nos_: 32, 33.

_reduced_state_: 8.

refered-rule: 28.

refered-T: 28.

_refered_rule_: 6.

_refered_T_: 6.

Relement: 27.

_Relement_: 28, 29, 30, 31, 32, 33, 34.

_Relements_: 25, 27.

Relements_: 25, 27.

Rerr_phrase_: 8.

_Rerr_phrase_: 16.

Rfsm_phrase_: 8.

_Rfsm_phrase_: 13.

Rgrammar_phrase_: 8.

_Rgrammar_phrase_: 9.

_rhs_syms_str_: 8.

Rk: 11.

_Rk_: 12.

_Rks_: 11.

Rks_: 10, 11.

Rks_epi: 8, 21.

_Rks_epi_: 10.

Rlrl_k_phrase_: 8.

_Rlrl_k_phrase_: 18.

_Rmpost_output_: 8.

_rname_: 23, 26.

Rparallel_phrase_: 8.

_Rparallel_phrase_: 14.

Rrc_phrase_: 8.

_Rrc_phrase_: 17.

_Rule_: 22.

_Rule_def_: 22.

_Rule_phrase_: 8.

_Rule_def_: 23.

_Rule_phrase_: 20.

_Rrules_: 8, 21.

_Rrules_: 21.

Rsubrule_: 24.

_Rsubrule_: 25.

_Rsubrule_def_: 25.

_Rsubrule_def_: 26. _Rsubrules_: 24. _Rsubrules_: 22, 24. _Rt_enum_phrase_: 8. _RT_enum_phrase_: 15. _Rterms_phrase_: 8. _Rterms_phrase_: 19. _rule_def_: 23. _rule_cweb_: 23. _rule_cweb_diagram_: 23. _Rule_def_: 6, 7. _rule_def_: 6, 7. _rule_def_: 6, 7, 8. _rule_def_: 5, 6, 23, 26. _Rule_in_stbl_: 30. _rule_info_: 8, 12, 13, 16, 18, 19, 20, 23, 26, 29, 30, 31, 32, 33, 34. _rule_lhs_: 26. _rule_name_: 8, 23, 26, 30. _rule_name_: 6. _rule_no_: 8. _rule_no_: 5, 6, 23, 26, 32, 33. _rule_s_subrule_no_elems_: 32. rules-phrase: 20. _rules_alphabet_: 20. _rules_for_fs_prt_: 6, 23. _S_VECTOR_ELEMS_ITER_type_: 8. _S_VECTORS_ITER_type_: 8. _se_: 6, 8. _second_: 8. _selie_: 8. _selie_: 8. _set_stop_parse_: 5. _set_who_created_: 5. _sf_: 2, 12, 13, 16, 18, 19, 20, 23, 26, 29, 30, 32, 33, 34. _si_: 8. _sie_: 8. _size_: 20. _size_type_: 29, 32, 33, 34. _sprintf_: 8, 20, 23, 26, 32, 33. _sr_element_: 8. _sr_figure_: 8. _sr_no_: 8. _sr_ph_: 23. _srd_: 8, 23. _srules_: 23. _state_: 8. _state_element_: 6, 8. _state_no_: 8. _state_s_vector_: 8. _state_type_: 8. _state_type_template_: 8. _STATES_ITER_type_: 8. _STATES_type_: 7. _std_: 6, 7, 23, 29, 30, 31, 32, 33, 34. _string_: 5, 6, 8, 29, 30, 31, 32, 33, 34. _subrule_: 32. _subrule_def: 26. _subrule_cweb_: 26. _subrule_cweb_diagram_: 26. _Subrule_def_: 6. _subrule_def_: 5, 6, 8, 26. _subrule_no_: 5, 6, 23, 26, 32, 33. _subrule_no_of_rule_: 8. _subrule_s_tree_: 23. _subrule_sym_: 8. _Subrule_tree_: 6. _subrules_23. _svi_: 8. _syn_: 7. _syn_: 5. _Syn_: 8. _Syn_: 7. _syn_top_state_: 15. _t_def_: 29, 32, 33, 34. _T_Enum_: 32, 33. _T_error_symbols_phrase_: 6. _t_file_: 5. _T_sfm_phrase_: 6. _t_in_stbl_: 29, 32, 33, 34. _T_lr1_k_phrase_: 6. _T_LR1_parallel_operator_: 32, 33. _t_name_: 29, 32, 33, 34. _T_phrase_: 6. _T_subrule_def_: 6, 8, 23. _T_subrules_phrase_: 23. _T_terminals_phrase_: 6. _terminals_phrase_: 19. _theTime_: 5. _three_symbols_string_template_: 8. _time_: 5. _true_: 5. _trunc_: 6, 23. _vectored_into_: 8. _vectored_into_by_elem_: 8. _w_end_: 8. _w_fig_no_: 5, 6, 23, 26. _w_filename_: 5, 6. _w_fsc_file_: 8. _w_index_filename_: 5, 6. _w_lr1_states_: 8. _w_possible_ar_code_: 8.

_w_stateno_: 8.

_w_stateno_subrule_: 8.

WRT_CWEB_MARKER: 12, 23, 26.

_XLATE_SYMBOLS_FOR_cweave_: 7, 8.

_xlated_names_: 6.

_Xlated_str_: 6.

_Xlated_sym_: 7.

\(\langle\)Cmpost_output constructor directive 4\(\rangle\)\(\langle\)Cmpost_output op directive 5\(\rangle\)\(\langle\)Cmpost_output user-declaration directive 6\(\rangle\)\(\langle\)Cmpost_output user-prefix-declaration directive 7\(\rangle\)\(\langle\)Relement subrule 1 op directive 29\(\rangle\)\(\langle\)Relement subrule 2 op directive 30\(\rangle\langle\)Relement subrule 3 op directive 31\(\rangle\langle\)Relement subrule 4 op directive 32\(\rangle\langle\)Relement subrule 5 op directive 33\(\rangle\langle\)Relement subrule 6 op directive 34\(\rangle\langle\)Reerr_phrase subrule 1 op directive 16\(\rangle\langle\)Rfsm_phrase subrule 1 op directive 13\(\rangle\langle\)Rk subrule 1 op directive 12\(\rangle\langle\)Rlr1_k_phrase subrule 1 op directive 18\(\rangle\langle\)Rmpost_output subrule 1 op directive 8\(\rangle\langle\)Rrule_def subrule 1 op directive 23\(\rangle\langle\)Rrule_phrase subrule 1 op directive 20\(\rangle\langle\)Rsubrule_def subrule 1 op directive 26\(\rangle\langle\)Rterms_phrase subrule 1 op directive 19\(\rangle\langle\)


mpost_output Grammar

Lr1 State Network