Recognizing EOF as <nl>

3 views
Skip to first unread message

chefb...@gmail.com

unread,
Jun 24, 2008, 7:19:56 AM6/24/08
to GOLD Parsing System
Hi there,

is there any way to make GOLD Parsing System recognize EOF as <nl>?

Im using a line based grammar where every Instruction is delimited by
a NewLine (more precisely <nl> as defined by the wizard.) The problem
is that it cannot be defined in a way that does not require a <nl> at
the end of the file. (I've tried many ways...) Is there some way to
have the <nl> rule include the EOF?

Best regards

Manfred_Nowak

unread,
Jun 26, 2008, 4:53:58 AM6/26/08
to GOLD Parsing System
> Is there some way to have the <nl> rule include the EOF?

On receiving the EOF the parser should decide whether to accept the
source as being a word of its target language.

Your option is to rewrite your grammar along this line:

<nl>* <rule> ( <nl>* <nl> <rule> )*

-manfred
Reply all
Reply to author
Forward
0 new messages