- r_token(-Token)// is semidet
- Get an R token from the input. Defined tokens are:
- number(FloatOrInt)
- Used for numerical constants.
- complex(FloatOrInt)
- Used for <number>i.
- string(String)
- Used for quoted strings.
- identifier(Atom)
- General identifier (includes function names)
- constant(Atom)
- Reserved constants (e.g.,
NULL
, NA
, ...)
- logical(Boolean)
- Used for
TRUE
and FALSE
- keyword(Atom)
- Used for
if
, else
, etc.
- infix(Atom)
- Used for
%...%
infix operators
- op(Atom)
- Used for +, -, *, etc.
- punct(Atom)
- Used for the braces
{[()]}
and the comma (,)
- comment(String)
- Used for # Comment lines.