I am doing my first try with GOLD and I'm trying to parse abc music notation.
The grammar has been accepted but when I try to test it with an data file I get an error when the parser finds a space.
In the data file I have this line
X: 1
The grammar for this looks like this (This is just a snippet of the grammar file)
Whitespace = {WS}+
NewLine = {CR}{LF} | {CR} | {LF}
StringLiteral = '"' {String Chars}* '"'
Digits = {digit}+
<comment> ::= '%' StringLiteral NewLine
<end-of-line> ::= <comment> | NewLine
<field-number> ::= 'X:' Digits <end-of-line>
The test log
FAIL : danny_boy.abc
Result : Syntax Error
Column : 2
Line : 0
Parse Value : {space}
Description : Expecting one of the following tokens: Digits
How do I make the parser to ignore whitespace between tokens?
// Anders