SQL and relational algebra

57 views
Skip to first unread message

Humberto Mejias

unread,
Jul 14, 2014, 10:26:43 PM7/14/14
to antlr-di...@googlegroups.com
hi everyone, i am trying to me a simple interprete for consult in relational algebra, this is a project for university.

ill have some files in a directory with this sintax

cod_buy(char);name_suc(char);Import(int)
“P-11”;”DC Med”;900
“P-14”;”Center”;1500

like tables in memory, then i have to do some operations with this like and have some reserver words

∩ intersection   INTE
∪ Union            UNIO
∏ Proyeccion    PRO

and other, i just need some example and ill start with the others

some logic operators like and, not, or...

so, basically, i have some simbols and have to make it a token and i need to read the files and understand the content, you have some examples or you can help me with one or two here, just for me to start.

Thank to everyone.

Mike Lischke

unread,
Jul 15, 2014, 3:11:43 AM7/15/14
to antlr-di...@googlegroups.com

Hi Humberto,

that's a very broad question. My advice: instead of directly jumping on the waggon to create a full featured parser for your language try something simple first to get used to ANTLR and how it processes text and what you can do with the result. For instance download a calculator example and play with that. Once you got familiar with this you can start with your real task and then come back and ask specific questions here. See https://github.com/antlr/grammars-v4 for many example grammars or search the web (http://lmgtfy.com/?q=ANTLR4+calculator+grammar).

hi everyone, i am trying to me a simple interprete for consult in relational algebra, this is a project for university.
Reply all
Reply to author
Forward
0 new messages