// Recognize integers: when multiple zeros are excluded <br/> Public static Boolean matchinteger (string input) {<br/> If (input. Matches ("^ -? // D + $ ")&&! Input. Matches ("^ -? 0 {2, }+ // D + $ ") <br/> return true; <br/> else <br/> return false; <br/>}< br/> // floating point Identification: 00.000 is excluded. <br/> Public static Boolean matchreal (string input) {<br/> If (input. matches ("^ (-? // D +) (//. // D + )? $ ") <Br/> &&! Input. Matches ("^ (-? 0 {2,} +) (//. // D + )? $ ") <Br/> return true; <br/> else <br/> return false; <br/>}< br/> // identify the identifier: it may consist of letters, numbers, and underscores. It must start with a letter and cannot end with the following line <br/> Public static Boolean matchid (string input) {<br/> If (input. matches ("^ // W + $ ")&&! Input. endswith ("_") <br/> & input. substring (0, 1 ). matches ("[A-Za-Z]") <br/> return true; <br/> else <br/> return false; <br/>}