Does Perl use a special hand-made parser, or does it use Yacc or someother pre-packaged tool?

Discussion in 'Perl Misc' started by Robert, Apr 16, 2008.

  1. Robert

    Robert Guest

    Do you know?
     
    Robert, Apr 16, 2008
    #1
    1. Advertising

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

    Robert <> writes:

    > Do you know?


    perlfaq7 may be of interest.

    --
    Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
     
    Joost Diepenmaat, Apr 16, 2008
    #2
    1. Advertising

  3. Robert

    Hans Mulder Guest

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

    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
     
    Hans Mulder, Apr 16, 2008
    #3
  4. Robert

    Ben Bullock Guest

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

    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).
     
    Ben Bullock, Apr 17, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    421
    Scott Smith
    Dec 1, 2005
  2. Mike Wahler
    Replies:
    2
    Views:
    542
    John Harrison
    Jul 8, 2003
  3. Replies:
    0
    Views:
    301
  4. Robert
    Replies:
    1
    Views:
    326
    Martin v. Löwis
    Apr 16, 2008
  5. climb65
    Replies:
    1
    Views:
    242
    Vinay Sajip
    Oct 27, 2010
Loading...

Share This Page