C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Computing AST

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
news.tkdsoftware.com
Guest





PostPosted: Fri Sep 24, 2004 4:42 pm    Post subject: Computing AST Reply with quote



Could someone show me a simple class structure example on how I'd approach
modeling my AST classes if my grammar was to parse a simple multiple
statement program which accepted statements in this format:

PRINT arithmetic_expression

So I could write a program that has:
PRINT 2+3*5
PRINT 6/3+2

Thanks in advance!

--



Back to top
red floyd
Guest





PostPosted: Fri Sep 24, 2004 5:28 pm    Post subject: Re: Computing AST Reply with quote



news.tkdsoftware.com wrote:
Quote:
Could someone show me a simple class structure example on how I'd approach
modeling my AST classes if my grammar was to parse a simple multiple
statement program which accepted statements in this format:

PRINT arithmetic_expression

So I could write a program that has:
PRINT 2+3*5
PRINT 6/3+2

Thanks in advance!


You might tell your instructor that you're having problems with the
homework assignment and ask him for help.

Back to top
John Harrison
Guest





PostPosted: Fri Sep 24, 2004 6:09 pm    Post subject: Re: Computing AST Reply with quote




"news.tkdsoftware.com" <chris (AT) noreply (DOT) nospam.tkdsoftware.com> wrote in
message news:wcNNTP.01c4a255.8a46c470.999.0 (AT) tkdsoftware (DOT) com...
Quote:
Could someone show me a simple class structure example on how I'd approach
modeling my AST classes if my grammar was to parse a simple multiple
statement program which accepted statements in this format:

PRINT arithmetic_expression

So I could write a program that has:
PRINT 2+3*5
PRINT 6/3+2

Thanks in advance!


See my reply to your last post.

john



Back to top
Thomas Matthews
Guest





PostPosted: Mon Sep 27, 2004 3:29 pm    Post subject: Re: Computing AST Reply with quote

news.tkdsoftware.com wrote:

Quote:
Could someone show me a simple class structure example on how I'd approach
modeling my AST classes if my grammar was to parse a simple multiple
statement program which accepted statements in this format:

PRINT arithmetic_expression

So I could write a program that has:
PRINT 2+3*5
PRINT 6/3+2

Thanks in advance!


Please, please, don't use abbreviations.
What is your definition of an AST class?
A BLT could be a sandwich, a tree or a transformation.
For better communications, please define your abbreviations
before you use them or refrain from using them.

I suggest you discuss generic programming topics
in news:comp.programming.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book


Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.