Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Yes, you can use:</p> <ul> <li><a href="http://antlr.org/api/Java/org/antlr/v4/runtime/UnbufferedCharStream.html" rel="noreferrer"><code>UnbufferedCharStream</code></a> for your character stream (passed to lexer)</li> <li><a href="http://antlr.org/api/Java/org/antlr/v4/runtime/UnbufferedTokenStream.html" rel="noreferrer"><code>UnbufferedTokenStream</code></a> for your token stream (passed to parser) <ul> <li>This token stream implementation doesn't differentiate on token channels, so make sure to use <code>-&gt;skip</code> instead of <code>-&gt;channel(HIDDEN)</code> as the command in your lexer rules that shouldn't be sent to the parser.</li> </ul></li> <li>Make sure to call <a href="http://antlr.org/api/Java/org/antlr/v4/runtime/Parser.html#setBuildParseTree(boolean)" rel="noreferrer"><code>setBuildParseTree(false)</code></a> on your parser or a giant parse tree will be created for the entire file.</li> </ul> <p>Edit with some additional commentary:</p> <ul> <li>I put quite a bit of work into making sure <code>UnbufferedCharStream</code> and <code>UnbufferedTokenStream</code> operate in the most "sane" manner possible, especially in relation to the <code>mark</code>, <code>release</code>, <code>seek</code>, and <code>getText</code> methods. My goal was to preserve as much of the functionality of those methods as possible without compromising the ability of the stream to release unused memory.</li> <li>ANTLR 4 allows for true unlimited lookahead. If your grammar requires lookahead to EOF to make a decision, then you would not be able to avoid loading the entire input into memory. You'll have to take great care to avoid this situation when writing your grammar.</li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload