Beaver

Open source and free LALR parser generator
Download

Beaver Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD
  • Price:
  • FREE
  • Publisher Name:
  • Alexander Demenchuk
  • Publisher web site:
  • Operating Systems:
  • Mac OS X
  • File Size:
  • 220 KB

Beaver Tags


Beaver Description

Open source and free LALR parser generator Beaver takes a context free grammar and converts it into a Java class that implements a parser for the language described by the grammar. Beaver accepts grammars expressed in the Extended Backus-Naur form(EBNF). On the outside Beaver is not that different from any other parser generator. Beaver will read the specification of the language for which a parser needs to be generated and will produce a Java source file with a Java class that represents a parser for that specific language.It should be pointed out, though, that a language here should be viewed as a general term describing a linear form representing some structured information, not necessarily a programming language.The inner workings of Beaver's parsing engine use some interesting techniques which make it really fast, probably as fast as a LARL parser can get:· Beaver parsing tables are built using a row displacement scheme, which produces tables that behave as if they are using perfect hashing. i.e. an action/state lookup is a single indexed access to an array.· Action routines are invoked via delegates, which is the fastest way to invoke an action in Java, with the added benefit of having constant invocation time no matter how many action routines are defined. The latter advantage leads to significant gains (Java 1.2 parser with action routines do nothing but return symbols is about 26% faster when it uses delegates) over switch-ing for an action routine code. What's New in This Release: · Fixed bug 2838002 - exit code is always 0


Beaver Related Software