java - Null TokenId error while processing an input text -


i working on netbeans module parse html markups following tutorial.

for keyword html, wrote following javacc file.

options {   java_unicode_escape = true;   error_reporting = false;   static = false;   common_token_action = false;   token_factory = "token";   jdk_version = "1.8";   build_parser = false; }  parser_begin(htmlparser)  package org.html.jcclexer;  import java.io.*;  /**  * grammar parse java version 1.5  * @author sreenivasa viswanadha - simplified , enhanced 1.5  */  public class htmlparser {}  parser_end(htmlparser)  /* white space */  token : {   < whitespace:   " " | "\t" | "\n" | "\r" | "\f"> }  token   : { < html : "html" > } 

it colors html word gives error:

java.lang.illegalargumentexception: token id must not null. fix lexer org.html.lexer.htmlexer@1e6bbd25 

test.html contains following word only:

html

i not sure it's error due .jj file or else.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -