Grammer for basic arithmetic with variables

View: New views
5 Messages — Rating Filter:   Alert me  

Grammer for basic arithmetic with variables

by Ralph Jocham :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi,
I am looking for a basic grammar which supports +,-,/,* and variables.

Assuming a=5, b=10

a+(3*b)/2 results in 20

I checked out the grammar site but could not find anything useful.

Thanks,
Ralph



     

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Grammer for basic arithmetic with variables

by darose :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, April 10, 2009 11:21 am, Ralph Jocham wrote:

>
> Hi,
> I am looking for a basic grammar which supports +,-,/,* and variables.
>
> Assuming a=5, b=10
>
> a+(3*b)/2 results in 20
>
> I checked out the grammar site but could not find anything useful.
>
> Thanks,
> Ralph

If I recall correctly, there's a basic arithmetic "calculator" grammar
that comes shipped with javacc in the examples section.

DR


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Grammar file for SQL

by Harshad Chavan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi all,

has anyone written a grammar file for SQL queries? Specifically, we want to port mysql queries to db2 queries. Has anyone done that before?

Appreciate any help.

Harshad


Re: Grammar file for SQL

by Legéndi Richárd :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Harshad,

Ain't sure if such a public tool exists.

However, there are available grammars at the javacc site for PL/SQL:
https://javacc.dev.java.net/servlets/ProjectDocumentList?folderID=110&expandFolder=110&folderID=0

Also you may find useful the following links:
http://jsqlparser.sourceforge.net/
http://www.nabble.com/JJTree-Javacc---SQL-Grammar-Parser-to-expose-%22sql-parts%22-td19299305.html
http://www.ibm.com/developerworks/data/library/techarticle/dm-0401brereton/index.html

Hope that helps something.

Best regards,
---
Richard O. Legendi, programmer
AITIA International Inc.
E-mail: rlegendi@...

Harshad Chavan wrote:
> Hi all,
>
> has anyone written a grammar file for SQL queries? Specifically, we want
> to port mysql queries to db2 queries. Has anyone done that before?
>
> Appreciate any help.
>
> Harshad


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Grammar file for SQL

by Harshad Chavan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Thanks Richard for your help, I will look into the links.
 
LongJump - Platform as a Service



From: Richard Oliver Legendi <roante@...>
To: users@...
Sent: Wednesday, April 15, 2009 2:06:04 AM
Subject: Re: [JavaCC] Grammar file for SQL

Hi Harshad,

Ain't sure if such a public tool exists.

However, there are available grammars at the javacc site for PL/SQL:
https://javacc.dev.java.net/servlets/ProjectDocumentList?folderID=110&expandFolder=110&folderID=0

Also you may find useful the following links:
http://jsqlparser.sourceforge.net/
http://www.nabble.com/JJTree-Javacc---SQL-Grammar-Parser-to-expose-%22sql-parts%22-td19299305.html
http://www.ibm.com/developerworks/data/library/techarticle/dm-0401brereton/index.html

Hope that helps something.

Best regards,
---
Richard O. Legendi, programmer
AITIA International Inc.
E-mail: rlegendi@...

Harshad Chavan wrote:
> Hi all,
>
> has anyone written a grammar file for SQL queries? Specifically, we want to port mysql queries to db2 queries. Has anyone done that before?
>
> Appreciate any help.
>
> Harshad


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...