Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

StringTokenizer  RSS feed

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where would be the best place to post a message in regards to helping me out with the StringTokenizer class? Thanks in advance!!
 
Ranch Hand
Posts: 439
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd post it in section other API's but it doesn't seem it gets much attention. What's your question regarding it.
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post it right here. Bring it on!
 
Kevin Luludis
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).]
 
Why fit in when you were born to stand out? - Seuss. Tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!