This commit is contained in:
hyung-hwan 2007-12-24 01:21:37 +00:00
parent c8140861a0
commit d9cde55a41
8 changed files with 38 additions and 442 deletions

View File

@ -1,28 +0,0 @@
.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.
(Warning: This page is only for the test purpose prior to proper release and the contents can be changed anytime without prior notice.)
== Download ==
Download the library source code from the following links.
[[[
* {KLDP.NET,http://kldp.net/frs/?group_id=1050}
]]]
== Documentation ==
[[[
* {Quickstart,quickstart-en.html}
* {AWK Embedder's guide,awk-en.html}
* {LISP Embedder's guide,lsp-en.html}
* {Frequently Asked Questions,faq-en.html}
]]]
== Licensing ==
ASE is distributed under a {BSD license,license.html} and is free for all uses.

View File

@ -1,27 +0,0 @@
.title ASE
= ASE =
ASE는 임베딩을 목적으로 여러가지 프로그래밍언어를 구현하는 라이브러리이다. C언어로 개발되며 자바 JNI인터페이스와 COM 및 .NET 인터페이스를 제공한다.
(경고: 본 페이지는 정식 배포전에 시험용으로 제작된것이므로, 언제든지 내용이 변경될 수 있다.)
== Download ==
다음 링크에서 소스코드를 받을수 있다.
[[[
* {KLDP.NET,http://kldp.net/frs/?group_id=1050}
]]]
== Documentation ==
[[[
* {초간단가이드,quickstart-ko.html}
* {사용자가이드,awk-en.html}
* {자주받는질문,faq-ko.html}
]]]
== Licensing ==
ASE는 {BSD 라이센스,license.html}하에 무료로 배포된다.

View File

@ -1,93 +0,0 @@
.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
ase/doc/en/license.man Normal file
View 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.

19
ase/doc/ko/license.man Normal file
View 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.

View File

@ -1,22 +0,0 @@
= 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
]]]

View File

@ -1,156 +0,0 @@
.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.
+- test +- awk ............ contains test program 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
| CC=cc CFLAGS="-O2 +DD32 -D_INCLUDE__STDC_A1_SOURCE" LDFLAGS="+DD32" CXX=aCC CXXFLAGS="-O2 +DD32 -D_INCLUDE__STDC_A1_SOURCE" ./configure
| CC=cc CFLAGS="-O2 +DD64 -D_INCLUDE__STDC_A1_SOURCE" LDFLAGS="+DD64" CXX=aCC CXXFLAGS="-O2 +DD64 -D_INCLUDE__STDC_A1_SOURCE" ./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
|}}
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
|}}

View File

@ -1,116 +0,0 @@
.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
}}}