!************************************************************************* ! * ! © Copyright 2005 Hewlett-Packard Development Company, L.P. * ! * ! Confidential computer software. Valid license from HP required for * ! possession, use or copying. Consistent with FAR 12.211 and 12.212, * ! Commercial Computer Software, Computer Software Documentation, and * ! Technical Data for Commercial Items are licensed to the U.S. * ! Government under vendor's standard commercial license. * ! * !************************************************************************* MODULE LSE$PATTERNS IDENT "4.9-0" ! ! LSE$EXAMPLES:LSE$PATTERNS.TPU ! ! This file is provided for use with the TPU pattern style that can ! be used with search and substitute commands and dialogs. ! ! The patterns provided are similar to those that are provided for the ! Digital Test Manager for OpenVMS (DTM) user defined filters ! feature. For LSE the variable names used by DTM are prefixed by an ! underscore character. ! ! ! "_null" which matches the null string. It can be used to specify ! optional pattern elements. For example, the pattern "'A' + ('B'|_null)" ! matches the strings "A" and "AB" ! _null := ""; ! ! Upper and lower case letters, including the shorthand "_uc" and "_lc" to ! match single upper or lower case letters. ! ! NOTE: These patterns require that searches are set to be case sensitive ! (using the SET SEARCH command) otherwise they will match both upper and ! lower case letters. ! _upper_case_letters := "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; _upper_case_letter := any(_upper_case_letters); _uc := any(_upper_case_letters); _lower_case_letters := "abcdefghijklmnopqrstuvwxyz"; _lower_case_letter := any(_lower_case_letters); _lc := any(_lower_case_letters); ! ! "_letter" and the shorthand "_l" which match a single letter ! and "_word", which matches any sequence of letters. ! _letters := _upper_case_letters + _lower_case_letters; _letter := any(_letters); _l := any(_letters); _word := span(_letters); ! ! "_digit" and the shorthand "_d" which match a single digit ! and "_number", which matches any sequence of digits. ! _digits := "0123456789"; _digit := any(_digits); _d := any(_digits); _number := span(_digits); ! ! "_identifier" which matches a string starting with a letter and ! followed by any combination of letters, digits, underscores ! and dollars. This would match most OpenVMS symbols and logical names. ! This pattern can be redefined to meet other requirements. ! _identifier := _letter + span(_letters + _digits + '_' + '$'); ! "_space" and the shorthand "_s" match a single space, "_spaces" matches ! a sequence of spaces, "_tab" the tab character, "_white_space" and the ! shorthand "_ws" match any sequence of spaces and tabs and ! "_optional_white_space" and the shorthand "_ows" match white space ! or nothing. ! _space := ' '; _s := ' '; _spaces := span(_space); _tab := ascii(9); _white_space := span(_space+_tab); _ws := span(_space+_tab); _optional_white_space := (span(_space+_tab)|_null); _ows := (span(_space+_tab)|_null); _lf := ascii(10); ENDMODULE