Answer the question
In order to leave comments, you need to log in
How to correctly describe the cs grammar to my syntax?
Here is an example of my syntax:
@style default {
colors{
baseColor:#00FF00;
exColor:#00AA00;
}
dims{
blockPadding:5dp
}
}
@style dark:default {
colors{
baseColor:#0000FF;
}
}
block {
color:@colors.baseColor;
padding:@dims.blockPadding;
}
newblock:block{
width:100%;
height:100%;
padding:@colors.exColor;
}
<style> ::= "@style" " " <word> <block>
<extend> ::= <word> ":" <word>
<class> ::= (<word> | <extend>) <block>
<block> ::= "{" <assign>* "}"
<number> ::= <digit> | <number> <digit>
<assign> ::= <word> ":" <word> ";"
<word> ::= <symb> | <word> <symb>
<symb> ::= ([0-9] | [a-z])+
<digit> ::= [0-9]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question