Re: [Google Groups] Gold Parser Keyword Issue

81 views
Skip to first unread message

Devin Cook

unread,
Aug 28, 2012, 1:39:54 PM8/28/12
to gold-pars...@googlegroups.com
The best way to get started is to download some existing grammars. To
create a string terminal, you can use a definition such as:

StringLiteral = '"' {Printable}* '"'

and then you can use it in your grammar:

<assignment> ::= Identifier '=' StringLiteral

- Devin

On Mon, Aug 27, 2012 at 11:17 PM, Chithambara Rajivgandhi M
<crajivg...@gmail.com> wrote:
> Hi All!
>
> How Can i acheive below scenario
>
> Grammar
>
> <assignment> ::= Identifier '=' <STRING>
> <test> ::= test '(' ')'
>
> Input
> a = "test is a test!"
>
>
> Issue : Parser taking "test" as function name base on the <test> tag. So it
> is asking '(' Paranthesis next to 'test' keyword.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "GOLD Parsing System" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/gold-parsing-system/-/xB6zDjoHB2wJ.
> To post to this group, send email to gold-pars...@googlegroups.com.
> To unsubscribe from this group, send email to
> gold-parsing-sy...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/gold-parsing-system?hl=en.

Chithambara Rajivgandhi M

unread,
Aug 30, 2012, 1:28:02 AM8/30/12
to gold-pars...@googlegroups.com, mi...@devincook.com
Thank your for reply

StringLiteral = '"' {Printable}* '"' 


<assignment> ::= Identifier '=' StringLiteral

It is working fine. But it is not working when I have one more grammar in my file.
The grammar is

<Message_Box> ::= MessageBox '(' StringLiteral  ')'

Now I am using "MessageBox" as a variable Name But It is asking next letter as "(" instead of "="  .

For example

MessageBox = "Sample string"



Reply all
Reply to author
Forward
0 new messages