renamed ase to qse
This commit is contained in:
243
qse/doc/doxyfile
Normal file
243
qse/doc/doxyfile
Normal file
@ -0,0 +1,243 @@
|
||||
# Doxyfile 1.4.6
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
PROJECT_NAME = ase
|
||||
PROJECT_NUMBER =
|
||||
OUTPUT_DIRECTORY = ./api
|
||||
CREATE_SUBDIRS = NO
|
||||
OUTPUT_LANGUAGE = English
|
||||
USE_WINDOWS_ENCODING = YES
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
REPEAT_BRIEF = YES
|
||||
ABBREVIATE_BRIEF = "The $name class" \
|
||||
"The $name widget" \
|
||||
"The $name file" \
|
||||
is \
|
||||
provides \
|
||||
specifies \
|
||||
contains \
|
||||
represents \
|
||||
a \
|
||||
an \
|
||||
the
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
FULL_PATH_NAMES = YES
|
||||
STRIP_FROM_PATH = ../include
|
||||
STRIP_FROM_INC_PATH =
|
||||
SHORT_NAMES = NO
|
||||
JAVADOC_AUTOBRIEF = YES
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
DETAILS_AT_TOP = NO
|
||||
INHERIT_DOCS = YES
|
||||
SEPARATE_MEMBER_PAGES = NO
|
||||
TAB_SIZE = 8
|
||||
ALIASES =
|
||||
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
BUILTIN_STL_SUPPORT = NO
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
SUBGROUPING = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
EXTRACT_ALL = NO
|
||||
EXTRACT_PRIVATE = NO
|
||||
EXTRACT_STATIC = YES
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
EXTRACT_LOCAL_METHODS = NO
|
||||
HIDE_UNDOC_MEMBERS = YES
|
||||
HIDE_UNDOC_CLASSES = YES
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
HIDE_IN_BODY_DOCS = NO
|
||||
INTERNAL_DOCS = NO
|
||||
CASE_SENSE_NAMES = NO
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
INLINE_INFO = YES
|
||||
SORT_MEMBER_DOCS = YES
|
||||
SORT_BRIEF_DOCS = NO
|
||||
SORT_BY_SCOPE_NAME = NO
|
||||
GENERATE_TODOLIST = YES
|
||||
GENERATE_TESTLIST = YES
|
||||
GENERATE_BUGLIST = YES
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
SHOW_USED_FILES = YES
|
||||
SHOW_DIRECTORIES = NO
|
||||
FILE_VERSION_FILTER =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
QUIET = NO
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_NO_PARAMDOC = NO
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_LOGFILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = ../include/ase
|
||||
FILE_PATTERNS = *.h \
|
||||
*.hxx \
|
||||
*.hpp \
|
||||
*.h++ \
|
||||
*.java
|
||||
RECURSIVE = YES
|
||||
EXCLUDE = ../net \
|
||||
../com \
|
||||
../stx \
|
||||
../test/awk \
|
||||
../test/net \
|
||||
../test/com \
|
||||
../test/stx
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS =
|
||||
EXAMPLE_PATH =
|
||||
EXAMPLE_PATTERNS = *
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
IMAGE_PATH = imgs
|
||||
INPUT_FILTER =
|
||||
FILTER_PATTERNS =
|
||||
FILTER_SOURCE_FILES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
SOURCE_BROWSER = YES
|
||||
INLINE_SOURCES = NO
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
REFERENCED_BY_RELATION = NO
|
||||
REFERENCES_RELATION = NO
|
||||
USE_HTAGS = NO
|
||||
VERBATIM_HEADERS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
ALPHABETICAL_INDEX = NO
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
IGNORE_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_HTML = YES
|
||||
HTML_OUTPUT = html
|
||||
HTML_FILE_EXTENSION = .html
|
||||
HTML_HEADER =
|
||||
HTML_FOOTER =
|
||||
HTML_STYLESHEET =
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
GENERATE_HTMLHELP = NO
|
||||
CHM_FILE =
|
||||
HHC_LOCATION =
|
||||
GENERATE_CHI = NO
|
||||
BINARY_TOC = NO
|
||||
TOC_EXPAND = NO
|
||||
DISABLE_INDEX = NO
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
GENERATE_TREEVIEW = NO
|
||||
TREEVIEW_WIDTH = 250
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_LATEX = NO
|
||||
LATEX_OUTPUT = latex
|
||||
LATEX_CMD_NAME = latex
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
COMPACT_LATEX = NO
|
||||
PAPER_TYPE = a4wide
|
||||
EXTRA_PACKAGES =
|
||||
LATEX_HEADER =
|
||||
PDF_HYPERLINKS = NO
|
||||
USE_PDFLATEX = NO
|
||||
LATEX_BATCHMODE = NO
|
||||
LATEX_HIDE_INDICES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_RTF = NO
|
||||
RTF_OUTPUT = rtf
|
||||
COMPACT_RTF = NO
|
||||
RTF_HYPERLINKS = NO
|
||||
RTF_STYLESHEET_FILE =
|
||||
RTF_EXTENSIONS_FILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_MAN = NO
|
||||
MAN_OUTPUT = man
|
||||
MAN_EXTENSION = .3
|
||||
MAN_LINKS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_XML = NO
|
||||
XML_OUTPUT = xml
|
||||
XML_SCHEMA =
|
||||
XML_DTD =
|
||||
XML_PROGRAMLISTING = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the Perl module output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_PERLMOD = NO
|
||||
PERLMOD_LATEX = NO
|
||||
PERLMOD_PRETTY = YES
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = NO
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED =
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE =
|
||||
ALLEXTERNALS = NO
|
||||
EXTERNAL_GROUPS = YES
|
||||
PERL_PATH = /usr/bin/perl
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
CLASS_DIAGRAMS = YES
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
HAVE_DOT = NO
|
||||
CLASS_GRAPH = YES
|
||||
COLLABORATION_GRAPH = YES
|
||||
GROUP_GRAPHS = YES
|
||||
UML_LOOK = NO
|
||||
TEMPLATE_RELATIONS = NO
|
||||
INCLUDE_GRAPH = YES
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
CALL_GRAPH = NO
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
DIRECTORY_GRAPH = YES
|
||||
DOT_IMAGE_FORMAT = png
|
||||
DOT_PATH =
|
||||
DOTFILE_DIRS =
|
||||
MAX_DOT_GRAPH_WIDTH = 1024
|
||||
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||
MAX_DOT_GRAPH_DEPTH = 1000
|
||||
DOT_TRANSPARENT = NO
|
||||
DOT_MULTI_TARGETS = NO
|
||||
GENERATE_LEGEND = YES
|
||||
DOT_CLEANUP = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
SEARCHENGINE = NO
|
15
qse/doc/en/ase-assert.man
Normal file
15
qse/doc/en/ase-assert.man
Normal file
@ -0,0 +1,15 @@
|
||||
.title assert
|
||||
|
||||
= Assertion ==
|
||||
|
||||
The library provides a couple of macros to replace the standard assert macro.
|
||||
ASE_ASSERT and ASE_ASSERTX
|
||||
|
||||
These macros requires linking with libaseutl.a unless you define ase_assert_puts yourself.
|
||||
|
||||
= ase_assert_puts =
|
||||
|
||||
You may define your own output function for assertion output.
|
||||
|
||||
Include: ase/cmn/macros.h
|
||||
Link: libaseutl.a
|
51
qse/doc/en/ase.man
Normal file
51
qse/doc/en/ase.man
Normal file
@ -0,0 +1,51 @@
|
||||
.title ASE
|
||||
|
||||
= ASE =
|
||||
|
||||
ASE is a programming library implementing various programming languages and text utilities for embedding purposes. The library is developed in the C programming language and provides the JNI binding to JAVA, the COM and .NET interface.
|
||||
|
||||
{{{
|
||||
_____ _____ _____
|
||||
/\ \ /\ \ /\ \
|
||||
/::\ \ /::\ \ /::\ \
|
||||
/::::\ \ /::::\ \ /::::\ \
|
||||
/::::::\ \ /::::::\ \ /::::::\ \
|
||||
/:::/\:::\ \ /:::/\:::\ \ /:::/\:::\ \
|
||||
/:::/__\:::\ \ /:::/__\:::\ \ /:::/__\:::\ \
|
||||
/::::\ \:::\ \ \:::\ \:::\ \ /::::\ \:::\ \
|
||||
/::::::\ \:::\ \ ___\:::\ \:::\ \ /::::::\ \:::\ \
|
||||
/:::/\:::\ \:::\ \ /\ \:::\ \:::\ \ /:::/\:::\ \:::\ \
|
||||
/:::/ \:::\ \:::\____\/::\ \:::\ \:::\____\/:::/__\:::\ \:::\____\
|
||||
\::/ \:::\ /:::/ /\:::\ \:::\ \::/ /\:::\ \:::\ \::/ /
|
||||
\/____/ \:::\/:::/ / \:::\ \:::\ \/____/ \:::\ \:::\ \/____/
|
||||
\::::::/ / \:::\ \:::\ \ \:::\ \:::\ \
|
||||
\::::/ / \:::\ \:::\____\ \:::\ \:::\____\
|
||||
/:::/ / \:::\ /:::/ / \:::\ \::/ /
|
||||
/:::/ / \:::\/:::/ / \:::\ \/____/
|
||||
/:::/ / \::::::/ / \:::\ \
|
||||
/:::/ / \::::/ / \:::\____\
|
||||
\::/ / \::/ / \::/ /
|
||||
\/____/ \/____/ \/____/
|
||||
|
||||
}}}
|
||||
|
||||
== Download ==
|
||||
|
||||
Download the library source code from the following links.
|
||||
|
||||
[[[
|
||||
* {Google Code,http://abiyo.googlecode.com/}
|
||||
]]]
|
||||
|
||||
== Documentation ==
|
||||
|
||||
[[[
|
||||
* {Quickstart,quickstart.html}
|
||||
* {AWK Embedder's guide,awk-embed.html}
|
||||
* {LISP Embedder's guide,lsp-embed.html}
|
||||
* {Frequently Asked Questions,faq.html}
|
||||
]]]
|
||||
|
||||
== Licensing ==
|
||||
|
||||
ASE is distributed under a {BSD license,license.html} and is free for all uses.
|
209
qse/doc/en/awk-embed.man
Normal file
209
qse/doc/en/awk-embed.man
Normal file
@ -0,0 +1,209 @@
|
||||
.title Embedding ASEAWK
|
||||
.tabstop 6
|
||||
|
||||
= ASEAWK =
|
||||
ASE provides an embeddable processor 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.
|
||||
|
||||
== Overview ==
|
||||
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.
|
||||
|
||||
The following code fragment illustrates the basic steps of embedding the processor.
|
||||
|
||||
{{{
|
||||
1) #include <ase/awk/awk.h>
|
||||
|
||||
2) ase_awk_t* awk;
|
||||
3) awk = ase_awk_open (...);
|
||||
4) if (ase_awk_parse (awk, ...) == -1)
|
||||
{
|
||||
/* parse error */
|
||||
}
|
||||
else
|
||||
{
|
||||
5) if (ase_awk_run (awk, ...) == -1)
|
||||
{
|
||||
/* run-time error */
|
||||
}
|
||||
}
|
||||
6) ase_awk_close (awk);
|
||||
}}}
|
||||
|
||||
(((
|
||||
* Most of the functions and data types needed are defined in the header file ##=ase/awk/awk.h=##.
|
||||
* ##=ase_awk_t=## represents the processor. However, the internal representation is not exposed.
|
||||
* ##=ase_awk_open=## creates the processor instance.
|
||||
* ##=ase_awk_parse=## parses an AWK script.
|
||||
* ##=ase_awk_run=## executes the script parsed.
|
||||
* ##=ase_awk_close=## destroys the processor instance.
|
||||
)))
|
||||
|
||||
More detailed description is available {here,awk-mini-en.html}. You may refer to other sample files such as ##=ase/test/awk/awk.c=## and ##=ase/awk/jni.c=##.
|
||||
|
||||
== Primitive Functions ==
|
||||
A set of primitive functions is needed to create an instance of the AWK processor. A primitive function is a user-defined function to help the library perform system-dependent operations such as memory allocation, character class handling.
|
||||
|
||||
{{{
|
||||
typedef struct ase_awk_prmfns_t ase_awk_prmfns_t;
|
||||
|
||||
struct ase_awk_prmfns_t
|
||||
{
|
||||
ase_mmgr_t mmgr;
|
||||
ase_ccls_t ccls;
|
||||
|
||||
struct
|
||||
{
|
||||
ase_awk_pow_t pow;
|
||||
ase_awk_sprintf_t sprintf;
|
||||
ase_awk_dprintf_t dprintf;
|
||||
void* custom_data;
|
||||
} misc;
|
||||
};
|
||||
}}}
|
||||
|
||||
A caller of ##=ase_awk_open=## should fill in most of the fields of a ##=ase_awk_prmfns_t=## structure and pass the structure to it. The function pointers in the miscellaneous group labeled [misc] is defined as follows:
|
||||
|
||||
{{{
|
||||
/* returns the value of x raised to the power of y */
|
||||
typedef ase_real_t (*ase_awk_pow_t) (void* custom, ase_real_t x, ase_real_t y);
|
||||
|
||||
/* similar to snprintf of the standard C library. */
|
||||
typedef int (*ase_awk_sprintf_t) (void* custom, ase_char_t* buf, ase_size_t size, const ase_char_t* fmt, ...);
|
||||
|
||||
/* similar to printf of the standard C library. called by a few uncommonly
|
||||
* used output functions usually for debugging purpose */
|
||||
typedef void (*ase_awk_dprintf_t) (void* custom, const ase_char_t* fmt, ...);
|
||||
}}}
|
||||
|
||||
The fourth field of the group is passed to its member functions as the first argument on invocation. The function pointed by the ##=sprintf=## field should ensure that the resuliting string is null-terminated and ##=%s=## and ##=%c=## are accepted for the ##=ase_char_t*=## and ##=ase_char_t=## type respectively regardless the character mode.
|
||||
|
||||
The memory manager group labeled [mmgr] and the character class group labled [ccls] are defined as follows:
|
||||
|
||||
{{{
|
||||
typedef void* (*ase_malloc_t) (void* custom, ase_size_t n);
|
||||
typedef void* (*ase_realloc_t) (void* custom, void* ptr, ase_size_t n);
|
||||
typedef void (*ase_free_t) (void* custom, void* ptr);
|
||||
|
||||
typedef ase_bool_t (*ase_isccls_t) (void* custom, ase_cint_t c);
|
||||
typedef ase_cint_t (*ase_toccls_t) (void* custom, ase_cint_t c);
|
||||
|
||||
struct ase_mmgr_t
|
||||
{
|
||||
ase_malloc_t malloc;
|
||||
ase_realloc_t realloc;
|
||||
ase_free_t free;
|
||||
void* custom_data;
|
||||
};
|
||||
|
||||
struct ase_ccls_t
|
||||
{
|
||||
ase_isccls_t is_upper;
|
||||
ase_isccls_t is_lower;
|
||||
ase_isccls_t is_alpha;
|
||||
ase_isccls_t is_digit;
|
||||
ase_isccls_t is_xdigit;
|
||||
ase_isccls_t is_alnum;
|
||||
ase_isccls_t is_space;
|
||||
ase_isccls_t is_print;
|
||||
ase_isccls_t is_graph;
|
||||
ase_isccls_t is_cntrl;
|
||||
ase_isccls_t is_punct;
|
||||
ase_toccls_t to_upper;
|
||||
ase_toccls_t to_lower;
|
||||
void* custom_data;
|
||||
};
|
||||
}}}
|
||||
|
||||
The functions in these groups perform the memory operations and character class related operations respectively. They follow the style of the memory allocation functions and character class handling functions of the standard C library except that they accept a pointer to the user-defined data as the first argument, thus providing more flexibility. The pointer to the user-defined data is specified into the ##=custom_data=## field of each group. The ##=realloc=## field, however, can be ##=ASE_NULL=##, in which case the functions pointed by the free and the malloc field replace the role of the function pointed by the ##=realloc=## field.
|
||||
|
||||
== Source IO Handler ==
|
||||
|
||||
The source code is handled by a source input handler provided by the user. The optional source code output handler can be provided to have the internal parse tree converted back to the source code.
|
||||
|
||||
The source code handler is defined as follows:
|
||||
|
||||
{{{
|
||||
typedef ase_ssize_t (*ase_awk_io_t) (int cmd, void* custom, ase_char_t* data, ase_size_t count);
|
||||
|
||||
typedef struct ase_awk_srcios_t ase_awk_srcios_t;
|
||||
|
||||
struct ase_awk_srcios_t
|
||||
{
|
||||
ase_awk_io_t in; /* source input */
|
||||
ase_awk_io_t out; /* source output */
|
||||
void* custom_data;
|
||||
};
|
||||
}}}
|
||||
|
||||
The ##=in=## field of the ase_awk_srcios_t is mandatory and should be filled in. The ##=out=## field can be set to ##=ASE_NULL=## or can point to a source output handling function. The ##=custom_data=## field is passed to the source handlers as the second argument. The first parameter ##=cmd=## of the source input handler is one of ##=ASE_AWK_IO_OPEN=##, ##=ASE_AWK_IO_CLOSE=##, ##=ASE_AWK_IO_READ=##. The first parameter ##=cmd=## of the source output handler is one of ##=ASE_AWK_IO_OPEN=##, ##=ASE_AWK_IO_CLOSE=##, ##=ASE_AWK_IO_WRITE=##. The third parameter ##=data=## and the fourth parameter ##=count=## are the pointer to the buffer to read data into and its size if the first parameter ##=cmd=## is ##=ASE_AWK_IO_READ=## while they are the pointer to the data and its size if ##=cmd=## is ##=ASE_AWK_IO_WRITE=##.
|
||||
|
||||
The source handler should return a negative value for an error and zero or a positive value otherwise. However, there is a subtle difference in the meaning of the return value depending on the value of the first parameter ##=cmd=##.
|
||||
|
||||
When ##=cmd=## is ##=ASE_AWK_IO_OPEN=##, the return value of -1 and 1 indicates the failure and the success respectively. In addition, the return value of 0 indicates that the operation is successful but has reached the end of the stream. The library calls the handler with ##=ASE_AWK_IO_CLOSE=## for deinitialization if the return value is 0 or 1. When ##=cmd=## is ##=ASE_AWK_IO_CLOSE=##, the return value of -1 and 0 indicate the failure and the success respectively. When ##=cmd=## is ##=ASE_AWK_IO_READ=## or ##=ASE_AWK_IO_WRITE=##, the return value of -1 indicates the failure, 0 the end of the stream, and other positive values the number of characters read or written.
|
||||
|
||||
The typical source handler will look as follows:
|
||||
{{{
|
||||
ase_ssize_t awk_srcio_in (int cmd, void* arg, ase_char_t* data, ase_size_t size)
|
||||
{
|
||||
if (cmd == ASE_AWK_IO_OPEN)
|
||||
{
|
||||
/* open the stream */
|
||||
return 1;
|
||||
}
|
||||
else if (cmd == ASE_AWK_IO_CLOSE)
|
||||
{
|
||||
/* close the stream */
|
||||
return 0;
|
||||
}
|
||||
else if (cmd == ASE_AWK_IO_READ)
|
||||
{
|
||||
/* read the stream */
|
||||
return the number of characters read;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
ase_ssize_t awk_srcio_out (int cmd, void* arg, ase_char_t* data, ase_size_t size)
|
||||
{
|
||||
if (cmd == ASE_AWK_IO_OPEN)
|
||||
{
|
||||
/* open the stream */
|
||||
return 1;
|
||||
}
|
||||
else if (cmd == ASE_AWK_IO_CLOSE)
|
||||
{
|
||||
/* close the stream after flushing it */
|
||||
return 0;
|
||||
}
|
||||
else if (cmd == ASE_AWK_IO_WRITE)
|
||||
{
|
||||
/* write the stream */
|
||||
return the number of characters written;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
}}}
|
||||
|
||||
Once you have the source handler ready, you can fill in the fields of a ##=ase_awk_srcios_t=## structure and pass it to the call of ##=ase_awk_parse=##.
|
||||
|
||||
{{{
|
||||
ase_awk_srcios_t srcios;
|
||||
|
||||
srcios.in = awk_srcio_in;
|
||||
srcios.out = awk_srcio_out;
|
||||
srcios.custom_data = point to the extra information necessary;
|
||||
|
||||
if (ase_awk_parse (awk, &srcios) == -1)
|
||||
{
|
||||
/* handle error */
|
||||
}
|
||||
}}}
|
||||
|
||||
== External IO Handler ==
|
||||
|
||||
External IO handlers should be provided to support the AWK's built-in IO facilities.
|
204
qse/doc/en/awk-lang.man
Normal file
204
qse/doc/en/awk-lang.man
Normal file
@ -0,0 +1,204 @@
|
||||
.title AWK Language
|
||||
.tabstop 6
|
||||
|
||||
Most of the AWK language features are supported. This documents shows notable language features that might be different from other implementations.
|
||||
|
||||
== Variable ==
|
||||
|
||||
A local variable and a global variable are supported if ASE_AWK_EXPLICIT is enabled. ASE_AWK_IMPLICIT is to enable a named variable. You may enable both options to support both types of variables. Either should be enabled for the language to be useful, however.
|
||||
|
||||
A local variable can be declared at the top of each block before any statements are encountered. A global variable can be declared in any places outside a function and a pattern-action block.
|
||||
|
||||
{{{
|
||||
global a, b;
|
||||
global c;
|
||||
|
||||
BEGIN {
|
||||
local x, y;
|
||||
a = 30; x = 30; x = a + 40; print x; }
|
||||
}
|
||||
}}}
|
||||
|
||||
{{|
|
||||
! Code
|
||||
! Description
|
||||
|-
|
||||
| function a() { }
|
||||
BEGIN { ##-a=20;-## }
|
||||
| A function and a named variable cannot have the same name. A named variable requires ASE_AWK_IMPLICIT to be enabled.
|
||||
|-
|
||||
| function a() { }
|
||||
|
||||
BEGIN {
|
||||
local a;
|
||||
a = 20;
|
||||
}
|
||||
| A local variable can shade the same function name. The deparsed output shows this.
|
||||
|
||||
function a ()
|
||||
{
|
||||
}
|
||||
BEGIN {
|
||||
local __l0;
|
||||
__l0 = 20;
|
||||
}
|
||||
|
||||
Local variable declaration requires ASE_AWK_EXPLICIT, though.
|
||||
|-
|
||||
| global a;
|
||||
function ##-a()-## { }
|
||||
|
||||
function a() { }
|
||||
global ##-a-##;
|
||||
| A function and a global variable cannot have the same name.
|
||||
|-
|
||||
| function fn () {
|
||||
x = 20;
|
||||
return x;
|
||||
}
|
||||
|
||||
global x;
|
||||
|
||||
BEGIN {
|
||||
x = 30;
|
||||
print fn ();
|
||||
print x;
|
||||
}
|
||||
|
||||
| A global variable is visible after it is declared to the remaining part of the program. x inside fn is x named variable while x in BEGIN is a global variable.
|
||||
|
||||
global __g17;
|
||||
function fn ()
|
||||
{
|
||||
x = 20;
|
||||
return x;
|
||||
}
|
||||
BEGIN {
|
||||
__g17 = 30;
|
||||
print fn ();
|
||||
print __g17;
|
||||
}
|
||||
|-
|
||||
| global x;
|
||||
BEGIN {
|
||||
x = 1;
|
||||
{
|
||||
local x;
|
||||
x = 2;
|
||||
{
|
||||
local x;
|
||||
x = 3;
|
||||
print x;
|
||||
}
|
||||
print x;
|
||||
}
|
||||
print x;
|
||||
}
|
||||
| A local variable can shade a global variable and a local variable at outer scope.
|
||||
|
||||
global __g17;
|
||||
|
||||
BEGIN {
|
||||
local __l0, __l1;
|
||||
__g17 = 1;
|
||||
{
|
||||
__l0 = 2;
|
||||
{
|
||||
__l1 = 3;
|
||||
print __l1;
|
||||
}
|
||||
print __l0;
|
||||
}
|
||||
print __g17;
|
||||
}
|
||||
|}}
|
||||
|
||||
|
||||
== Parameter ==
|
||||
|
||||
A parameter name can shade a enclosing function name. The following table shows the details.
|
||||
|
||||
{{|
|
||||
! Code
|
||||
! Description
|
||||
|-
|
||||
| function f(f) { print f; }
|
||||
| A parameter name can be the same as the enclosing function name.
|
||||
|-
|
||||
| function f(f) { ##-f("hello")-##; }
|
||||
| A resursive call to the function f is not possible as the third f is the parameter f.
|
||||
|-
|
||||
| function fn(f) {
|
||||
f = 20;
|
||||
}
|
||||
BEGIN {
|
||||
f = 50;
|
||||
fn(100);
|
||||
print f;
|
||||
}
|
||||
| 50 is printed. The parameter f in fn doesn't affect the named variable f in BEGIN. The deparsed output shows this clearly.
|
||||
|
||||
function fn (__p0)
|
||||
{
|
||||
__p0 = 20;
|
||||
}
|
||||
BEGIN {
|
||||
f = 50;
|
||||
fn (100);
|
||||
print f;
|
||||
}
|
||||
|}}
|
||||
|
||||
== Statement Terminator ==
|
||||
A statement must end with a semicolon. A new-line character is treated as whitespace. For this reason, no line continuator, a backslash, is supported.
|
||||
|
||||
{{{
|
||||
BEGIN { print "hello, world"; }
|
||||
}}}
|
||||
|
||||
|
||||
== Function ==
|
||||
A blank is allowed between a function name and a left parenthesis. The left bracket for function body doesn't have to be on the same line as the function name and parameters.
|
||||
|
||||
{{{
|
||||
function fn (x, y)
|
||||
{
|
||||
return x + y;
|
||||
}
|
||||
BEGIN { print fn (10, 20); }
|
||||
}}}
|
||||
|
||||
== Return ==
|
||||
A return statement is allowed in BEGIN and END.
|
||||
{{{
|
||||
END { return 20; }
|
||||
}}}
|
||||
|
||||
== Pattern-Action Block ==
|
||||
ASE_AWK_BLOCKLESS enables the use of a action-less pattern-action block. Turning it off changes the parser behaviour to treat a block not following any patterns, BEGIN, END.
|
||||
|
||||
{{{
|
||||
BEGIN
|
||||
{ print "hello"; }
|
||||
{ print "hello2"; }
|
||||
}}}
|
||||
|
||||
In the code snippet above, the first block is associated with BEGIN while the second block is a patternless pattern-action block that matches any lines of input. It is the same as the following.
|
||||
|
||||
{{{
|
||||
BEGIN {
|
||||
print "hello";
|
||||
}
|
||||
|
||||
{
|
||||
print "hello2";
|
||||
}
|
||||
}}}
|
||||
|
||||
== Shift Operators ==
|
||||
|
||||
Turning on ASE_AWK_SHIFT enables the use of the shift operator for bit shifting. >> and << are the right and the left shift operator respectively.
|
||||
|
||||
{{{
|
||||
BEGIN { print (0xFFFF >> 2); print 0x00FF << 2; }
|
||||
}}}
|
93
qse/doc/en/awk-ref.man
Normal file
93
qse/doc/en/awk-ref.man
Normal file
@ -0,0 +1,93 @@
|
||||
.title Introduction To ASE AWK
|
||||
|
||||
== OVERVIEW ==
|
||||
|
||||
=== What is it? ===
|
||||
'''''ASE AWK''''' is an embeddable implementation of the AWK programming language. It is composed of a set of C functions to help programmers embed the AWK interpreter to their own applications easily.
|
||||
|
||||
=== What does it do? ===
|
||||
'''''ASE AWK''''' can do most of the things that other existing AWK interpreters can do. <TODO:>
|
||||
|
||||
=== Differences with other implementations ===
|
||||
There exist a number of AWK interpreters available. Most of Unix/Linux operating systems come with an AWK interpreter. <TODO:>
|
||||
|
||||
== DESCRIPTION ==
|
||||
|
||||
=== Interpreter ===
|
||||
Multiple instances of interpreters can be created in a single application and each instance of the interpreter created maintains its own state in the data structure pointed at by its handle of the type ''ase_awk_t''.
|
||||
|
||||
* ase_awk_t - an abstract type to an interpreter object.
|
||||
* ase_awk_open - creates an interpreter object.
|
||||
* ase_awk_close - destroys the interprer object created by ase_awk_open.
|
||||
|
||||
{{{
|
||||
ase_awk_t* ase_awk_open (void);
|
||||
void ase_awk_close (ase_awk_t* awk);
|
||||
}}}
|
||||
|
||||
The interpreter provides two distinct functionalites in large; the parser and the executor. The parser transforms the source code into the internal parse tree and the executor evaluates the parse tree and runs the code.
|
||||
|
||||
{{{
|
||||
int ase_awk_parse (ase_awk_t* awk);
|
||||
int ase_awk_run (ase_awk_t* awk, ase_awk_io_t txtio, void* txtio_arg);
|
||||
}}}
|
||||
|
||||
=== IO Handlers ===
|
||||
'''''ASE AWK''''' does not provide any built-in IO handling routines. Instead, it requires users to provide them. 4 different IO streams should be provided to take full advantage of the interpreter.
|
||||
|
||||
* Source code input
|
||||
* Source code output
|
||||
* Data input
|
||||
* Data output
|
||||
|
||||
{{{
|
||||
enum
|
||||
{
|
||||
XP_AWK_INPUT_OPEN = 0,
|
||||
XP_AWK_INPUT_CLOSE = 1,
|
||||
XP_AWK_INPUT_NEXT = 2,
|
||||
XP_AWK_INPUT_DATA = 3,
|
||||
|
||||
XP_AWK_OUTPUT_OPEN = 4,
|
||||
XP_AWK_OUTPUT_CLOSE = 5,
|
||||
XP_AWK_OUTPUT_NEXT = 6,
|
||||
XP_AWK_OUTPUT_DATA = 7
|
||||
};
|
||||
|
||||
typedef ase_ssize_t (*ase_awk_io_t) (int cmd, void* arg, ase_char_t* data, ase_size_t count);
|
||||
}}}
|
||||
|
||||
=== Miscellaneous Functions ===
|
||||
'''''ASE AWK''''' provides extra utility routines as well as the interpreter. These routines used by the interpreter can be accessed from the interested applications directly without regard to the interpreter.
|
||||
|
||||
==== String ====
|
||||
|
||||
==== Conversion ====
|
||||
* ase_awk_strtolong - convert a numeric string to an integer of the ase_long_t type.
|
||||
* ase_awk_strtoreal - convert a numeric string to a decimal number of the ase_real_t type.
|
||||
|
||||
{{{
|
||||
ase_long_t ase_awk_strtolong (const ase_char_t* str, int base, const ase_char_t** endptr);
|
||||
ase_real_t ase_awk_strtoreal (const ase_char_t* str);
|
||||
}}}
|
||||
|
||||
==== Regular Expression ====
|
||||
The regular expression routines built into the interpreter can replace other regular expression libraries available. By utilizing this, the application can have the identical regular expression functionalities as the embedded AWK interpreter.
|
||||
|
||||
{{{
|
||||
ase_awk_rex_t* ase_awk_rex_open (ase_awk_rex_t* rex);
|
||||
void ase_awk_rex_close (ase_awk_rex_t* rex);
|
||||
}}}
|
||||
|
||||
=== User-defined Built-in Functions ===
|
||||
Custom built-in functions can be added to the interpreter. This requires the deeper look into the internals of the interpreter.
|
||||
|
||||
== EXAMPLE ==
|
||||
{{{
|
||||
#include <xp/awk/awk.h>
|
||||
|
||||
int ase_main ()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}}}
|
19
qse/doc/en/license.man
Normal file
19
qse/doc/en/license.man
Normal file
@ -0,0 +1,19 @@
|
||||
.title ASE License Agreement
|
||||
|
||||
Software License Agreement (BSD License)
|
||||
|
||||
Copyright (c) 2006-2007, Hyung-Hwan Chung
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
[[[
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the copyright owner nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
]]]
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
22
qse/doc/en/lsp-embed.man
Normal file
22
qse/doc/en/lsp-embed.man
Normal file
@ -0,0 +1,22 @@
|
||||
|
||||
= ASELSP =
|
||||
|
||||
ASELSP is an implementation of a lisp-like language for embedding purposes.
|
||||
|
||||
== Types ==
|
||||
|
||||
[[[
|
||||
* ase_lsp_t
|
||||
* ase_lsp_io_t
|
||||
* ase_lsp_obj_t
|
||||
]]]
|
||||
|
||||
== Functions ==
|
||||
|
||||
[[[
|
||||
* ase_lsp_open
|
||||
* ase_lsp_close
|
||||
* ase_lsp_read
|
||||
* ase_lsp_eval
|
||||
* ase_lsp_print
|
||||
]]]
|
177
qse/doc/en/quickstart.man
Normal file
177
qse/doc/en/quickstart.man
Normal file
@ -0,0 +1,177 @@
|
||||
.title ASE Quick Start Guide
|
||||
|
||||
= ASE Quick Start Guide =
|
||||
|
||||
The first step in using this library is to build it. This document shows how to build the core library on various operating systems.
|
||||
|
||||
== Source Code Directories ==
|
||||
|
||||
The source code is organized in the following directory structure.
|
||||
|
||||
{{{
|
||||
ase +- cmn .................... contains common functions and macros.
|
||||
+- utl .................... contains more general-purpose utillity
|
||||
| functions and macros.
|
||||
+- awk .................... implementation of the awk processor.
|
||||
+- lsp .................... implementation of the lisp processor.
|
||||
+- com .................... COM wrapper of the processors.
|
||||
+- cmd +- awk ............. contains test programs for the awk processor.
|
||||
+- lsp ............. contains test programs for the lisp processor.
|
||||
+- com ............. contains test programs for the COM module.
|
||||
}}}
|
||||
|
||||
== Unix/Linux ==
|
||||
|
||||
You may run the [[configure]] script on most of the supported operation systems to set up the build environment and then run the [[make]] utility.
|
||||
|
||||
{{{
|
||||
$ ./configure
|
||||
$ make
|
||||
}}}
|
||||
|
||||
The [[make]] utility visits each module subdirectory and build binary files. The library files are placed in the [[release/lib]] directory and the executable files in the [[release/bin]] directory.
|
||||
|
||||
If you appened the option [[--enable-debug]] to the [[configure]] script, the files would be located in [[debug/lib]] and [[debug/bin]] directory. Besides, it sets up the environment to be more debugging friendly.
|
||||
|
||||
{{{
|
||||
$ ./configure --enable-debug
|
||||
$ make
|
||||
}}}
|
||||
|
||||
The following table shows the output locations of generated files.
|
||||
|
||||
{{|
|
||||
! Mode
|
||||
! Executable Files
|
||||
! Library Files
|
||||
! Include Files
|
||||
|-
|
||||
| release
|
||||
| ${ase}/release/bin
|
||||
| ${ase}/release/lib
|
||||
| ${ase}/release/inc
|
||||
|-
|
||||
| debug
|
||||
| ${ase)/debug/bin
|
||||
| $(ase)/debug/lib
|
||||
| ${ase}/debug/inc
|
||||
|}}
|
||||
|
||||
* ${ase} - the top level directory
|
||||
|
||||
If you have preference for a particular compiler and the flags, you may explicitly specify them when you run the [[configure]] script. Here are presented a few such examples.
|
||||
|
||||
{{|
|
||||
!
|
||||
! 32 Bits
|
||||
! 64 Bits
|
||||
|-
|
||||
| HP-UX B.11.23 (PA-RISC)
|
||||
| ./configure -build=hppa-hp-hpux
|
||||
| ./configure -build=hppa64-hp-hpux
|
||||
| HP-UX B.11.23 (IA64)
|
||||
| ./configure -build=ia64-hp-hpux
|
||||
| ./configure -build=ia64-hp-hpux
|
||||
|}}
|
||||
|
||||
{{|
|
||||
!
|
||||
! 32 Bits
|
||||
! 64 Bits
|
||||
|-
|
||||
| HP-UX B.11.23
|
||||
| CC=cc CFLAGS="-O2 +DD32" LDFLAGS="+DD32" CXX=aCC CXXFLAGS="-O2 +DD32" ./configure
|
||||
| CC=cc CFLAGS="-O2 +DD64" LDFLAGS="+DD64" CXX=aCC CXXFLAGS="-O2 +DD64" ./configure
|
||||
|-
|
||||
| SCO OpenServer 5.0.7
|
||||
| CC=cc CFLAGS="-Xc -a ansi -O2" ./configure
|
||||
|
|
||||
|-
|
||||
| Solaris 10
|
||||
| CC=gcc CFLAGS="-Wall -O2" CXX=g++ CXXFLAGS="-Wall -O2" ./configure
|
||||
| CC=gcc CFLAGS="-Wall -O2 -m64" CXX=g++ CXXFLAGS="-Wall -O2 -m64" LDFLAGS="-m64" ./configure
|
||||
|-
|
||||
| OpenWRT mipsel
|
||||
| CC=mipsel-linux-uclibc-gcc CXX=mipsel-linux-uclibc-g++ LD=mipsel-linux-uclibc-ld ./configure --host=mips --disable-wchar
|
||||
|
|
||||
|-
|
||||
| CellSDK 3.0
|
||||
| CC=ppu-gcc CXX=ppu-g++ RANLIB=ppu-ranlib AR=ppu-ar CFLAGS="-m64 -mabi=altivec -maltivec" CXXFLAGS="-m64 -mabi=altivec -maltivec" ./configure --host=ppc64
|
||||
| CC=spu-gcc CXX=spu-g++ RANLIB=spu-ranlib AR=spu-ar ./configure --host=ppc
|
||||
|}}
|
||||
|
||||
The JNI library for JAVA is built automatically if required JNI header files are detected by the [[configure]] script. Make sure that the [[javac]] command is included in the [[PATH]] environment variable. The JAVA class files are built with the [[javac]] command detected as well. The {ant,http://ant.apache.org} utility from the Apache Software Foundataion can be used to build the java class files. The [[build.xml]] file is provided at the top-level directory.
|
||||
|
||||
== OpenVMS ==
|
||||
|
||||
You may use the [[mms]] command or the [[mmk]] command to build the library. No counterpart for the [[configure]] script is provided. As no top-level build script is provided, you have to run the command in each directory that you want to build the library in.
|
||||
|
||||
Let's build the AWK library and its test program, for instance.
|
||||
|
||||
{{{
|
||||
set default [.ase.cmn]
|
||||
mms
|
||||
set default [-.awk]
|
||||
mms
|
||||
set default [-.utl]
|
||||
mms
|
||||
set default [-.test.awk]
|
||||
mms
|
||||
}}}
|
||||
|
||||
For those who are not familar with OpenVMS, here is one of the ways how to run the test program.
|
||||
|
||||
{{{
|
||||
; define the foreign command.
|
||||
aseawk :== $DISK$GEIN_SYS:[USERS.BACON.ASE.TEST.AWK]aseawk.exe
|
||||
; run the command.
|
||||
aseawk -f hello.awk
|
||||
}}}
|
||||
|
||||
== MS-Windows ==
|
||||
|
||||
You may use the Visual Studio 6 or later to open the project. But you need Visual Studio 2003 or later to build the .NET related projects. Otherwise, open the command-line build environment and use the [[make]] utility.
|
||||
|
||||
A set of make scripts is provided to support the Microsoft build environement and the Borland build environment. The script for the Miscrosoft build environment is named [[msw-cl.mak]] while it is [[msw-bcc.mak]] for the Borland counterpart.
|
||||
|
||||
If you are building the AWK library and the test program, this is probably what you have to do.
|
||||
|
||||
{{{
|
||||
cd ase\cmn
|
||||
nmake /f msw-cl.mak
|
||||
cd ..\awk
|
||||
nmake /f msw-cl.mak
|
||||
cd ..\utl
|
||||
nmake /f msw-cl.mak
|
||||
cd ..\test\awk
|
||||
nmake /f msw-cl.mak
|
||||
}}}
|
||||
|
||||
However, The COM module can only be built within the Visual Studio environment. After having built the COM module, you may open [[ase/test/com/asecom.vbp]] for testing.
|
||||
|
||||
|
||||
== Extra Features ==
|
||||
|
||||
unicode
|
||||
keyword replacement
|
||||
error string customization
|
||||
|
||||
== Languages ==
|
||||
|
||||
{{|
|
||||
! Language
|
||||
! Status
|
||||
! Bindings
|
||||
|-
|
||||
| AWK
|
||||
| Beta-1
|
||||
| C,C++,Java,.Net
|
||||
|-
|
||||
| LISP
|
||||
| Experimental
|
||||
| C
|
||||
|-
|
||||
| Javascript
|
||||
| Planned
|
||||
| C
|
||||
|}}
|
BIN
qse/doc/imgs/awk-srcio-read.dia
Normal file
BIN
qse/doc/imgs/awk-srcio-read.dia
Normal file
Binary file not shown.
BIN
qse/doc/imgs/awk-srcio-read.png
Normal file
BIN
qse/doc/imgs/awk-srcio-read.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
BIN
qse/doc/imgs/awk-srcio-write.dia
Normal file
BIN
qse/doc/imgs/awk-srcio-write.dia
Normal file
Binary file not shown.
BIN
qse/doc/imgs/awk-srcio-write.png
Normal file
BIN
qse/doc/imgs/awk-srcio-write.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
27
qse/doc/ko/ase.man
Normal file
27
qse/doc/ko/ase.man
Normal file
@ -0,0 +1,27 @@
|
||||
.title ASE
|
||||
|
||||
= ASE =
|
||||
|
||||
ASE는 임베딩을 목적으로 여러가지 프로그래밍언어를 구현하는 라이브러리이다. C언어로 개발되며 자바 JNI인터페이스와 COM 및 .NET 인터페이스를 제공한다.
|
||||
|
||||
(경고: 본 페이지는 정식 배포전에 시험용으로 제작된것이므로, 언제든지 내용이 변경될 수 있다.)
|
||||
|
||||
== Download ==
|
||||
|
||||
다음 링크에서 소스코드를 받을수 있다.
|
||||
|
||||
[[[
|
||||
* {Google Code,http://abiyo.googlecode.com/}
|
||||
]]]
|
||||
|
||||
== Documentation ==
|
||||
|
||||
[[[
|
||||
* {초간단가이드,quickstart.html}
|
||||
* {사용자가이드,awk.html}
|
||||
* {자주받는질문,faq.html}
|
||||
]]]
|
||||
|
||||
== Licensing ==
|
||||
|
||||
ASE는 {BSD 라이센스,license.html}하에 무료로 배포된다.
|
19
qse/doc/ko/license.man
Normal file
19
qse/doc/ko/license.man
Normal file
@ -0,0 +1,19 @@
|
||||
.title ASE License Agreement
|
||||
|
||||
Software License Agreement (BSD License)
|
||||
|
||||
Copyright (c) 2006-2007, Hyung-Hwan Chung
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
[[[
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the copyright owner nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
]]]
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNER AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
116
qse/doc/ko/quickstart.man
Normal file
116
qse/doc/ko/quickstart.man
Normal file
@ -0,0 +1,116 @@
|
||||
.title ASE 시작하기
|
||||
|
||||
= ASE 시작하기 =
|
||||
|
||||
본 문서는 ASE를 사용하기위해서 필요한 정보를 제공한다.
|
||||
|
||||
== 소스코드 디렉토리 ==
|
||||
|
||||
소스코드는 다음과 같은 디렉토리로 구성된다.
|
||||
|
||||
{{{
|
||||
ase +- cmn .................... 공통 함수와 매크로를 포함한다.
|
||||
+- utl .................... 보다 일반적인 공통 함수와 매크로를 포함한다.
|
||||
+- awk .................... AWK 처리기
|
||||
+- lsp .................... LISP 처리기
|
||||
+- com .................... 각 처리기들의 COM 래퍼모듈
|
||||
+- test +- awk ............ AWK 처리기 시험 프로그램
|
||||
+- lsp ............ LISP 처리기 시험 프로그램
|
||||
+- com ............ COM 래퍼모듈 시험 프로그램
|
||||
}}}
|
||||
|
||||
== 빌드 ==
|
||||
|
||||
각종 운영체제에서 어떻게 ASE를 빌드하는지 보여준다.
|
||||
|
||||
=== Unix/Linux ===
|
||||
|
||||
[[configure]]스크립트를 실행한후 [[make]]프로그램을 실행한다.
|
||||
|
||||
{{{
|
||||
$ ./configure
|
||||
$ make
|
||||
}}}
|
||||
[[configure]]스크립트는 해당 시스템의 정보를 수집하여 빌드환경을 설정하고 [[make]]는 각각의 서브다이렉트리를 방문해서 바이너리 파일을 만든다. 라이브러리 파일을 [[release/lib]]에, 실행파일들읜 [[release/bin]]에 만들어 진다.
|
||||
|
||||
[[--enable-debug]]를 [[configure]]에 사용한 경우에는, 빌드환경이 디버깅에 적합하도록 만들어진다. [[make]]를 실행하면 결과 파일들은 [[debug/lib]]와 [[debug/bin]]에 만들어 진다.
|
||||
|
||||
{{{
|
||||
$ ./configure --enable-debug
|
||||
$ make
|
||||
}}}
|
||||
|
||||
다음의 표는 빌드환경별로 파일이 만들어지는 위치를 보여준다.
|
||||
|
||||
{{{
|
||||
---------------------------------------------------------------------------
|
||||
모드 실행파일 라이브러리파일 헤더파일
|
||||
---------------------------------------------------------------------------
|
||||
release ${top}/release/bin ${top}/release/lib ${top}/release/inc
|
||||
debug ${top)/debug/bin $(top)/debug/lib ${top}/debug/inc
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
* ${top} - 최상위 디렉토리
|
||||
}}}
|
||||
|
||||
특정한 컴파일러와 컴파일러 옵션을 사용하고 싶을때는 [[configure]]를 실행할때 이를 명시해야 한다. 다음의 예들을 보라.
|
||||
|
||||
{{{
|
||||
# HP-UX B.11.23 with HP ANSI C
|
||||
CC=cc CFLAGS="-O2 +DD64" LDFLAGS="+DD64" ./configure # 64-bit
|
||||
CC=cc CFLAGS="-O2 +DD32" LDFLAGS="+DD32" ./configure # 32-bit
|
||||
|
||||
# SCO OpenServer Release 5.0.7 (SCO_SV 3.2 5.0.7) with SCO OpenServer Development System
|
||||
CC=cc CFLAGS="-Xc -a ansi -O2" ./configure
|
||||
|
||||
# Solaris 10 with GCC
|
||||
CC=gcc CFLAGS="-Wall -O2 -m64" LDFLAGS="-m64" ./configure # 64-bit
|
||||
CC=gcc CFLAGS="-Wall -O2" ./configure # 32-bit
|
||||
}}}
|
||||
|
||||
C++컴파일러와 옵션은 [[CXX]]와 [[CXXFLAGS]]을 사용해서 명시하면 된다.
|
||||
|
||||
JNI헤더파일을 찾을수 있으면 [[configure]]는 JNI라이브러리와 클래스파일들이 만들어 질수 있도록 빌드환경을 설정한다. 이를 위해서 [[javac]]명령어를 [[PATH]]환경변수에 설정된 경로에서 찿고, 이 정보를 이용해서 JNI헤더파일을 찾아낸다. 아파치재단의 {ant,http://ant.apache.org}를 이용하여 자바클래스파일들을 만들수도 있다. 이를 위해서 [[build.xml]]파일이 최상위 디렉토리에 제공된다.
|
||||
|
||||
=== OpenVMS ===
|
||||
|
||||
OpenVMS에서는 [[mms]]나 [[mmk]]명령어를 사용해야 한다. 다만 [[configure]]같은 환경설정 스크립트가 제공되지 않으므로, 필요한 경우 [[descrip.mms]]파일을 직접 편집해야 한다.
|
||||
|
||||
예를 들어, awk라이브러리와 시험프로그램을 만들려면 필요한 서브디렉토리에서 [[mms]]나 [[mmk]]를 실행하면 된다.
|
||||
|
||||
{{{
|
||||
set default [.ase.cmn]
|
||||
mms
|
||||
set default [-.awk]
|
||||
mms
|
||||
set default [-.utl]
|
||||
mms
|
||||
set default [-.test.awk]
|
||||
mms
|
||||
}}}
|
||||
|
||||
OpenVMS에 익숙하지 않은 사용자라면 다음의 방법으로 만들어진 시험프로그램을 실행해볼수 있다.
|
||||
|
||||
{{{
|
||||
; define the foreign command.
|
||||
aseawk :== $DISK$GEIN_SYS:[USERS.BACON.ASE.TEST.AWK]aseawk.exe
|
||||
; run the command.
|
||||
aseawk -f hello.awk
|
||||
}}}
|
||||
|
||||
=== MS-Windows ===
|
||||
|
||||
윈도우즈에서는 비쥬얼스튜디오6이나 그 이후 버전이 필요하다. 닷넷관련 프로젝트를 빌드하려면 비쥬얼슈트디오2003이나 그 이후 버전이 필요하다.
|
||||
|
||||
== 바이너리파일 ==
|
||||
|
||||
빌드에 성공하면 다음과 같은 파일들이 만들어 진다.
|
||||
|
||||
{{{
|
||||
lib +- libaseawk.a
|
||||
+- libaselsp.a
|
||||
+- libasecmn.a
|
||||
+- libaseutl.a
|
||||
|
||||
bin
|
||||
}}}
|
42
qse/doc/robodoc.rc
Normal file
42
qse/doc/robodoc.rc
Normal file
@ -0,0 +1,42 @@
|
||||
items:
|
||||
NAME
|
||||
SYNOPSIS
|
||||
DESCRIPTION
|
||||
INPUT
|
||||
INPUTS
|
||||
OUTPUT
|
||||
OUTPUTS
|
||||
RETURN
|
||||
EXAMPLE
|
||||
EXAMPLES
|
||||
NOTES
|
||||
BUGS
|
||||
SEE ALSO
|
||||
source items:
|
||||
SYNOPSIS
|
||||
item order:
|
||||
NAME
|
||||
SYNOPSIS
|
||||
DESCRIPTION
|
||||
INPUT
|
||||
INTPUTS
|
||||
OUTPUT
|
||||
OUTPUTS
|
||||
RETURN
|
||||
EXAMPLE
|
||||
EXAMPLES
|
||||
NOTES
|
||||
BUGS
|
||||
SEE ALSO
|
||||
remark begin markers:
|
||||
/*
|
||||
remark end markers:
|
||||
*/
|
||||
ignore files:
|
||||
.svn
|
||||
headertypes:
|
||||
o "Overview" robo_overview 0
|
||||
b "Callbacks" robo_callbacks 1
|
||||
options:
|
||||
--nosort
|
||||
--cmode
|
Reference in New Issue
Block a user