One of the markers included in the input is the end-of-line (eol). The eol is added to the input data by the front end of the adapter. To match an end-of-line, use eol.

The following script matches a word and an end-of-line. Notice that the output is different from many of the previous examples.

  • The first difference is that there were no messages for Failed match. All of the data matched.

  • The second difference is that there is a space between successive lines of output. This is because the eol match is included as part of the output.

    ASL Script (eol_match.asl):
    START {
     a:{word eol}
    }
    do {
     print("Matched with ".a);
    }
    DEFAULT {
     ..eol
    }
    do {
     print("Failed match");
    }
    Input (eol_match.txt):
    switch
    router
    card
    Output:
    $ sm_adapter --file=eol_match.txt eol_match.asl
    Matched with switch
    Matched with router
    Matched with card
    $