analyze.lua
General file comment.
Description:
Implement the substitution methods of source files.
$Id $
Definitions
LUADOC_VERSION
= "2.0"
LuaDoc version number.
Functions
analyze
(in_file, desc_file, out_file)
Process an input file according to a set of substitutions and
generate an output file.
apply
(source, desc, result_table)
Apply a series of substitutions to a string.
filter
(str)
Apply a series of filters to a string.
Gappend
(field)
Build an append function for the global table.
Gappend_pair
(field)
Build an append-pair function for the global table.
Ginsert
(field)
Build an insertion function for the global table.
Tappend
(field)
Build an append function.
Tcreate
(field)
Build an attribution funciton.
Tinsert
(field)
Build an insertion function.
Treturn
(field)
Build a "return" function.
Tson
(table)
Build a "son" for the given table.
Uappend
(field)
Build an append function to the upper level table.
Ucreate
(field)
Build an attribution funciton to the upper level table.
write_doc
(doc_table, filter_table)
Generate the output.
Definitions
LUADOC_VERSION
= "2.0"
Functions
analyze
(in_file, desc_file, out_file)
Process an input file according to a set of substitutions and
generate an output file.
- Parameters
in_file | String with the name of the input file |
desc_file | String with the name of the substitutions file |
out_file | String with the name of the output file (optional) |
Return Value: Table with the structured document.
apply
(source, desc, result_table)
Apply a series of substitutions to a string.
When the substitution pattern is a table, another entry on the current table is created and the function is called recursively with the matching substring as the source string; desc is the substitution pattern and the current table is changed to the new one..- Parameters
source | String to be processed |
desc | Table with pairs of matching patterns and substitution
patterns |
result_table | Table that will receive the structured
document |
Return Value: String after all the substitutions applied.
filter
(str)
Apply a series of filters to a string.
- Parameters
str | String to be processed |
Return Value: String after all the filters applied.
Gappend
(field)
Build an append function for the global table.
The created function will be responsible for appends on the table at the given field of the global table. The table will be created if necessary. - Parameters
field | String with the name of the field on the current
table that will receive the value |
Return Value: Function that insert a value in the table.
- See also
- Tappend
Gappend_pair
(field)
Build an append-pair function for the global table.
The created function will be responsible for append pair of values on the table at the given field of the global table. The table will be created if necessary. - Parameters
field | String with the name of the field on the current
table that will receive the value |
Return Value: Function that insert a value in the table.
- See also
- Tappend
Ginsert
(field)
Build an insertion function for the global table.
The created function will be responsible for inserting values at a given position on the field of the current table. The table at field could be created if necessary. - Parameters
field | String with the name of the field of the current
table that will receive the value |
Return Value: Function that insert a given value at a given index
of the table.
- See also
- Tcreate
- Tappend
Tappend
(field)
Build an append function.
The created funciton will be responsible for insertions to the table at field of the current table. The table will be created if necessary. - Parameters
field | String with the name of the field at the current
table |
Return Value: Function that insert values in the current table.
- See also
- Tcreate
- Tinsert
Tcreate
(field)
Build an attribution funciton.
The created function will be responsible for attributions to the field of the current table. - Parameters
field | String with the name of the field of the current
table that will receive the value |
Return Value: Function that insert a value in the table.
- See also
- Tinsert
- Tappend
Tinsert
(field)
Build an insertion function.
The created function will be responsible for inserting values at a given position on the field of the current table. The table at field could be created if necessary. - Parameters
field | String with the name of the field of the current
table that will receive the value |
Return Value: Function that insert a given value at a given index
of the table.
- See also
- Tcreate
- Tappend
Treturn
(field)
Build a "return" function.
The created function could be used to assign the table built at the current level to the field of the current table of the upper level. - Parameters
field | String with the name of the field of the upper
level current table |
Return Value: Function that "returns" the table to the upper one.
Tson
(table)
Build a "son" for the given table.
- Parameters
Return Value: "Son" table of the given table.
Uappend
(field)
Build an append function to the upper level table.
The created funciton will be responsible for insertions to at field of the upper level current table. The table will be created if necessary. - Parameters
field | String with the name of the field at the current
table |
Return Value: Function that insert values in the upper level current table.
- See also
- Tappend
Ucreate
(field)
Build an attribution funciton to the upper level table.
The created function will be responsible for attributions to the field of the upper level current table. - Parameters
field | String with the name of the field of the upper
level current table that will receive the value |
Return Value: Function that insert a value in the upper level
current table.
- See also
- Tinsert
- Tappend
write_doc
(doc_table, filter_table)
Generate the output.
- Parameters
doc_table | Table with the documentation |
filter_table | Table with the output filters |
- See also
- t2s
This file was automatically generated by LuaDoc in 14 of August of 2002.