Extended regular expression matching and search library,
このソースコードを見ています。
構文解析ルーチンのような感じがしますが、
そう理解してよいのでしょうか?
また、
LL(1)文法でかかれたものを
コンパイラコンパイラ(構文解析作成ソフト)
にかけたら、
これと同じような働きをするものを作れますか?
もし可能なら、
参考になるサイト、文献などを教えてください。
LGPLライセンスで困っています。
これにつかまりたくないのです。
よろしくお願いします。
No.2ベストアンサー
- 回答日時:
とりあえず、以下の二つのライブラリは(修正)BSDライセンスで配布されています。
Oniguruma ---- (C) K.Kosako
http://www.geocities.jp/kosako3/oniguruma/
License
When this software is partly used or it is distributed with Ruby,
this of Ruby follows the license of Ruby.
It follows the BSD license in the case of the one except for it.
PCRE LICENCE
------------
PCRE is a library of functions to support regular expressions whose syntax
and semantics are as close as possible to those of the Perl 5 language.
The latest release of PCRE is always available from
ftp://ftp.csx.cam.ac.uk/pub/software/programming …
Release 7 of PCRE is distributed under the terms of the "BSD" licence, as
specified below. The documentation for PCRE, supplied in the "doc"
directory, is distributed under the same terms as the software itself.
ただし関数のインターフェースに多少違う部分がありますので、差し替えるだけで
無修正でというわけにはいかないでしょう。
自前で作ってみたいという話なら…なにかあったかな?
ありがとうございました。
GPL
と
LGPL
では
だいぶ影響がちがうので
マニュアルにLGPLのファイルを
記述することにしました。
なんとなく2つを区別しないで考えていました。
No.1
- 回答日時:
> 構文解析ルーチンのような感じがしますが、そう理解してよいのでしょうか?
Regular expression がどういったものなのかわかっていますか?
質問の内容が支離滅裂で、要するに何がしたいのかがわかりません。
LL文法とかいう単語が出てくるところをみると、プログラミング言語の構文解析をしたいのですか?
Regular expression を扱うためにコンパイラコンパイラは
あまり使わないんじゃないですかねえ。
わたしの記憶にはそういう例はありません。
> 参考になるサイト、文献などを教えてください。
Dragon Book.
http://www.amazon.co.jp/dp/0321486811
この回答への補足
/* Extended regular expression matching and search library,
* version 0.12.
* (Implements POSIX draft P1003.2/D11.2, except for some of the
* internationalization features.)
*
* Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
*
* This file is part of the GNU C Library. Its master source is NOT part of
* the C library, however. The master source lives in /gd/gnu/lib.
*
* The GNU C Library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* The GNU C Library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU C Library; see the file COPYING.LIB. If not,
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modifications:
*
* Use _regex.h instead of regex.h. tlr, 1999-01-06
* Make REGEX_MALLOC depend on HAVE_ALLOCA &c.
* tlr, 1999-02-14
* Don't switch on regex debugging when debugging mutt.
* tlr, 1999-02-25
*/
/* The following doesn't mix too well with autoconfiguring
* the use of alloca. So let's disable it for AIX.
*/
#include "stdafx.h"
#if 0
/* AIX requires this to be the first thing in the file. */
# if defined (_AIX) && !defined (REGEX_MALLOC)
# pragma alloca
# endif
#endif
#undef_GNU_SOURCE
#define _GNU_SOURCE
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#undef DEBUG
#if (defined(HAVE_ALLOCA_H) && !defined(_AIX))
# include <alloca.h>
#endif
以下省略
上のようなソースコードが必要なのですが、
このままでは使えないので(LGPLのため)、
同じ働きをするソースコードを自分で作りたいのです。
正規表現が、BNF文法と同じに見えたので
構文解析ルーチンを作るのをまねれば
上のソースコードと同じ働きをする
物が作れるかなと思ったのです。
わかりづらくて
迷惑をおかけいたしました。
よろしくご指導ください。
お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!
似たような質問が見つかりました
- 英語 この英文は分詞構文ですか? 4 2022/08/31 13:46
- 英語 【 英語 ing and ing 】 問題を解いていたら、 I told her shut up b 4 2022/12/28 16:33
- MySQL PhpMyAdminで作成して実行せよ。 東京23区を、皇居を中心とした4つのエリア(南東, 南西, 1 2023/06/11 11:58
- 英語 分詞構文の意味上の主語と、主節の主語とが一致していない用例 2 2022/11/13 19:05
- 英語 提示表現の構造について 2 2022/12/01 10:40
- 英語 There is evidence in the literature that the peri- 3 2022/06/08 07:57
- 英語 Method: A systematic literature search comprised t 3 2022/12/29 21:03
- 英語 英文法の使役構文について質問です。 I know you have got another book 1 2023/02/03 22:07
- 英語 Outcomes were evaluated including survival rate an 3 2022/04/14 14:16
- 英語 Method: A systematic literature search comprised t 7 2022/12/30 04:09
関連するカテゴリからQ&Aを探す
おすすめ情報
デイリーランキングこのカテゴリの人気デイリーQ&Aランキング
-
UNIX上のプログラムで使うライ...
-
CygwinでOpenGLのプログラム中に…
-
コンパイル時のエラー
-
vectorで自分のアプリを配布す...
-
汎用機とUNIXの違いについて
-
共有ライブリの作成。-fPICオプ...
-
.NET(C#)でのスタックオーバー...
-
DXライブラリの画像の表示の仕...
-
マーキングができる地図ソフト...
-
GPLライセンスのライブラリを利...
-
WindowsXPにApache OpenOffice...
-
商用ホームページでのjQuery等...
-
GPLライセンスの再配布時の著作...
-
【プロプライエタリライセンス...
-
ffmpeg.exeの配布について
-
p-nand-q.comのSorted!のソフト...
-
R言語ユーザーに質問です! 統...
-
AGPLv3の商用利用について
-
商用利用のライセンスについて
-
Acrobat SDK 5.0か、それに代わ...
マンスリーランキングこのカテゴリの人気マンスリーQ&Aランキング
-
UNIX上のプログラムで使うライ...
-
.NET(C#)でのスタックオーバー...
-
拡張子.niiのファイルの開き方...
-
Excel VBA のstr()関数でエラー
-
DXライブラリの画像の表示の仕...
-
PHPとMYSQLでトーナメント表作成
-
MakefileのLDLIBSとLOADLIBESの...
-
Googlemapのように画像を拡大・...
-
ファイルの圧縮/解凍(Zlib)に...
-
QRコード作成ライブラリ
-
OSX写真アプリへの複数のライブ...
-
【C#】PDFの作成や編集について
-
dxライブラリで作ったpcゲーム...
-
ライブラリParamQuery gridにつ...
-
PDFファイルの文字を取得するプ...
-
オブジェクトライブラリ
-
DxライブラリをVisualstudioを...
-
DLLについて。
-
AGPLとGPLのDLLを同時使用できるか
-
コンパイル時のエラー
おすすめ情報