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/characterp.lgt

    r4492 r4493  
    77        date is 2008/10/7, 
    88        comment is 'Character protocol.']). 
     9 
     10    :- public(is_ascii/1). 
     11    :- mode(is_ascii(+char), zero_or_one). 
     12    :- info(is_ascii/1, [ 
     13        comment is 'True if the argument is an ASCII character.', 
     14        argnames is ['Char']]). 
    915 
    1016    :- public(is_alphanumeric/1). 
     
    6874        argnames is ['Char']]). 
    6975 
     76    :- public(is_white_space/1). 
     77    :- mode(is_white_space(+char), zero_or_one). 
     78    :- info(is_white_space/1, [ 
     79        comment is 'True if the argument is a white space character (a space or a tab) inside a line of characters.', 
     80        argnames is ['Char']]). 
     81 
    7082    :- public(is_layout/1). 
    7183    :- mode(is_layout(+char), zero_or_one). 
     
    8395    :- mode(is_punctation(+char), zero_or_one). 
    8496    :- info(is_punctation/1, [ 
    85         comment is 'True if the argument is a punctation character.', 
     97        comment is 'True if the argument is a sentence punctation character.', 
    8698        argnames is ['Char']]). 
     99 
     100    :- public(is_period/1). 
     101    :- mode(is_period(+char), zero_or_one). 
     102    :- info(is_period/1, [ 
     103        comment is 'True if the argument is a character that ends a sentence.', 
     104        argnames is ['Char']]). 
     105 
     106    :- public(parenthesis/2). 
     107    :- mode(parenthesis(?char, ?char), zero_or_more). 
     108    :- mode(parenthesis(+char, ?char), zero_or_one). 
     109    :- mode(parenthesis(?char, +char), zero_or_one). 
     110    :- info(parenthesis/2, [ 
     111        comment is 'Recognises and converts between open and close parenthesis.', 
     112        argnames is ['Char1', 'Char2']]). 
    87113 
    88114    :- public(lower_upper/2). 
     
    91117    :- mode(lower_upper(?char, +char), zero_or_one). 
    92118    :- info(lower_upper/2, [ 
    93         comment is 'Converts between lower and upper case letters.', 
     119        comment is 'Recognises and converts between lower and upper case letters.', 
    94120        argnames is ['Char1', 'Char2']]). 
    95121