Can recursive descent parser handle Python grammar?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • seberino@spawar.navy.mil

    #1

    Can recursive descent parser handle Python grammar?

    I'm a compiler newbie and was curious if Python's language/grammar
    can be handled by a recursive descent parser.

    Well?

    Chris

  • Ben Sizer

    #2
    Re: Can recursive descent parser handle Python grammar?

    seberino@spawar .navy.mil wrote:
    I'm a compiler newbie and was curious if Python's language/grammar
    can be handled by a recursive descent parser.
    I believe a recursive descent parser can handle any grammar; it just
    depends on how pure you want it to be.

    --
    Ben Sizer

    Comment

    • seberino@spawar.navy.mil

      #3
      Re: Can recursive descent parser handle Python grammar?


      Ben Sizer wrote:
      seberino@spawar .navy.mil wrote:
      I'm a compiler newbie and was curious if Python's language/grammar
      can be handled by a recursive descent parser.
      >
      I believe a recursive descent parser can handle any grammar; it just
      depends on how pure you want it to be.
      >
      --
      Ben Sizer
      Thanks! What do you mean by 'pure'?

      Chris

      Comment

      • Antoon Pardon

        #4
        Re: Can recursive descent parser handle Python grammar?

        On 2006-09-28, seberino@spawar .navy.mil <seberino@spawa r.navy.milwrote :
        I'm a compiler newbie and was curious if Python's language/grammar
        can be handled by a recursive descent parser.
        IIUC the python grammer is LL(1) and the development team is commited
        to keeping it LL(1).

        LL(1) languages can be handled by a recursive descent parser.

        --
        Antoon Pardon

        Comment

        • Ben Sizer

          #5
          Re: Can recursive descent parser handle Python grammar?

          seberino@spawar .navy.mil wrote:
          Ben Sizer wrote:
          seberino@spawar .navy.mil wrote:
          I'm a compiler newbie and was curious if Python's language/grammar
          can be handled by a recursive descent parser.
          I believe a recursive descent parser can handle any grammar; it just
          depends on how pure you want it to be.

          --
          Ben Sizer
          >
          Thanks! What do you mean by 'pure'?
          By 'pure' I mean entirely recursive and not iterative. Implementation
          becomes easier if you're not writing a purely recursive parsing
          program, and it makes it more practical to implement an arbitrary
          amount of 'read-ahead'.

          --
          Ben Sizer

          Comment

          Working...