[ < ] | [ > ] | [ << ] | [Plus haut] | [ >> ] | [Top] | [Table des matières] | [Index] | [ ? ] |
A parser state is a list of ten elements describing the final state of parsing text syntactically as part of an expression. The parsing functions in the following sections return a parser state as the value, and in some cases accept one as an argument also, so that you can resume parsing after it stops. Here are the meanings of the elements of the parser state:
nil
if none.
nil
if none.
nil
if inside a string. More precisely, this is the character
that will terminate the string, or t
if a generic string delimiter
character should terminate it.
t
if inside a comment (of either style), or the comment nesting level
if inside a kind of comment that can be nested.
t
if point is just after a quote character.
nil
for a comment of style “a” or
when not inside a comment, t
for a comment of style “b,” and
syntax-table
for a comment that should be ended by a generic comment
delimiter character.
nil
.
Elements 1, 2, and 6 are ignored in a state which you pass as an argument to continue parsing, and elements 8 and 9 are used only in trivial cases. Those elements serve primarily to convey information to the Lisp program which does the parsing.
One additional piece of useful information is available from a parser state using this function:
This function extracts, from parser state state, the last position scanned in the parse which was at top level in grammatical structure. “At top level” means outside of any parentheses, comments, or strings.
The value is nil
if state represents a parse which has arrived
at a top level position.
We have provided this access function rather than document how the data is represented in the state, because we plan to change the representation in the future.
[ < ] | [ > ] | [ << ] | [Plus haut] | [ >> ] | [Top] | [Table des matières] | [Index] | [ ? ] |
Ce document a été généré par Eric Reinbold le 13 Octobre 2007 en utilisant texi2html 1.78.