As far as I understand there is syntax flags only for comment delimiters made up of two characters but if I have comment delimiters of length greater than two characters is it possible to change syntax table accordingly? And if not, how can I resolve this kind of situation? Just change colors and indentation of comment block and forget about syntax table?
So in case if someone seeks for an answer, as @DoMiNeLa10 suggested, I looked in html-mode and ruby-mode and realised that we can set
syntax-propertize-function which is
intended to be used by major modes to install a function which applies syntax-table properties in some mode-appropriate way.
So it would be something like this:
(setq-local syntax-propertize-function (syntax-propertize-rules ("complex regexp comment-start" (0 "< b"))) (syntax-propertize-rules ("complex regexp comment-end" (0 "> b"))))
In case if regexp contains some groups you need to precise which group to use starting with 1 (0 is reserved for whole expression).