/* @(#)html_typedef.h 1.4 95/09/16 */

/*
 * Copyright (c) 1994, 1995 by Wayne C. Gramlich.  All rights reserved.
 *
 * Permission to use, copy, modify, distribute, and sell this software
 * for any purpose is hereby granted without fee provided that the above
 * copyright notice and this permission are retained.  The author makes
 * no representations about the suitability of this software for any purpose.
 * It is provided "as is" without express or implied warranty.
 */

#if !defined(HTML_TYPEDEF_H)
#define HTML_TYPEDEF_H

#include "vector_typedef.h"

/*
 * An {Html} object represents an HTML tag including all preceeding text
 * and white-space.  Care is taken to preserve all white-space so that
 * a document can be parsed into a list of Html objects and converted
 * back into a text string without any addition or loss of characters.
 */
typedef struct attribute_struct *Attribute;
typedef enum {
    Attribute_undefined = 0,	/* Undefined attribute type */
    Attribute_name_value,	/* Attribute value is an unquoted name */
    Attribute_single_quote,	/* Attribute in single quotes */
    Attribute_double_quote	/* Attribute in double quotes */
} Attribute_type;
typedef Vector Attributes;

typedef struct html_struct *Html;

typedef struct match_struct *Match;
typedef Vector Matches;

typedef struct tag_struct *Tag;
typedef enum {
    Tag_undefined = 0,		/* Undefined html tag type */
    Tag_comment,		/* Comment tag */
    Tag_start,			/* Start tag */
    Tag_end,			/* End tag */
    Tag_end_of_file		/* End of file */
} Tag_type;
typedef Vector Tags;

#endif /* HTML_TYPEDEF_H */



