Advertisement
5_2007-2008 Miscellaneous #185857

GOLD Parser Example

Unlike other parser generators, the GOLD Parser strives to be a development tool that can be used with numerous programming languages and on multiple platforms while maintaining modern design concepts. Modern bottom-up parsers use a Deterministic Finite Automaton (DFA) for identifying different classes of tokens and a LALR(1) state machine to parse them. The actual LALR(1) and DFA algorithms are easy to implement since they rely on tables to determine actions and state transition. Consequently, it is the computing of these tables that is both time-consuming and complex. The GOLD Parser Builder performs this task; reading from a source grammar outline and then computing the appropriate tables. This information is then saved to a Compiled Grammar Table file which can be, subsequently, loaded by the actual parser engine and used. This is a simple project which loads a Compiled Grammar Table file and draws a parse tree for a given input string. An example grammar called "Simple" is included. You will need to download a copy of the GOLD Parser Engine DLL from http://www.devincook.com/GOLDParser. This module contains the actual parsing algorithms. The source code for the Engine will be released soon (hopefully next month) in Visual Basic. Until then, the DLL is available. Sorry.

AI

Yapay Zeka Özeti: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Kaynak Kod
original-source
Upload
Orijinal Yorumlar (3)
Wayback Machine'den kurtarıldı