Creating a new syntax for Sublime text 3 on the basis exists : I'm trying to create the syntax highlighting for [Flex][1]. I'm using [PackageDev][2] and YAML.

So, I want find a blocks, starting with `%{` and ending with `%}`, then I need highlight everything inside this block as C++ code. 

I thought about two variants, both of them don't work:

    # ...
    # first
    - begin: '%\{'
      end: '%\}'
      contentName:
        patterns:
        - include: source.c++ #  that's doesn't work
    
    # second
    - match: '%\{((?:.|\n)*)%\}' # regexpr works correctly
      name: source.c++
      captures:
        '1':
          - include: source.c++ # that's doesn't work too


If someone knows how do that or know some good manual for sublime syntax - say me, please.
  [1]: https://www.google.ru/url?sa=t&rct=j&q=&esrc=s&source=web&cd=5&cad=rja&uact=8&ved=0ahUKEwiUuOXZnuHKAhXDNpoKHep-Cs8QFghAMAQ&url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FFlex_(lexical_analyser_generator)&usg=AFQjCNFt5KoQZ6HIa9Av-WU07RNLb6lBHw&sig2=jaQkTfZBvGt37rckwYXLGw
  [2]: https://packagecontrol.io/packages/PackageDev