Re: parser using perl

2008-03-31 Thread Chas. Owens
On Mon, Mar 31, 2008 at 2:43 PM, Rob Dixon <[EMAIL PROTECTED]> wrote: > Chas. Owens wrote: > > > > In general, it doesn't matter if you want to work with a small piece > > of a language or the whole language, you still need to implement a > > parser for the whole language. You can get an eighty

Re: parser using perl

2008-03-31 Thread Rob Dixon
Chas. Owens wrote: > > In general, it doesn't matter if you want to work with a small piece > of a language or the whole language, you still need to implement a > parser for the whole language. You can get an eighty or ninety > percent solution without a full parser, but there will always be > pro

Re: parser using perl

2008-03-31 Thread Randal L. Schwartz
> ""Chas" == "Chas Owens" <[EMAIL PROTECTED]> writes: "Chas> Take a look at Parse::RecDescent*. Also, look at Parse::Marpa if you have Perl 5.10 (requires 5.10), which not only parses text like P::RD, but can also tell you if there are *multiple* *ambiguous* parsings, rather efficiently. Ver

Re: parser using perl

2008-03-31 Thread Chas. Owens
On Mon, Mar 31, 2008 at 11:05 AM, Sharan Basappa <[EMAIL PROTECTED]> wrote: > true, I have the grammar in the form of BNF. But I am not interested > in converting > the BNF to parser rules, when I know that these productions are not > useful to me. > I am planning to write 8-10 rules and rules

Re: parser using perl

2008-03-31 Thread Sharan Basappa
true, I have the grammar in the form of BNF. But I am not interested in converting the BNF to parser rules, when I know that these productions are not useful to me. I am planning to write 8-10 rules and rules for pertaining tokens only. Of course, I might have to write additional rules to catch com

Re: parser using perl

2008-03-31 Thread Chas. Owens
On Mon, Mar 31, 2008 at 10:51 AM, Sharan Basappa <[EMAIL PROTECTED]> wrote: > I am not a compler expert, but if I all I am interested in few > productions out of > many productions, I can setup by scanner to generate tokens pertaining to > interesting productions and ignore the rest. As I said,

Re: parser using perl

2008-03-31 Thread Sharan Basappa
I am not a compler expert, but if I all I am interested in few productions out of many productions, I can setup by scanner to generate tokens pertaining to interesting productions and ignore the rest. As I said, I am not a compiler expert. So, I could be understating the problem .. I will have a l

Re: parser using perl

2008-03-31 Thread Chas. Owens
On Mon, Mar 31, 2008 at 10:36 AM, Sharan Basappa <[EMAIL PROTECTED]> wrote: > Hi, > > I am trying to extract information from a file that follows the syntax > of a high level language (something like C++) > The script just needs to understand a very minuscule portion of this > language to do th

parser using perl

2008-03-31 Thread Sharan Basappa
Hi, I am trying to extract information from a file that follows the syntax of a high level language (something like C++) The script just needs to understand a very minuscule portion of this language to do this. It does not have to know the complete high level language. I just wanted to know any mo

Re: write a parser using perl

2003-01-25 Thread John W. Krahn
Tao Wang wrote: > > Hi everyone, Hello, > I'm new to Perl. Does anyone have experence with > writting parser by perl? Any places i can find some > examples? thanks a lot. http://search.cpan.org/search?query=parse&mode=module John -- use Perl; program fulfillment -- To unsubscribe, e-m

Re: write a parser using perl

2003-01-25 Thread Johnathan Kupferer
You'll want to look at: perldoc -f pack perldoc -f unpack if you're working with fields of pre-determined lengths and the database files aren't delimited. Perhaps if you could post an example we could give you better advice. - Johnathan Wiggins d'Anconia wrote: tao wang wrote: thanks.

Re: write a parser using perl

2003-01-25 Thread Wiggins d'Anconia
tao wang wrote: thanks. I need parse a text file, which is like a text database file, but not very structured. many thanks. In that case you will need to decide what the "structure" is, and what you can guarantee. A normal text database is going to be parsed in the following general manne

Re: write a parser using perl

2003-01-25 Thread tao wang
thanks. I need parse a text file, which is like a text database file, but not very structured. many thanks. --- Wiggins d'Anconia <[EMAIL PROTECTED]> wrote: > tao wang wrote: > > Hi everyone, > > > > I'm new to Perl. Does anyone have experence > with > > writting parser by perl? Any places i

Re: write a parser using perl

2003-01-25 Thread Wiggins d'Anconia
tao wang wrote: Hi everyone, I'm new to Perl. Does anyone have experence with writting parser by perl? Any places i can find some examples? thanks a lot. Parser of what? XML, HTML, ID3 tags, Mail messages, etc.? Check CPAN (http://search.cpan.org) first because if more than two people c

write a parser using perl

2003-01-25 Thread tao wang
Hi everyone, I'm new to Perl. Does anyone have experence with writting parser by perl? Any places i can find some examples? thanks a lot. - tao __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -