mirror of
https://github.com/ralsina/tartrazine.git
synced 2024-11-13 23:12:24 +00:00
22 lines
851 B
XML
22 lines
851 B
XML
|
|
<lexer>
|
|
<config>
|
|
<name>BBCode</name>
|
|
<alias>bbcode</alias>
|
|
<mime_type>text/x-bbcode</mime_type>
|
|
</config>
|
|
<rules>
|
|
<state name="root">
|
|
<rule pattern="[^[]+"><token type="Text"/></rule>
|
|
<rule pattern="\[/?\w+"><token type="Keyword"/><push state="tag"/></rule>
|
|
<rule pattern="\["><token type="Text"/></rule>
|
|
</state>
|
|
<state name="tag">
|
|
<rule pattern="\s+"><token type="Text"/></rule>
|
|
<rule pattern="(\w+)(=)("?[^\s"\]]+"?)"><bygroups><token type="NameAttribute"/><token type="Operator"/><token type="LiteralString"/></bygroups></rule>
|
|
<rule pattern="(=)("?[^\s"\]]+"?)"><bygroups><token type="Operator"/><token type="LiteralString"/></bygroups></rule>
|
|
<rule pattern="\]"><token type="Keyword"/><pop depth="1"/></rule>
|
|
</state>
|
|
</rules>
|
|
</lexer>
|