<p>I guess you are asking this question because the problem you are trying to solve may have some memory requirements or you want to perform some changes in Pattern class. </p>

<ol>
<li><p>In case you have memory issues, you can go ahead and use Esper or Siddhi CEP engines as they don't have dependencies like Flink has.</p></li>
<li><p>For the second case i.e you want to make some changes to pattern file or see how query processing works then you should use NFA class as @Dawid pointed out. This is because CEP pattern matching works basically by parsing query tree as Non-deterministic Finite Automata which receives input streams at Leaf nodes and use operators at each level to co-relate values of streams and filter values, send it to the upper level operator for filtering and so on. Final values are received at the root of this tree.</p></li>
</ol>

<p>Particularly I found SASE engine helpful if you are going to interact with low level and basic CEP engine. link for SASE paper is 
<a href="https://arxiv.org/ftp/cs/papers/0612/0612128.pdf" rel="nofollow noreferrer">https://arxiv.org/ftp/cs/papers/0612/0612128.pdf</a></p>

<p>You can look code of NFA file to get more understanding  <a href="https://github.com/haopeng/sase/tree/master/src/edu/umass/cs/sase/query" rel="nofollow noreferrer">https://github.com/haopeng/sase/tree/master/src/edu/umass/cs/sase/query</a></p>

<blockquote>
  <p>Please let me know if you have some query</p>
</blockquote>
Using flink-cep pattern matching without all Flink enviroment
<p>As in the title: Is it possible to use just flink pattern matching without whole other flink enviroment?</p>