1
0
Fork 0
mirror of git://git.psyc.eu/libpsyc synced 2024-08-15 03:19:02 +00:00

changed documentation to Ddoc for parser.d

This commit is contained in:
Marenz 2011-05-09 00:39:21 +02:00
parent f56343e771
commit 2ef7cb40b9

View file

@ -2,20 +2,6 @@ module psyc.parser;
import psyc.common; import psyc.common;
/**
* @file d/psyc/parser.d
* @brief D Interface for various PSYC parser functions.
*
* All parsing functions and the definitions they use are
* defined in this file.
*/
/**
* @defgroup parsing-d D Parsing Functions
*
* This module contains all parsing functions.
* @{
*/
extern (C): extern (C):
@ -27,7 +13,9 @@ enum ParseFlag
/** /**
* The return value definitions for the packet parsing function. * The return value definitions for the packet parsing function.
* @see parse() *
* See_Also:
* parse()
*/ */
enum ParseRC enum ParseRC
{ {
@ -95,7 +83,7 @@ enum ParseRC
/** /**
* The return value definitions for the list parsing function. * The return value definitions for the list parsing function.
* @see parseList() * See_Also: parseList()
*/ */
enum ParseListRC enum ParseListRC
{ {
@ -143,7 +131,8 @@ struct ParseState
/** /**
* Initializes the state struct with flags. * Initializes the state struct with flags.
* *
* @param flags Flags to be set for the parser, see ParseFlag. * Params:
* flags = Flags to be set for the parser, see ParseFlag.
*/ */
static ParseState opCall ( ubyte flags ) static ParseState opCall ( ubyte flags )
{ {
@ -159,8 +148,10 @@ struct ParseState
/** /**
* Sets a new buffer in the parser state struct with data to be parsed. * Sets a new buffer in the parser state struct with data to be parsed.
* *
* @param buffer the buffer that should be parsed now * Params:
* @see String * buffer the buffer that should be parsed now
*
* See_Also: String
*/ */
void setParseBuffer ( String buffer ) void setParseBuffer ( String buffer )
{ {
@ -177,8 +168,10 @@ struct ParseState
/** /**
* Sets a new buffer in the parser state struct with data to be parsed. * Sets a new buffer in the parser state struct with data to be parsed.
* *
* @param buffer the buffer that should be parsed now * Params:
* @see String * buffer = the buffer that should be parsed now
*
* See_Also: String
*/ */
void setParseBuffer ( ubyte[] buffer ) void setParseBuffer ( ubyte[] buffer )
{ {
@ -188,8 +181,9 @@ struct ParseState
/** /**
* Sets a new buffer in the parser state struct with data to be parsed. * Sets a new buffer in the parser state struct with data to be parsed.
* *
* @param buffer pointer to the buffer that should be parsed now * Params:
* @param length length of the buffer * buffer = pointer to the buffer that should be parsed now
* length = length of the buffer
*/ */
void setParseBuffer ( ubyte* buffer, size_t length ) void setParseBuffer ( ubyte* buffer, size_t length )
{ {
@ -258,7 +252,9 @@ struct ParseListState
/** /**
* Sets a new buffer with data to be parsed * Sets a new buffer with data to be parsed
* @param buffer the buffer to be parsed *
* Params:
* buffer = the buffer to be parsed
*/ */
void setBuffer ( String buffer ) void setBuffer ( String buffer )
{ {
@ -268,7 +264,9 @@ struct ParseListState
/** /**
* Sets a new buffer with data to be parsed * Sets a new buffer with data to be parsed
* @param buffer the buffer to be parsed *
* Params:
* buffer = the buffer to be parsed
*/ */
void setBuffer ( ubyte[] buffer ) void setBuffer ( ubyte[] buffer )
{ {
@ -277,8 +275,10 @@ struct ParseListState
/** /**
* Sets a new buffer with data to be parsed * Sets a new buffer with data to be parsed
* @param buffer pointer to the buffer to be parsed *
* @param length size of the buffer * Params:
* buffer = pointer to the buffer to be parsed
* length = size of the buffer
*/ */
void setBuffer ( ubyte* buffer, size_t length ) void setBuffer ( ubyte* buffer, size_t length )
{ {
@ -292,13 +292,14 @@ struct ParseListState
* *
* Generalized line-based packet parser. * Generalized line-based packet parser.
* *
* @param state An initialized ParseState * Params:
* @param oper A pointer to a character. In case of a variable, it will * state = An initialized ParseState
* be set to the operator of that variable * oper = A pointer to a character. In case of a variable, it will
* @param name A pointer to a String. It will point to the name of * be set to the operator of that variable
* the variable or method and its length will be set accordingly * name = A pointer to a String. It will point to the name of
* @param value A pointer to a String. It will point to the * the variable or method and its length will be set accordingly
* value/body the variable/method and its length will be set accordingly * value = A pointer to a String. It will point to the
* value/body the variable/method and its length will be set accordingly
*/ */
ParseRC psyc_parse(ParseState* state, char* oper, String* name, String* value); ParseRC psyc_parse(ParseState* state, char* oper, String* name, String* value);