Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

nisc wwwxxx, wwwxxx0cm, should producers of software-based services, such as atms, be held liable for economic injuries suffered when their systems fail?, wwwxxx0cm, www.webdp.net, Event 9 IIS log failed to write entry, wwwxxx jeffs, Catastrophic failure Unexpected method call sequence. 0x8000ffff (-2147418113)., ksh lock a file, [unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_DBC failed

Links

XODOX
Impressum

#1: Does Perl use a special hand-made parser, or does it use Yacc or some

Posted on 2008-04-16 21:49:02 by irishhacker

Do you know?

Report this message

#2: Re: Does Perl use a special hand-made parser, or does it use Yacc or some other pre-packaged tool?

Posted on 2008-04-16 22:00:23 by Joost Diepenmaat

Robert <irishhacker@gmail.com> writes:

> Do you know?

perlfaq7 may be of interest.

--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/

Report this message

#3: Re: Does Perl use a special hand-made parser, or does it use Yaccor some other pre-packaged tool?

Posted on 2008-04-16 22:02:36 by Frank Seitz

Robert wrote:
> Do you know?

$ perldoc -q yacc
| Can I get a BNF/yacc/RE for the Perl language?
|
| There is no BNF, but you can paw your way through the yacc grammar in
| perly.y in the source distribution if you're particularly brave. The
| grammar relies on very smart tokenizing code, so be prepared to venture
| into toke.c as well.
|
| In the words of Chaim Frenkel: "Perl's grammar can not be reduced to
| BNF. The work of parsing perl is distributed between yacc, the lexer,
| smoke and mirrors."

Frank
--
Dipl.-Inform. Frank Seitz; http://www.fseitz.de/
Anwendungen für Ihr Internet und Intranet
Tel: 04103/180301; Fax: -02; Industriestr. 31, 22880 Wedel

Report this message

#4: Re: Does Perl use a special hand-made parser, or does it use Yaccor some other pre-packaged tool?

Posted on 2008-04-17 00:50:15 by Hans Mulder

Robert wrote:
> Do you know?

The parser is a fairly standard LALR parser generated using
bison from the perly.y file in the source distribution.

The lexical analyser, OTOH, is a special hand-made lexer.
All the smoke and mirrors used to parse Perl can be found
in the lexer source code in the file toke.c.

-- HansM

Report this message

#5: Re: Does Perl use a special hand-made parser, or does it use Yaccor some

Posted on 2008-04-17 02:12:26 by benkasminbullock

On Wed, 16 Apr 2008 12:49:02 -0700, Robert wrote:

> Do you know?

If you compile perl from the source code, the "Configure" script asks you
whether you want to use byacc or bison at one point (maybe it has
detected these first).

Report this message