Ignore:
Timestamp:
Aug 20, 2014, 10:58:28 PM (5 years ago)
Author:
ksherdy
Message:

Updates to grep s2k.

File:
1 edited

Legend:

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

    r4059 r4065  
    11/*
    2  * grep exact-string search C++ in \s2k{}.
     2 * grep exact-string search C++ in: s2k.
    33 *
    44 *
    5  * The \s2k{} grep exact-string search demo is organized into the following
     5 * The s2k grep exact-string search demo is organized into the following
    66 * pipeline stages.
    77 * 
     
    1313 * Stage 6 - Write
    1414 *
    15  * The \s2k{} program defines the following program elements.
     15 * The s2k program defines the following program elements.
    1616 *
    1717 * 1. Stream structures.
     
    7171};
    7272
    73 filter Read(out struct Input input) {
    74   //io.bind<char>(buffer, input.data, s2k::SEGMENT_SIZE);
    75   //io.bind<BitBlock>(starts, output.starts, s2k::SEGMENT_SIZE);
    76   //io.bind<BitBlock>(ends, output.ends, s2k::SEGMENT_SIZE);
    77   //io.bind<BitBlock>(markers, output.markers, s2k::SEGMENT_SIZE);
     73filter Read(out: struct Input input) {
     74  //io.bind<8>(buffer, input.data, s2k::SEGMENT_SIZE);
     75  //io.bind<1>(starts, output.starts, s2k::SEGMENT_SIZE);
     76  //io.bind<1>(ends, output.ends, s2k::SEGMENT_SIZE);
     77  //io.bind<1>(markers, output.markers, s2k::SEGMENT_SIZE);
    7878
    79   //io.read_buffer<char>(input.data);
     79  //io.read<8>(input.data);
    8080}
    8181
    82 //filter Transpose(in struct Input input, out struct Basis_bits basis_bits) {
     82//filter Transpose(in: struct Input input, out: struct Basis_bits basis_bits) {
    8383//
    8484//}
    8585
    8686/* 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
     87 * classes encountered in: the fixed string `apple' and line feeds.
     88 * in: this example, the generation of character class bit stream
    8989 * equations is automated using the character class compiler tool.
    9090 */
    91 filter ClassifyBytes(in struct Basis_bits basis_bits, out struct Lex lex) {
     91filter ClassifyBytes(in: struct Basis_bits basis_bits, out: struct Lex lex) {
    9292  stream<1> temp1 = (basis_bits.bit_1 & (~ basis_bits.bit_0));
    9393  stream<1> temp2 = (basis_bits.bit_2 & (~ basis_bits.bit_3));
     
    117117}
    118118
    119 filter Match(in struct Lex lex, out struct Output output) {
     119filter Match(in: struct Lex lex, out: struct Output output) {
    120120  stream<1> cursor = flow.Advance(lex.a);
    121121  cursor = flow.Advance((cursor & lex.p));
     
    126126}
    127127
    128 filter MatchLines(in struct Lex lex, out struct Output output) {
     128filter MatchLines(in: struct Lex lex, out: struct Output output) {
    129129  stream<1> all_line_starts = (flow.ScanToFirst((~ lex.LF))
    130130                            | (flow.Advance(lex.LF) & (~ lex.LF)));
     
    148148}
    149149
    150 filter Write(in struct Output output) {
    151   //io.write<BitBlock>(output.line_starts);
    152   //io.write<BitBlock>(output.line_ends);
    153   //io.write<BitBlock>(output.match_follows);
     150filter Write(in: struct Output output) {
     151  //io.write<1>(output.line_starts);
     152  //io.write<1>(output.line_ends);
     153  //io.write<1>(output.match_follows);
    154154}
    155155
Note: See TracChangeset for help on using the changeset viewer.