IDL parser: Ignore comments

Before this CL the base lexer treated comments as tokens and the base
parser had some custom rules to handle special comments like
copyrights. Blink's lexer/parser needed to extend the base lexer/parser
to remove comments as otherwise comments must be explicitly included
in the grammar. Since the base parser is only used by Blink and Blink
doesn't need comments (at least now), it makes sense to ignore comments
in the base lexer/parser. This enables us to remove all custom rules
from BlinkIDLParser.

BUG=617899

Change-Id: I6ead510680457dfb13ed9797ac056c34c185e292
Reviewed-on: https://chromium-review.googlesource.com/544424
Commit-Queue: Kenichi Ishibashi <[email protected]>
Reviewed-by: Yuki Shiino <[email protected]>
Reviewed-by: Hitoshi Yoshida <[email protected]>
Reviewed-by: Kentaro Hara <[email protected]>
Cr-Commit-Position: refs/heads/master@{#481863}
diff --git a/tools/idl_parser/idl_lexer.py b/tools/idl_parser/idl_lexer.py
index c810558..6de4364d 100755
--- a/tools/idl_parser/idl_lexer.py
+++ b/tools/idl_parser/idl_lexer.py
@@ -42,7 +42,6 @@
       'string',
 
     # Symbol and keywords types
-      'COMMENT',
       'identifier',
 
     # MultiChar operators
@@ -145,10 +144,10 @@
     return t
 
   # A C or C++ style comment:  /* xxx */ or //
+  # This token is ignored.
   def t_COMMENT(self, t):
     r'(/\*(.|\n)*?\*/)|(//.*(\n[ \t]*//.*)*)'
     self.AddLines(t.value.count('\n'))
-    return t
 
   # A symbol or keyword.
   def t_KEYWORD_OR_SYMBOL(self, t):