Help: I need some Parenthesis removed.

74 views
Skip to first unread message

Udo Woitek

unread,
Jul 9, 2013, 4:36:13 AM7/9/13
to gold-pars...@googlegroups.com
Hello,

I've got my first more complex grammar up and working. (Attached file) 

But I need some help with one point: How do I have to change my grammar to get 

"text1"(3+4)(3)(A)"text2" to parse as well as 
"text1" 3+4 "text2" or 
"text1" 3+4 NewLine

If I remove the parenthesis from the definitions in <ConcatTokens> I get a Shift-Reduce Conflict and some Reduce-Reduce Conflicts.

Any advice for a newbie?
Thank you.

Udo.
GC.grm

svv1999

unread,
Jul 20, 2013, 12:07:44 PM7/20/13
to gold-pars...@googlegroups.com
Udo Woitek wrote:
Any advice for a newbie?

No advice because finding grammars is undecidable.
But a hint: languages usually declare operators even for multiplication, i.e. "a*b" instead of "a b" must be written.

-manfred

Devin Cook

unread,
Jul 20, 2013, 7:21:17 PM7/20/13
to GOLD Parsing System
So, the multiplication is implied? Is this a language you are creating or one what is currently in active use?


--
You received this message because you are subscribed to the Google Groups "GOLD Parsing System" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gold-parsing-sy...@googlegroups.com.
To post to this group, send email to gold-pars...@googlegroups.com.
Visit this group at http://groups.google.com/group/gold-parsing-system.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Udo Woitek

unread,
Jul 21, 2013, 2:56:37 AM7/21/13
to gold-pars...@googlegroups.com, mi...@devincook.com
Hello,

thank you for your replies. I try to make a parser for the solver language in WinCachebox where it is possible to do string concatenations the way I described. Ther you can do something like "X"(3+3)(1)(2*4)" Y"(4/2) which ends after calculation in "X618 Y2" and "X"2*50"Y" too which ends in "X100Y".

At the moment I solved my problem by forcing the user to write parenthesis around the expressions and using the parser to parse only one liners. 

I am at vacation at the moment so I have no access to my current version of the grammar. But as soon as I am back I will post the next version.

Thank you,
 Udo.


On Sunday, 21 July 2013 01:21:17 UTC+2, Devin Cook wrote:
So, the multiplication is implied? Is this a language you are creating or one what is currently in active use?
On Sat, Jul 20, 2013 at 9:07 AM, svv1999 <svv...@googlemail.com> wrote:
Udo Woitek wrote:
Any advice for a newbie?

No advice because finding grammars is undecidable.
But a hint: languages usually declare operators even for multiplication, i.e. "a*b" instead of "a b" must be written.

-manfred

--
You received this message because you are subscribed to the Google Groups "GOLD Parsing System" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gold-parsing-system+unsub...@googlegroups.com.

svv1999

unread,
Jul 28, 2013, 4:19:12 PM7/28/13
to gold-pars...@googlegroups.com, mi...@devincook.com

Udo Woitek wrote:
parser for the solver language in WinCachebox

Another hint:
In the rule
  <ConcatTokens> ::= '(' <Expression> ')'
remove the parenthesis and explain yourself the errror message.

-manfred
Reply all
Reply to author
Forward
0 new messages