*** empty log message ***

This commit is contained in:
hyung-hwan 2007-02-14 09:25:02 +00:00
parent 98ea57a7b9
commit 16823de514
4 changed files with 92 additions and 0 deletions

13
ase/doc/awk-en.man Normal file
View File

@ -0,0 +1,13 @@
.title ASEAWK
== ASEAWK ==
ASE provides an embeddable interpreter of a dialect of the AWK programming language. The language implemented is slightly different from {the version developed by Brian W. Kernighan, http://cm.bell-labs.com/cm/cs/awkbook/index.html} and has been adjusted to the author's preference.
=== User Guide ===
The embedding of the interpreter is best described in the same source code available in the distribution.
[[[
* {Reference Manual,awk-ref-en.html}
]]]

17
ase/doc/awk-ref-en.man Normal file
View File

@ -0,0 +1,17 @@
.title ASEAWK FUNCTION REFERENCE
== Function ==
=== ase_awk_open ===
{{{
ase_awk_t* ase_awk_open (const ase_awk_prmfns_t* prmfns, void* custom_data, int* errnum);
}}}
The function creates an object of the type ase_awk_t. It requires a set of system functions as described in the type ase_awk_prmfns_t.
=== ase_awk_close ===
{{{
int ase_awk_close (ase_awk_t* awk);
}}}

11
ase/doc/diff.man Normal file
View File

@ -0,0 +1,11 @@
== Difference From The Standard AWK ==
== line terminiator ==
it doesn't accept the new line as a line terminator.
== print/printf ==
if the statement succeeds, it sets ERRNO to 0. otherwise, it sets ERRNO to -1.

51
ase/doc/embed.man Normal file
View File

@ -0,0 +1,51 @@
.title Embedding AWK
To embed the awk interpreter to an application, the developer should provide the following routines.
* System functions including memory management
* Source code I/O functions
* I/O functions to interface with the console, files, and pipes.
ase_awk_open creates an awk object and requires a pointer to a structure holding system functions. The structure is described in ase_awk_prmfns_t.
{{{
struct ase_awk_prmfns_t
{
/* memory */
void* (*malloc) (ase_size_t n, void* custom_data);
void* (*realloc) (void* ptr, ase_size_t n, void* custom_data);
void (*free) (void* ptr, void* custom_data);
/* thread lock */
ase_awk_lk_t lock;
ase_awk_lk_t unlock;
/* character class */
ase_bool_t (*is_upper) (ase_cint_t c);
ase_bool_t (*is_lower) (ase_cint_t c);
ase_bool_t (*is_alpha) (ase_cint_t c);
ase_bool_t (*is_digit) (ase_cint_t c);
ase_bool_t (*is_xdigit) (ase_cint_t c);
ase_bool_t (*is_alnum) (ase_cint_t c);
ase_bool_t (*is_space) (ase_cint_t c);
ase_bool_t (*is_print) (ase_cint_t c);
ase_bool_t (*is_graph) (ase_cint_t c);
ase_bool_t (*is_cntrl) (ase_cint_t c);
ase_bool_t (*is_punct) (ase_cint_t c);
ase_cint_t (*to_upper) (ase_cint_t c);
ase_cint_t (*to_lower) (ase_cint_t c);
/* utilities */
void* (*memcpy) (void* dst, const void* src, ase_size_t n);
void* (*memset) (void* dst, int val, ase_size_t n);
ase_real_t (*pow) (ase_real_t x, ase_real_t y);
int (*sprintf) (ase_char_t* buf, ase_size_t size, const ase_char_t* fmt, ...);
void (*aprintf) (const ase_char_t* fmt, ...); /* assertion */
void (*dprintf) (const ase_char_t* fmt, ...); /* debug */
void (*abort) (void);
void* custom_data;
};
}}}