Details

    • Type: Bug Bug
    • Status: Closed
    • Severity: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Target Release Version/s: None
    • Component/s: PBX/pbx_ael
    • Labels:
      None
    • SVN Revision Number:
      7481
    • Mantis ID:
      6021
    • Regression:
      No

      Description

      From bug 0006013:

      Begin rave.

      I just sat down and started mapping out a BNF (in bison syntax) for AEL.
      We could use flex's ability to build contextual lexers. At the very
      mininum, a bison parser could be built, that would not only generate the
      information that the compiler would need, but would also do a very
      rigorous check of the syntax in the file, right down to the innards of the
      $[ ] expressions, so probs can be found at compile time instead of at run
      time.

      Maybe I'm a fool for proposing this, but it would make the detection and
      reporting of syntax errors easier, make the compiler more robust and
      easier to maintain and upgrade, get rid of useless/needless line
      restrictions, provide a clear definition of exactly what the parser
      expects everywhere. The added benefit would be that the parser and
      compiler would be separated from each other, which doesn't appear to be
      the case in pbx_ael.c, but is a better practice in compiler building.

      The parser would generate a linked data structure, and the compiler could
      traverse it to generate code (asterisk extension.conf syntax, or straight
      to internal structures). The code would be simpler, as all parsing details
      would be separated out into the parser. And you won't have to exhaustively
      test for all possible syntax problems and report each in the code-- the
      parser has mechanisms to detect and recover from errors, which can be
      hand-tuned. Right now, I think you'd have to considerably add code (double
      the size?) to pbx_ael to do proper error checking, and still miss a ton of
      cases.

      End of rave.

                • ADDITIONAL INFORMATION ******

      From bug 0006013:

      Corydon76 - 12-17-05 11:47
      ----------------------------------------------------------------------
      In that case, I invite you to open a Feature Request with your suggestion
      on bison and flex, and let us close this one out, since the problems would
      be resolved with such an implementation.
      ----------------------------------------------------------------------

      OK, so I'll put my "money", where my mouth is

      1. ael_lex.c_v2
        70 kB
      2. ael_structs.h_v2
        3 kB
      3. ael.flex
        5 kB
      4. ael.flex_v2
        10 kB
      5. ael.tab.c
        105 kB
      6. ael.tab.h
        3 kB
      7. ael.y
        4 kB
      8. ael.y_v2
        42 kB
      9. ael2.loader.patch
        0.8 kB
      10. ael2.Makefiles.patch
        2 kB
      11. AEL2.patch.bz2
        80 kB
      12. AEL2-1.2.x-v0.14.patch
        607 kB
      13. AEL2v0.10.patch.bz2
        89 kB
      14. AEL2v0.11.patch.bz2
        93 kB
      15. AEL2v0.12.patch.bz2
        93 kB
      16. AEL2v0.13.patch.bz2
        91 kB
      17. AEL2v0.14.patch.bz2
        96 kB
      18. AEL2v0.2.patch.bz2
        84 kB
      19. AEL2v0.3.patch.bz2
        85 kB
      20. AEL2v0.4.patch.bz2
        86 kB
      21. AEL2v0.5.patch.bz2
        88 kB
      22. AEL2v0.6.patch.bz2
        88 kB
      23. AEL2v0.7.patch.bz2
        89 kB
      24. AEL2v0.8.patch.bz2
        89 kB
      25. AEL2v0.9.patch.bz2
        88 kB
      26. applist
        14 kB
      27. extensions.ael
        18 kB
      28. mm
        0.3 kB
      29. mm_v2
        0.5 kB

        Activity

        Hide
        Russell Bryant added a comment -

        Well, I ran into some problems with the merge. As soon as we figure out what's wrong, I have my finger on the merge button for this branch.

        Show
        Russell Bryant added a comment - Well, I ran into some problems with the merge. As soon as we figure out what's wrong, I have my finger on the merge button for this branch.
        Hide
        Steve Murphy added a comment -

        OK... I see that yesterday, the automerge dropped out (again). So I just
        hand merged it. app.c had a conflict... I don't understand all the cases where
        this sort of happens, but it's not that unusual to have it happen. I wish I didn't have to enter my password 15 times or so over 15 minutes to do it. I wish the expect script I wrote to do it for me still worked. I wish a ton of things, but, luckily not all my wishes come true. Could the automerge dropout be what's holding you back, or is it something else?

        Show
        Steve Murphy added a comment - OK... I see that yesterday, the automerge dropped out (again). So I just hand merged it. app.c had a conflict... I don't understand all the cases where this sort of happens, but it's not that unusual to have it happen. I wish I didn't have to enter my password 15 times or so over 15 minutes to do it. I wish the expect script I wrote to do it for me still worked. I wish a ton of things, but, luckily not all my wishes come true. Could the automerge dropout be what's holding you back, or is it something else?
        Hide
        Russell Bryant added a comment -

        The problem isn't that. After the merge completes, svn will not let me update or commit. It complains about files missing from the repository or something. Kevin is having the same problems trying to merge the autoconf branch. He is discussing the problem with the subversion guys, so he should be able to get the issue resolved in the next few days.

        As for typing your password 15 times, I know that is annoying. Personally, I have added my password to my ~/.subversion/servers file so I don't have to type it at all:

        [digium]
        ssl-client-cert-file = ..............
        ssl-client-cert-password = ..............

        Corydon wrote an expect script for this as well. You can grab it from subversion if you'd rather use that:

        svn co http://svn.digium.com/svn/asterisk/repotools

        Show
        Russell Bryant added a comment - The problem isn't that. After the merge completes, svn will not let me update or commit. It complains about files missing from the repository or something. Kevin is having the same problems trying to merge the autoconf branch. He is discussing the problem with the subversion guys, so he should be able to get the issue resolved in the next few days. As for typing your password 15 times, I know that is annoying. Personally, I have added my password to my ~/.subversion/servers file so I don't have to type it at all: [digium] ssl-client-cert-file = .............. ssl-client-cert-password = .............. Corydon wrote an expect script for this as well. You can grab it from subversion if you'd rather use that: svn co http://svn.digium.com/svn/asterisk/repotools
        Hide
        Russell Bryant added a comment -

        It looks like this will have to be merged by hand, instead of using "svn merge".

        Can you provide a list of every file that has been changed, removed, or added? I want to make sure I don't miss anything.

        Show
        Russell Bryant added a comment - It looks like this will have to be merged by hand, instead of using "svn merge". Can you provide a list of every file that has been changed, removed, or added? I want to make sure I don't miss anything.
        Hide
        Russell Bryant added a comment -

        Nevermind! Kevin figured out the problem and has merged this branch into the trunk. Thank you for all of your hard work!!!

        Show
        Russell Bryant added a comment - Nevermind! Kevin figured out the problem and has merged this branch into the trunk. Thank you for all of your hard work!!!

          People

          • Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development