aspose file tools*
The moose likes Beginning Java and the fly likes StringTokenizer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "StringTokenizer" Watch "StringTokenizer" New topic
Author

StringTokenizer

Kevin Luludis
Ranch Hand

Joined: Feb 13, 2001
Posts: 30
Where would be the best place to post a message in regards to helping me out with the StringTokenizer class? Thanks in advance!!
Val Dra
Ranch Hand

Joined: Jan 26, 2001
Posts: 439
I'd post it in section other API's but it doesn't seem it gets much attention. What's your question regarding it.


Val SCJP <BR>going for SCJD
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Post it right here. Bring it on!
Kevin Luludis
Ranch Hand

Joined: Feb 13, 2001
Posts: 30
I am working on a school project on building a simple compiler. I have the I/O pretty much worked out as to reading in the file and then printing it back out to the screen and another file etc. Okay, now where I am running into a bit of a problem is Taking these tokens that I am reading in and then checking them to see if they meet a certain criteria (according to the grammar provided by the professor). So far what I have done is this:

This compiles and also works. I was wondering if there was a better way to optimize how I can get the tokens out to check them against my grammar requirements. Plus, im not sure on how to handle tokenizing of the * + = / symbols which will be part of the expression grammar. I basically tested this with a file I called a.txt which was basically written like this:

I had to throw the ; in there to let it know to make a new line. Please let me know what you think, and any suggestions on how to improve such a thing. The rest of the work that I have done, including the grammar and the output assembly language about my project can be found at http://members.nbci.com/acidmaxx/Compiler/compiler_project.html
Thanks alot. Looking forward to hear your ideas
[This message has been edited by Kevin Luludis (edited March 01, 2001).]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: StringTokenizer
 
Similar Threads
question on criteriaFind() and others
What is StringTokenizer?
How to extract the name-value pairs?
String's split() -- gives compilation error
Tokens