Changeset 4059 for proto


Ignore:
Timestamp:
Aug 20, 2014, 4:19:27 PM (5 years ago)
Author:
ksherdy
Message:

Minor edits.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/s2k/trunk/framework/input/test/s2k/proto/grep/s2k_header_grep.s2k

    r4056 r4059  
    22 * grep exact-string search C++ in \s2k{}.
    33 *
    4  * Description:
    54 *
    65 * The \s2k{} grep exact-string search demo is organized into the following
     
    87 * 
    98 * Stage 1 - Read
    10  * Stage 2 - Transpose`
     9 * Stage 2 - Transpose
    1110 * Stage 3 - ClassifyBytes
    1211 * Stage 4 - Match
    1312 * Stage 5 - MatchLines
    1413 * Stage 6 - Write
    15  *
    16  * Back ticks indicate stages defined with the s2k runtime.
    1714 *
    1815 * The \s2k{} program defines the following program elements.
    1916 *
    20  * 1. Stream structures Lex and Output.
    21  *
    22  * 2. Stream functions Read, ClassifyBytes, Match, MatchLines, and Write.
    23  * ClassifyBytes defines \s2k{} equations for each of the character
    24  * classes encountered in the fixed string `apple' and line feeds.
    25  * In this example, the generation of character class bit stream
    26  * equations is automated using the character class compiler tool.
    27  *
    28  * 3. Stream `graph' of stream filters.
    29  *
     17 * 1. Stream structures.
     18 * 2. Stream filters. 
     19 * 3. Stream graph.
    3020 *
    3121 * The s2k compiler translates s2k to b2k and b2k to C++ as follows.
     
    4434 *    and block kernel definitions, b2k strem structure and block kernel
    4535 *    definitions to C++ structure instances.
    46  *
    4736 *    s2k{} `graph' stream filter method calls to sequences of stream
    4837 *    function `do_block', `do_final_block', and `clear' function calls.
     
    5645/*
    5746struct Basis_bits{
    58   stream bit_0;
    59   stream bit_1;
    60   stream bit_2;
    61   stream bit_3;
    62   stream bit_4;
    63   stream bit_5;
    64   stream bit_6;
    65   stream bit_7;
     47  stream<1> bit_0;
     48  stream<1> bit_1;
     49  stream<1> bit_2;
     50  stream<1> bit_3;
     51  stream<1> bit_4;
     52  stream<1> bit_5;
     53  stream<1> bit_6;
     54  stream<1> bit_7;
    6655};
    6756*/
    6857
    6958struct Lex{
    70   stream a;
    71   stream p;
    72   stream l;
    73   stream e;
    74   stream LF;
     59  stream<1> a;
     60  stream<1> p;
     61  stream<1> l;
     62  stream<1> e;
     63  stream<1> LF;
    7564};
    7665
    7766struct Output{
    78   stream match_follows;
    79   stream lines;
    80   stream line_starts;
    81   stream line_ends;
     67  stream<1> match_follows;
     68  stream<1> lines;
     69  stream<1> line_starts;
     70  stream<1> line_ends;
    8271};
    8372
     
    9584//}
    9685
     86/* ClassifyBytes defines s2k equations for each of the character
     87 * classes encountered in the fixed string `apple' and line feeds.
     88 * In this example, the generation of character class bit stream
     89 * equations is automated using the character class compiler tool.
     90 */
    9791filter ClassifyBytes(in struct Basis_bits basis_bits, out struct Lex lex) {
    9892  stream<1> temp1 = (basis_bits.bit_1 & (~ basis_bits.bit_0));
Note: See TracChangeset for help on using the changeset viewer.