Hello!
I have posted this on Stackoverflow but it has not gathered much
attention as it is very specialized. Maybe you guys can help me out.
Here is the post
http://stackoverflow.com/questions/36009923/syntax-highlight-for-tricore-linker-group-statement
in case you wish to answer there.
I'm trying to define a syntax highlight file for the tricore linker
script languale (LSL)
A short exceprt of the given EBNF to demonstrate the problem:
I have marked all literals with a * since in this EBNF the muliplicity
is given by the 0|1 or >=0 annotations. < > indicate optional
arguments.
group_name must be a quoted string.
group_descr ::= group* <group_name>0|1 <(* group_specs )*>0|1 section_statement
group_specs ::= group_spec <, group_spec >>=0
group_spec ::= group_alignment
| attributes
| copy*
| nocopy*
| group_load_address
| fill* <=* fill_values>0|1
| group_page
| group_run_address
| group_type
| allow_cross_references*
| priority* =* number
| tag
section_statement ::= simple_section_statement ;
| aggregate_section_statement
simple_section_statement ::= assignment
| select_section_statement
| special_section_statement
| memcopy_statement
aggregate_section_statement ::= {* <section_statement>>=0 }*
| group_descr
| if_statement
| section_creation_statement
So it all boil down to there not being a proper start and end
expression I can use when creating a `syn region`. Further a group can
contain another group.
I don't know how to proceed here.
If I use `syn match lslGroupStart +group "\S\+"+` I don't know how to
tell vim to highlight `\S\+` differently than `group`. If I use
`nextgroup` I don't know how to make sure that the ordering is kept
(`group_specs` after `group_name`).
Thank you for your time and help.
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment