Is it possible to inject a language inside a injected language? #789
-
Some HDL, such VHDL, Verilog and GDL can be injected with PSL. But PSL have different flavors for each of this language, and PSL grammar uses rules (such expressions) from the injected language. For example a VHDL function call inside a PSL assertion:
Originally, I tried to to add PSL into VHDL grammar. But some PSL keywords (such Currently, I'm writing a PSL grammar with a subset of VHDL grammar, but this means the PSL grammar would only work when injected in VHDL language (but when used in Verilog or GDL). Also. I haven't thought about the issues I will have when writing the highlight queries, what should I have in mind? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Maybe I'm writing the obvious, and for that I am sorry, but simple PSL grammar like the one you mentioned is already embedded in vhdl starting from vhdl-2008. |
Beta Was this translation helpful? Give feedback.
-
Yes, there is no restriction on the depth of nesting for syntax highlighting. Currently, we do things like inject JSDoc within JavaScript within HTML within PHP. |
Beta Was this translation helpful? Give feedback.
Yes, there is no restriction on the depth of nesting for syntax highlighting.
Currently, we do things like inject JSDoc within JavaScript within HTML within PHP.