grammars-v4
grammars-v4 copied to clipboard
new Grammer
hello can you adding yml
grammer?
grammar YamlGrammar;
yaml: document+;
document: key_value_pairs EOF;
key_value_pairs: key_value_pair
| key_value_pairs key_value_pair;
key_value_pair: key ':' value;
key: STRING;
value: STRING
| NUMBER
| BOOLEAN
| list
| key_value_pairs;
list: '[' value (',' value)* ']';
STRING: '"' ~["]* '"';
NUMBER: ('-'? [0-9]+ '.' [0-9]+);
BOOLEAN: ('true' | 'false');
WS: [ \t\r\n]+ -> skip;
COMMENT: '#' ~[\r\n]* -> skip;
@kaby76 I wrote an example and even compiled it with a jar file, it looks good, of course you know better, you can publish it with a little change because I am not a good grammar writer.
Hi! Couldn't you please do it by yourself using a pull request to the repository?
Hi! Can't you do it by yourself using a pull request to the repository?
I do it in the evening, I just have to install termux, it takes a few minutes