[antlr-interest] Expressions
Sebastian Kaliszewski
sk at z.pl
Thu Aug 5 04:57:00 PDT 2004
Peter Ashford wrote:
> Whats the recommended way to handle expressions when you can have
> several different kinds of expression (I'm wanting float, string and
> boolean expressions)?
Standard way is to parse everything just as expression and only in one of
the following compilation phase -- type determination & checking -- check if
the expressions are well typed (well formed).
Types are part of semantics not syntax, and typically doing (even partial)
semantic checks in syntactic phase (lexer/parser) in not a good idea.
rgds
--
Sebastian Kaliszewski
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