title: Issue creating grammar definition with antlr
body: <p>I am currently following the Frederico Tomasetti Antlr tutorial, however I getting the following error when trying to generate my antlr grammar definition.</p>
  
  <pre><code>Chat.g4:52:26: syntax error: ']' came as a complete surprise to me
  
  Chat.g4:52:25 syntax error: mismatched input ')' expecting SEMI while matching a lexer rule
  </code></pre>
  
  <p>Can anyone see where I've gone wrong?</p>
  
  <p>My g4 file:</p>
  
  <pre><code> 1  grammar Chat;
   2  
   3  /*
   4   * Parser Rules
   5   */
   6   
   7  chat                : line+ EOF ;
   8   
   9  line                : name command message NEWLINE;
  10   
  11  message             : (emoticon | link | color | mention | WORD | WHITESPACE)+ ;
  12   
  13  name                : WORD WHITESPACE;
  14   
  15  command             : (SAYS | SHOUTS) ':' WHITESPACE ;
  16                                          
  17  emoticon            : ':' '-'? ')'
  18                      | ':' '-'? '('
  19                      ;
  20   
  21  link                : '[' TEXT ']' '(' TEXT ')' ;
  22   
  23  color               : '/' WORD '/' message '/';
  24   
  25  mention             : '@' WORD ;
  26  
  27  /*
  28   * Lexer Rules
  29   */
  30   
  31  fragment A          : ('A'|'a') ;
  32  fragment S          : ('S'|'s') ;
  33  fragment Y          : ('Y'|'y') ;
  34  fragment H          : ('H'|'h') ;
  35  fragment O          : ('O'|'o') ;
  36  fragment U          : ('U'|'u') ;
  37  fragment T          : ('T'|'t') ;
  38   
  39  fragment LOWERCASE  : [a-z] ;
  40  fragment UPPERCASE  : [A-Z] ;
  41   
  42  SAYS                : S A Y S ;
  43   
  44  SHOUTS              : S H O U T S;
  45   
  46  WORD                : (LOWERCASE | UPPERCASE | '_')+ ;
  47   
  48  WHITESPACE          : (' ' | '\t') ;
  49   
  50  NEWLINE             : ('\r'? '\n' | '\r')+ ;
  51   
  52  TEXT                : ~[])]+ ;
  </code></pre>
  
  <p>Any help would be appreciated.</p>