[antlr-interest] [newbie:] Unablanced tree resulting from SQL-parser

framiboe framiboe at yahoo.de
Mon Sep 20 01:55:00 PDT 2004


Hi all,

it's my first contact to antlr and I managed "MS SQL Select 
Statement"-grammar by Tomasz Jastrzebski to produce Java-Code. It 
works, partly. It runs without exception and tokenizes a complex SQL-
statement into its atoms. That's good. But the resulting tree is a 
totally unbalanced tree, because every node was put "right" under its 
parent. I've expected to receive a logical tree, something like 

"select" -> column-list -> columns
    v
"from" -> table-list
    v
"where"

and so on. I hope, that was understandable?! What I receive now, is 
more a linked list of tokens instead of a tree.

Question:
- Does that depend on the grammar definition?
- Do I have any possibilities to influence the tree building process?
- Did I understand the whole antlr-thing wrong?

Thanks and regards,
frank





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 





More information about the antlr-interest mailing list