<s> import Test <EOL> import sys <EOL> from Plex import * <EOL> letter = Range ( "<STR_LIT>" ) | Any ( "<STR_LIT:_>" ) <EOL> digit = Range ( "<STR_LIT>" ) <EOL> space = Any ( "<STR_LIT>" ) <EOL> ident = Seq ( letter , Rep ( Alt ( letter , digit ) ) ) <EOL> number = Seq ( digit , Rep ( digit ) ) <EOL> punct = Any ( "<STR_LIT>" ) <EOL> spaces = Seq ( space , Rep ( space ) ) <EOL> resword = Str ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT:end>" , "<STR_LIT>" , "<STR_LIT>" ) <EOL> lex = Lexicon ( [ <EOL> ( resword , TEXT ) , <EOL> ( ident , '<STR_LIT>' ) , <EOL> ( number , '<STR_LIT>' ) , <EOL> ( punct , TEXT ) , <EOL> ( spaces , IGNORE ) <EOL> ] , <EOL> debug = Test . debug , <EOL> timings = sys . stderr <EOL> ) <EOL> Test . run ( lex , "<STR_LIT>" , trace = <NUM_LIT:0> ) </s>
