PublicShow sourcereadln.pl -- Read line as list of tokens

Read a sentence from the current input stream and convert it into a list of atoms and numbers:

Main predicates provided:

readln(P)           - Read a sentence up till NewLine and
                      unify <P> with the list of atoms/numbers
                      (identical to:
                             readln(P, [10],"_01213456789",uppercase).)
readln(P, LastCh)   - idem as above but the second argument is unified
                      with the last character read (the ascii-code for
                      the stop-character or -1)
readln(P, LastCh, Arg1, Arg2, Arg3)
                    - idem as above but the default setting is changed
                      for the instantiated args:
                      Arg1: List of stop characters
                      Arg2: List of word_part characters
                      Arg3: uppercase/lowercase conversion
Examples: read_sentence(P,Case) :- readln(P,_,".!?","_0123456789",Case).
read_in(P) :- % with numbers as separate readln(P,Eof,_,"", _). % entities.
read_atom(A) :- % stop on newline, readln(A,_,_," ",_). % space is part of word
See also
- library(readutil), nlp package.
deprecated
- Old code. Not maintained and probably not at the right level of abstraction. Not locale support.

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

Source readln(Arg1, Arg2)
Source readln(Arg1, Arg2, Arg3, Arg4, Arg5)
Source readln(Arg1)