headerphoto

Blog

04/15/10: A bug was found in the algorithm for rule attributes. S = (S/"") "s" / "y" is left-recursive but went undetected due to the empty string alternative. This case has been fixed.

-----------------------------------------------------------------------------

12/02/09: A new Interactive APG web service for ABNF grammar development has been added to the site. This new service can help you debug ABNF grammars and the language sentences they define as well as generate JavaScript parsers. At the same time APG Version 6.1 has been released. Version 6.1 fixes a couple of bugs in Version 6.0 and also includes an option for generating parsers in JavaScript. Links to the documentation and downloads can be found here.

-----------------------------------------------------------------------------

07/05/09: Thanks to user EM for discovering and fixing a memory problem in the ApgLib operators. There is a pointer that requires refreshing after a memory allocation. In the file

./ApgLib/src/operators.c

following line 757

"PASSERT(spNodeUp);"

the pointer "spNodeDown" must be refreshed. It will be fixed in the next release.

-----------------------------------------------------------------------------

06/25/09: Congratulations to Thomas Miesch on the completion of his Open Source project SmallMGC. SmallMGC is a Media Gateway Controller for access and residential gateways. We are proud here that Thomas has selected APG as his parser of choice for SmallMGC 's MEGACO message handling. If you are interested in Next Generation Networks, take a look SmallMGC.

-----------------------------------------------------------------------------

06/23/09: Thanks again to Sebastian Pipping (http://www.hartwork.org/) for creating a Gentoo package for APG 6.0. Gentoo users can obtain APG 6.0 through the commands

  sudo layman -a sping
  sudo autounmask dev-util/apg-6.0
  sudo emerge -av dev-util/apg

The ebuild is hosted here.

-----------------------------------------------------------------------------

06/17/09: APG 6.0 has just been released. Version 6.0 updates APG 5.x with some significant new features.

  • Call back functions for any specific rule name during the syntax analysis phase can be used to completely overwrite the normal recursive-descent processing of the branch below the rule name node with a handwritten function.
  • The selection of syntax and semantic call back functions is removed from the grammar syntax and are specified at run time prior to syntax analysis.
  • The tracing facilities are significantly enhanced providing greater detailed control over the displayed output. Debugging parsers and the strings they parse is greatly simplified.

A more detailed description of APG 6.0 is given here. You can download it here.

-----------------------------------------------------------------------------

03/01/09: I've released a new minor version APG 5.1. The primary reason for this release is to update the Linux build to be autotools conforming. Thanks to Sebastian Pipping (http://www.hartwork.org/) for his time and effort in creating the necessary files for this. Additionally, I've migrated the IDE project files to Code::Blocks (www.codeblocks.org). Besides being Open Source, Code::Blocks has the big advantage that it works uniformly across the Linux and Windows platforms. The project files will build APG on either OS without modification. Check out the full details here.

-----------------------------------------------------------------------------

03/01/09: APG will not run on Linux x86_64 platforms. Among possible other problems, it assumes that both sizeof(ulong) = 4 and sizeof(void*) = sizeof(ulong). Thanks to user TJ for pointing out the work-around:

"However, if you add "-m32" to all compiler/linker calls and install the relevant 32bit libraries and compilers you can get everything to run on a x86_64bit as well."

-----------------------------------------------------------------------------

11/25/07: Its taken me a while, but I have finally created a GNU/Linux version of APG 5.0. You can read the description here and download it here. Your feedback is welcome.

-----------------------------------------------------------------------------

10/15/07: APG Version 5.0 has been released. You can check out its exciting new features here

-----------------------------------------------------------------------------

06/17/06: There are some peculiarities in the rules for writing ABNF grammars for APG (versions 1.0 - 4.0) that are not detailed in the write ups and can cause mysterious error messages when Apg.exe parses them. I've had some questions from users about problems that can occur because of them. I have no time table for fixing them (I'm flexible here. Hint: my consulting services are available.) and thought they might be of general interest. The problems are due to the circumstance that spaces in ABNF grammars are used both for the concatenation operator and for visual white space (extra spaces, comments, blank lines, line continuations, etc.) Here are a couple of rules to follow that, in my experience, will fix about 95% of the grammar errors encountered.

  1. Rule definitions: must not end in a space - strip all trailing spaces.
  2. Line continuations: If a continued line is broken at a concatenation between elements, the broken line must end in a space. A good habit is to end all continued lines except the last in a space.

Hope this helps. Your feedback is appreciated.

-----------------------------------------------------------------------------

06/02/06 : APG Version 4.0 has been released. The primary purpose of this release has been to demonstrate the use of APG for building C++ parsers. New sample applications are included which demonstrate a relatively complete C++ preprocessor and two simple C++ language abstractions designed to reproduce the most difficult-to-parse, non-context-free C++ language requirements. Several innovations were required to achieve this goal  - Superset ABNF (SABNF), Semantic-Free Syntax Analysis (SFSA)  parsing, recursive, re-entrant parsing and other exciting stuff. See the Version 4.0 description for all the details.

-----------------------------------------------------------------------------

11/25/05: APG Version 3.1 has been released. It adds an important new feature for context-sensitive parsing - "semantic predicates." That is, it is now possible to reject a rule after it has been syntactically matched based on semantic actions by the application. A new sample application, "PredicateActions" demonstrates this new feature for an abstraction of the C++ declaration/expression semantic ambiguity. It also features a complete rewrite of the recursion analysis - both the algorithms and the documentation section. This fixes a bug that was found for some grammars and expands the analysis considerably. 

-----------------------------------------------------------------------------

10/18/05: I've done an extensive study of the "dangling else" ambiguous grammar problem. It looks at the problem of dealing with multiple parse trees. APG disambiguates to a single parse tree in these cases. This study indicates that one should be enough if the grammar and the semantic actions are judiciously chosen. Have a look.

-----------------------------------------------------------------------------

09/15/05: APG Version 3.0 is released. Version 3.0 offers considerable performance enhancement by factors of 10-100.

-----------------------------------------------------------------------------

09/03/05: APG Version 2.0 is released. Includes asymptotic time vs string length studies for three different grammars including the prototypical non-regular cases anbn and arithmetic expression. Also includes an extensive case study of the famous "dangling else" problem.

-----------------------------------------------------------------------------

08/13/05: APG gets ported to Linux. According to Pradeep Kumar, who has use APG to develop a MEGACO text message parser, the port was simple with only a few modifications to the ApgStatus class. We hope to have a Linux port available for download here soon. Thanks Pradeep.

-----------------------------------------------------------------------------

06/06/05: APG is selected by the IETF for its ABNF verification tools page. Find us at http://tools.ietf.org/inventory/verif-tools.

-----------------------------------------------------------------------------

05/12/05: Our first Open Source software release. APG - an ABNF Parser Generator.

-----------------------------------------------------------------------------