Show
Ignore:
Timestamp:
10/07/08 04:19:46 (3 months ago)
Author:
pmoura
Message:

Added predicates is_ascii/1, is_white_space/1, is_quote/1, is_period/1, is_punctation/1, and parenthesis/2 to the library entities "characterp" and "character".

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/library/character.lgt

    r4492 r4493  
    99        date is 2008/10/7, 
    1010        comment is 'Character predicates.']). 
     11 
     12    is_ascii(Char) :- 
     13        char_code(Char, Code), 
     14        Code >= 0, 
     15        Code =< 127. 
    1116 
    1217    is_alpha('_'). 
     
    6469    is_vowel('U'). 
    6570 
     71    is_white_space(' '). 
     72    is_white_space('\t'). 
     73 
    6674    is_layout(' '). 
    6775    is_layout('\t'). 
     76    is_layout('\f'). 
     77    is_layout('\r'). 
    6878    is_layout('\n'). 
     79    is_layout('\v'). 
    6980 
    7081    is_quote(''''). 
     
    7889    is_punctation('?'). 
    7990    is_punctation('!'). 
     91 
     92    is_period('.'). 
     93    is_period('?'). 
     94    is_period('!'). 
     95 
     96    parenthesis('(', ')'). 
     97    parenthesis('[', ']'). 
     98    parenthesis('{', '}'). 
    8099 
    81100    lower_upper(a, 'A').