[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| [pde-dev] WhiteSpaceRules ? | 
Hallo,
i got a small problem. I am trying to write a small parser for schema. It
seems that  nextToken is always returning the a non space token and
afterwards a token which contains all white spaces till the next one.
How can i get rid of this white space token, or is this normal
behaviour?
Below you find the rules i have defines. May be there is somthing
wrong?!
   private IRule[] schemaKeywords() {
       IRule[] result = null;
       List rules = new ArrayList();
       WordRule keywords = new WordRule(new SchemaWordDetector(), unknown);
       keywords.addWord("define", define);
       keywords.addWord("use-module!", useModule);
       keywords.addWord("in-module", inModule);
       keywords.addWord("module-export!", export);
       rules.add(keywords);
       rules.add(new SingleLineRule("\"", "\"", unknown, '\\'));
       rules.add(new SingleLineRule("'", "'", unknown, '\\'));
       rules.add(new EndOfLineRule(";", unknown));
       rules.add(new WhitespaceRule(new XMLWhitespaceDetector()));
       result = new IRule[rules.size()];
       rules.toArray(result);
       return result;
   }
Michael