Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    Parse::RecDescent::FAQ 5.02

    Download button

    No screenshots available
    Downloads: 340  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Terrence Brannon | More programs
    Perl Artistic License / FREE
    July 25th, 2007, 22:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Parse::RecDescent::FAQ description

    Parse::RecDescent::FAQ is the official, authorized FAQ for Parse::RecDescent.

    Parse::RecDescent::FAQ is the official, authorized FAQ for Parse::RecDescent.

    OVERVIEW-TYPE QUESTIONS

    Is Parse::RecDescent LL(1)? LL(N)? LR(1)? LR(N)?

    Answer by Yves Orton:

    I have a data structure which is

    a hash of entries where an entry is a list/array of sets

    I have also a grammar that can parse the syntax of the text files that contain the data I want to fill this structure with. Until here everything is ok.

    Problem: I cannot figure out how to actually FILL the parsed data into the structure. I can only decide if a string is grammatically correct or not.

    Also see the "Left-recursion" section under "PARSER BEHAVIOR"

    DEBUGGING

    Flags you can set

    Paraphrased from Yves Orton:

    To understand more about why your parser is not behaving as it should take advantage of the follow variables:

    $::RD_ERRORS # unless undefined, report fatal errors
    $::RD_WARN # unless undefined, also report non-fatal problems
    $::RD_HINT # if defined, also suggestion remedies
    $::RD_TRACE # if defined, also trace parsers' behaviour

    Making warning line numbers correspond to your grammar

    How do I match the line numbers with the actual contents of my script?

    At present, you can't (but that's on the ToDo list). Setting $::RD_TRACE can be useful though:

    Once you've run with $RD_TRACE, do this:

    perl -w RD_TRACE

    Then go and examine the actual line numbers given for the error in the file RD_TRACE.

    That will show you the actual generated code that's the problem.

    That code will, in turn, give you a hint where the problem is in the grammar (e.g. find out which subroutine it's in, which will tell you the name of the offending rule).

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    Parse::RecDescent FAQ | Frequently Asked Questions | Perl module | Parse::RecDescent::F | Parse::RecDescent | FAQ

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM