• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

StringTokenizer

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Post it right here. Bring it on!
 
Kevin Luludis
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).]
reply
    Bookmark Topic Watch Topic
  • New Topic