4. Lexer Debugging

Skip to end of metadata
Go to start of metadata

Debugger Controller

Token types

Lists all token types for the lexer, and allows selection of any number of types to highlight in the input view.

Tokens

Lists all tokens parsed in the input, and allows selection of any number of tokens to highlight in the input view.

Channels

Lists all channels present in the input, and allows selection of any number of channels to highlight in the input view. The lexer for the attached image does not place whitespace tokens on the HIDDEN channel, which is why they are highlighted as well.

Modes

Lists all modes for the lexer, and allows selection of any number of modes to highlight in the input view. Tokens parsed in the specified mode are highlighted.

Lookahead

This mode allows highlighting "DFA" tokens which were fully parsed using the cached DFA versus "ATN" tokens which required the ATN interpreter to handle one or more input symbols for the token. In the future this debug mode will be greatly extended to provide more useful information.

Labels:

var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-1024344-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();