/**
  * Mark the specified production as token-level. This method sets the specified production's
  * {@link Properties#TOKEN} property and removes any {@link Properties#TEXT_ONLY} property. It
  * does, however, <em>not</em> adjust the production's type to <code>Token</code>.
  *
  * @param p The production.
  */
 public static void markToken(Production p, boolean verbose) {
   if (verbose) {
     System.err.println("[Recognizing " + p.qName + " as token-level]");
   }
   p.setProperty(Properties.TOKEN, Boolean.TRUE);
   p.removeProperty(Properties.TEXT_ONLY);
 }
Exemple #2
0
 /** Visit the specified production. */
 public void visit(Production p) {
   if (!p.hasProperty(Properties.META_DATA)) {
     p.setProperty(Properties.META_DATA, new MetaData());
   }
 }
 /**
  * Mark the specified production as lexical.
  *
  * @param p The production.
  */
 protected void mark(Production p) {
   if (runtime.test("optionVerbose")) {
     System.err.println("[Recognizing " + p.qName + " as lexical syntax]");
   }
   p.setProperty(Properties.LEXICAL, Boolean.TRUE);
 }