Search:

Type: Posts; User: javapenguin

Search: Search took 0.18 seconds.

  1. [SOLVED] Re: Confused on what tokenizer to use and how to use them.

    Sorry. I try and update things so people don't try and help me with something I've already solved.

    Since my threads normally don't get a lot of replies, I can often sometimes solve it before I...
  2. [SOLVED] Re: Confused on what tokenizer to use and how to use them.

    I had to hand it in and was nearly done with it anyway.
  3. [SOLVED] Re: Confused on what tokenizer to use and how to use them.

    Well, considering what it IS doing at the moment, right now I'd like it NOT to loop infinitely.

    Here's how it should go:



    E():
    switch(token)
    {
    case n: T(); E'();
  4. [SOLVED] Re: Confused on what tokenizer to use and how to use them.

    Ok, I've tried fixing some things and now it will always say true and will go into an infinite loop and I don't know why!


    import java.util.StringTokenizer;
    import java.io.*;
    import...
  5. [SOLVED] Re: Confused on what tokenizer to use and how to use them.

    I did find an error where I had been setting validity to true, regardless or whether or not it was true, at the beginning of every read method call and, I think, have fixed that, but the problem is...
  6. [SOLVED] Re: Confused on what tokenizer to use and how to use them.

    Ok, I've updated it and it's now always returning false.

    It appears to be going into the read twice but never EValidator. Why would that be?


    import java.util.StringTokenizer;
    import...
  7. [SOLVED] Re: Confused on what tokenizer to use and how to use them.

    It shows that the while loop inside of getNextToken() is infinite if it's a number that's read in as the next char. I'm thinking it's how I'm phrasing it but cannot figure out what to do about it. ...
  8. [SOLVED] Re: Confused on what tokenizer to use and how to use them.

    Ok I've rewrote part of it now so I don't need the tokenizer at all. I made my own. Does it have any code flaws? It compiles but might have bad logic or cause null pointers. Or could be...
  9. [SOLVED] Re: Confused on what tokenizer to use and how to use them.

    I believe it now is, or should be anyway, updating the token string to shrink.

    However, it seems to always be either always evaluating to invalid or false. I've updated it to change all the...
  10. [SOLVED] Re: Confused on what tokenizer to use and how to use them.

    There is something I'm wondering. When I call nextToken(), does it simply return but not remove the next token or is it also removing it from the token string at the same time?

    I cannot figure...
  11. [SOLVED] Re: Confused on what tokenizer to use and how to use them.

    Please reply. ^:)^^:)^:-w:-w^:)^^:)^


    import java.util.StringTokenizer;
    import java.io.*;
    import java.util.*;


    public class LL1Parser
    {
  12. [SOLVED] Re: Confused on what tokenizer to use and how to use them.

    Ok, I've updated it a bit.


    import java.util.StringTokenizer;
    import java.io.*;
    import java.util.*;


    public class LL1Parser
    {
  13. [SOLVED] Confused on what tokenizer to use and how to use them.

    I'm supposed to be making a parser for grammars, or basically parsing a simple language definition.

    Basically I could be parsing either number or a symbol (+, *, (, ), or lambda, maybe lambda...
Results 1 to 13 of 13