Index: libyaml/trunk/include/yaml/yaml.h
===================================================================
--- libyaml/trunk/include/yaml/yaml.h	(revision 183)
+++ libyaml/trunk/include/yaml/yaml.h	(revision 184)
@@ -21,5 +21,5 @@
 
 /**
- * @defgroup Export Definitions
+ * @defgroup export Export Definitions
  * @{
  */
@@ -115,5 +115,5 @@
 
 /**
- * @defgroup Node Styles
+ * @defgroup styles Node Styles
  * @{
  */
@@ -152,5 +152,5 @@
 
 /**
- * @defgroup Tokens
+ * @defgroup tokens Tokens
  * @{
  */
@@ -534,4 +534,31 @@
 
 /**
+ * This structure holds information about a potential simple key.
+ */
+
+typedef struct {
+    /** Is a simple key possible? */
+    int possible;
+
+    /** Is a simple key required? */
+    int required;
+
+    /** The number of the token. */
+    size_t token_number;
+
+    /** The position index. */
+    size_t index;
+
+    /** The position line. */
+    size_t line;
+
+    /** The position column. */
+    size_t column;
+
+    /** The position mark. */
+    yaml_mark_t mark;
+} yaml_simple_key_t;
+
+/**
  * The parser structure.
  *
@@ -620,4 +647,58 @@
      */
 
+    /**
+     * @name Scanner stuff
+     * @{
+     */
+
+    /** Have we started to scan the input stream? */
+    int stream_start_produced;
+
+    /** Have we reached the end of the input stream? */
+    int stream_end_produced;
+
+    /** The number of unclosed '[' and '{' indicators. */
+    int flow_level;
+
+    /** The tokens queue, which contains the current produced tokens. */
+    yaml_token_t *tokens;
+
+    /** The size of the tokens queue. */
+    size_t tokens_size;
+
+    /** The head of the tokens queue. */
+    size_t tokens_head;
+
+    /** The tail of the tokens queue. */
+    size_t tokens_tail;
+
+    /** The number of tokens fetched from the tokens queue. */
+    size_t tokens_parsed;
+
+    /** The stack of indentation levels. */
+    int *indents;
+
+    /** The size of the indents stack. */
+    size_t indents_size;
+
+    /** The number of items in the indents stack. */
+    size_t indents_length;
+
+    /** The current indentation level. */
+    int indent;
+
+    /** May a simple key occur at the current position? */
+    int simple_key_allowed;
+
+    /** The stack of potential simple keys. */
+    yaml_simple_key_t *simple_keys;
+
+    /** The size of the simple keys stack. */
+    size_t simple_keys_size;
+
+    /**
+     * @}
+     */
+
 } yaml_parser_t;
 
@@ -694,4 +775,34 @@
 YAML_DECLARE(void)
 yaml_parser_set_encoding(yaml_parser_t *parser, yaml_encoding_t encoding);
+
+/**
+ * Get the next token.
+ *
+ * The token is removed from the internal token queue and the application is
+ * responsible for destroing the token object.
+ *
+ * @param[in]   parser      A parser object.
+ *
+ * @returns A token object, or @c NULL on error.
+ */
+
+YAML_DECLARE(yaml_token_t *)
+yaml_parser_get_token(yaml_parser_t *parser);
+
+/**
+ * Peek the next token.
+ *
+ * The token is not removed from the internal token queue and will be returned
+ * again on a subsequent call of @c yaml_parser_get_token or
+ * @c yaml_parser_peek_token. The application should not destroy the token
+ * object.
+ *
+ * @param[in]   parser      A parser object.
+ *
+ * @returns A token object, or @c NULL on error.
+ */
+
+YAML_DECLARE(yaml_token_t *)
+yaml_parser_peek_token(yaml_parser_t *parser);
 
 /** @} */
