Questions tagged [gold-parser]

GOLD is a parsing system targeting multiple programming language.

GOLD can be found on :

The GOLD Parsing System Homepage

GOLD uses as algorithms :

  • LALR to analyze syntax
  • DFA to identify different lexical units.

The GOLD system consists of :

  • The Builder analyzes the syntax of a language (specified as a grammar) and construct LALR and DFA tables.
  • The Compiled Grammar Table file definition stores table information generated by the Builder and serves as an intermediary between the Builder and the Engine.
  • The Engine, written for a target programming language and/or development platform Engine implements the LALR and DFA algorithms.

GOLD logically separates the development of the LALR and DFA parse tables from the algorithms that use them. As a result, grammars are completely independent of any implementation language or platform.

The GOLD Meta-Language is used to define a grammar:

31 questions
6
votes
2 answers

VBScript Partial Parser

I am trying to create a VBScript parser. I was wondering what is the best way to go about it. I have researched and researched. The most popular way seems to be going for something like Gold Parser or ANTLR. The feature I want to implement is to do…
redDragonzz
  • 1,543
  • 2
  • 15
  • 33
4
votes
1 answer

Extracting keywords from GOLD-Parser CGT-File

i have defined a grammar with many rules, that uses many keywords. imagine it like this (just with more of these rules and more keywords): ::= 'public' | 'protected' | 'private' the gold-parser-system is generating a compiled grammar…
0xDEADBEEF
  • 3,401
  • 8
  • 37
  • 66
3
votes
1 answer

Defining length of a String/input in Gold Parser Builder

I'm a newbie to use Gold Parser Engine and looking for a way to limit the length of a defined string but I'm not finding any way to do this. Please help de do that/. Here is my code ! Welcome to GOLD Parser Builder "Case…
JAMSHAID
  • 1,258
  • 9
  • 32
3
votes
1 answer

Parsing Project and Package files using Gold Parser --help needed with 'IdList'

I am dabbling with the Object Pascal Engine (by Rob van den Brink) and it seems (except for a few minor and easily correctable errors) it works for Delphi unit files. However, it has problems parsing Project (.dpr) and Package (.dpk) files; and the…
Adem
  • 265
  • 3
  • 10
3
votes
1 answer

VBScript Grammar: How to model sub call without parentheses

I'm writing a GOLD Parser grammar for VBScript. Here is an extract: ::= 'Call' | !| '(' ')' |…
martin
  • 225
  • 1
  • 10
2
votes
1 answer

GOLD Parse, how do you actually implement your code?

I am not quite sure how to implement my the code after generating the skeleton. I didnt use const only, i do have main files and i tried several c(++) versions along with c# and still i dont understand. I dont think any of them can load a file and…
user34537
2
votes
3 answers

BNF grammar + Gold LALR parser, failing to distinguish special case NewLine from Whitespace

I want to consider whitespaces and newlines as normal whitespaces. I want to distinguish newlines from other whitespaces moreover to allow special case. First attempt to write a compliant grammar fails. Here is the grammar: !…
user34537
2
votes
3 answers

Gold Parsing System - What can it be used for in programming?

I have read the GOLD Homepage ( http://www.devincook.com/goldparser/ ) docs, FAQ and Wikipedia to find out what practical application there could possibly be for GOLD. I was thinking along the lines of having a programming language (easily)…
Johan Bresler
  • 6,450
  • 11
  • 56
  • 77
2
votes
1 answer

how to implement dynamic calculating price in magento based on weight ?

Hi i’m developing a eCommerce site in Magento for jewellery business and its based on a “weight”, not the price because gold rate is changing in day by day or more then 3 times in a day.So it is not possible to change the product price every time…
user2753425
  • 301
  • 2
  • 9
1
vote
6 answers

Best parser generator for parsing many small texts in C++?

I am, for performance reason, porting a C# library to C++. During normal operation, this library needs, amongst other things, to parse about 150'000 math expressions (think excel formulas) with an average length of less than 150 characters. In the…
user816098
  • 262
  • 3
  • 14
1
vote
0 answers

How do I match accent characters in ANSI text file?

I'm trying to match accent character in ANSI file, and they are recognized as EOF. The text file is: VALB. VIÑAS - CICLÓN The grammar I'm using is: "Start Symbol" = {String Ch} = {All Printable} + {Control Codes} + {All Valid} String…
Liss
  • 13
  • 3
1
vote
1 answer

Gold Parser Lowercase

Gold Parser issue: Having a problem with Uppercase/Lowercase character differentiation. The following in my grammar is failing: LowercaseLetter = {&61 .. &7A} LowercaseLetters = LowercaseLetter+ UppercaseLetter = {&41 .. &5A} UppercaseLetters =…
FactEngine
  • 21
  • 3
1
vote
1 answer

Is HL7 (HL7.org) message format expressable as BNF with LALR(1) Compatability?

Reposted this as a new messsage (orgiginally I asked for the BNF grammar of HL7). Whilst it may be possible to express all of HL7 as BNF I need my BNF to be LALR(1) complaint (completely deterministic). Devon Cooks Gold Parser is the…
jonathan
  • 11
  • 1
1
vote
0 answers

Reduce-Reduce error: .. can follow more than one completed rule

I am using Gold Parser v5.2. I attempting to slightly modify the Object Pascal Engine (by Rob van den Brink) so that it can parse .dpr and .dpk files as well as .pas files. The garmmar file (named D7Grammar.grm, in the file downloaded from above…
Adem
  • 265
  • 3
  • 10
1
vote
1 answer

Can I improve this GOLD Parser Grammar?

I have to parse a file that looks like this: versioninfo { "editorversion" "400" "editorbuild" "4715" } visgroups { } world { "id" "1" "mapversion" "525" "classname" "worldspawn" solid { "id" "2" side …
David Brown
  • 35,411
  • 11
  • 83
  • 132
1
2 3