head	1.2;
access;
symbols
	tcllib-1-13:1.2;
locks; strict;
comment	@# @;


1.2
date	2010.04.07.19.40.54;	author andreas_kupries;	state Exp;
branches;
next	1.1;

1.1
date	2010.03.26.05.07.25;	author andreas_kupries;	state Exp;
branches;
next	;


desc
@@


1.2
log
@
	* pt_peg_to_cparam.tcl (::pt::peg::to::cparam::convert): Changed
	* pt_peg_to_cparam.man: definition of string table from 'const
	* pkgIndex.tcl: char const*' to 'char const*'. The older
	* tests/data/ok/peg_cparam-critcl/6_optional: definition choked
	* tests/data/ok/peg_cparam-critcl/8_pkleene: the HPUX cc on IA64.
	* tests/data/ok/peg_cparam-critcl/1_functions: Bumped version to
	* tests/data/ok/peg_cparam-critcl/3_peg_itself: 1.0.1. Updated
	* tests/data/ok/peg_cparam-critcl/10_notahead: the testsuite.
	* tests/data/ok/peg_cparam-critcl/7_kleene:
	* tests/data/ok/peg_cparam-critcl/5_sequence:
	* tests/data/ok/peg_cparam-critcl/4_choice:
	* tests/data/ok/peg_cparam-critcl/9_ahead:
	* tests/data/ok/peg_cparam-critcl/0_basic_arithmetic:
	* tests/data/ok/peg_cparam-critcl/2_fun_arithmetic:
	* tests/data/ok/peg_cparam/6_optional:
	* tests/data/ok/peg_cparam/8_pkleene:
	* tests/data/ok/peg_cparam/1_functions:
	* tests/data/ok/peg_cparam/3_peg_itself:
	* tests/data/ok/peg_cparam/10_notahead:
	* tests/data/ok/peg_cparam/7_kleene:
	* tests/data/ok/peg_cparam/5_sequence:
	* tests/data/ok/peg_cparam/4_choice:
	* tests/data/ok/peg_cparam/9_ahead:
	* tests/data/ok/peg_cparam/0_basic_arithmetic:
	* tests/data/ok/peg_cparam/2_fun_arithmetic:

	* pt_parse_peg_c.tcl: See above, updated the generated code.
@
text
@/*
 * -*- tcl -*-
 * Parsing Expression Grammar 'TEMPLATE'.
 * Generated for unknown, from file 'TEST'
 */

/*
 * Declaring the parse functions
 */

<<attributes>> void <<ns>>sym_Expression (<<STATE>> <<state>>);
<<attributes>> void <<ns>>sym_Function (<<STATE>> <<state>>);
<<attributes>> void <<ns>>sequence_9 (<<STATE>> <<state>>);
<<attributes>> void <<ns>>sym_Sinus (<<STATE>> <<state>>);

/*
 * Precomputed table of strings (symbols, error messages, etc.).
 */

static char const* <<string-table>> [8] = {
    /*        0 = */   "n Expression",
    /*        1 = */   "Expression",
    /*        2 = */   "n Function",
    /*        3 = */   "Function",
    /*        4 = */   "str 'sin\50'",
    /*        5 = */   "t \51",
    /*        6 = */   "n Sinus",
    /*        7 = */   "Sinus"
};

/*
 * Grammar Start Expression
 */

<<attributes>> void <<ns>><<main>> (<<STATE>> <<state>>) { <<prelude>>
    <<self>> <<ns>>sym_Expression (<<state>>);
    return;
}

/*
 * value Symbol 'Expression'
 */

<<attributes>> void <<ns>>sym_Expression (<<STATE>> <<state>>) { <<prelude>>
   /*
    * (Function)
    */

    if (rde_param_i_symbol_start_d (<<state>>, 1)) return ;
    <<self>> <<ns>>sym_Function (<<state>>);
    rde_param_i_symbol_done_d_reduce (<<state>>, 1, 0);
    return;
}

/*
 * value Symbol 'Function'
 */

<<attributes>> void <<ns>>sym_Function (<<STATE>> <<state>>) { <<prelude>>
   /*
    * (Sinus)
    */

    if (rde_param_i_symbol_start_d (<<state>>, 3)) return ;
    <<self>> <<ns>>sym_Sinus (<<state>>);
    rde_param_i_symbol_done_d_reduce (<<state>>, 3, 2);
    return;
}

/*
 * value Symbol 'Sinus'
 */

<<attributes>> void <<ns>>sym_Sinus (<<STATE>> <<state>>) { <<prelude>>
   /*
    * x
    *     "sin\("
    *     (Expression)
    *     '\)'
    */

    if (rde_param_i_symbol_start_d (<<state>>, 7)) return ;
    <<self>> <<ns>>sequence_9 (<<state>>);
    rde_param_i_symbol_done_d_reduce (<<state>>, 7, 6);
    return;
}

<<attributes>> void <<ns>>sequence_9 (<<STATE>> <<state>>) { <<prelude>>
   /*
    * x
    *     "sin\("
    *     (Expression)
    *     '\)'
    */

    rde_param_i_state_push_void (<<state>>);
    rde_param_i_next_str (<<state>>, "sin\50", 4);
    if (rde_param_i_seq_void2value(<<state>>)) return;
    <<self>> <<ns>>sym_Expression (<<state>>);
    if (rde_param_i_seq_value2value(<<state>>)) return;
    rde_param_i_next_char (<<state>>, "\51", 5);
    rde_param_i_state_merge_value (<<state>>);
    return;
}

/*
 */
@


1.1
log
@
	* New module, 'pt' for ParserTools. Requires Tcl 8.5. Supercedes
	  grammar_peg, grammar_me, and page.
@
text
@d20 1
a20 1
static const char const* <<string-table>> [8] = {
@

