I have 2 similar grammars. One should process preprocessor directives, another should process all other directives in some syntax. These 2 grammars have some rules in common. I want to create 3 files, one common file, and 2 specific files, and include common file from both specific files.
In ISO EBNF I think it is possible to do with ? ... ? syntax, but is not very convinient.
Antlr allows "Composite grammars" - https://theantlrguy.atlassian.net/wiki/display/ANTLR3/Composite+Grammars
But Antlr's syntax differs from all 3 public standarts (ABNF, ISO EBNF, W3C EBNF)
I have 2 similar grammars. One should process preprocessor directives, another should process all other directives in some syntax. These 2 grammars have some rules in common. I want to create 3 files, one common file, and 2 specific files, and include common file from both specific files.
In ISO EBNF I think it is possible to do with ? ... ? syntax, but is not very convinient.
Antlr allows "Composite grammars" - https://theantlrguy.atlassian.net/wiki/display/ANTLR3/Composite+Grammars
But Antlr's syntax differs from all 3 public standarts (ABNF, ISO EBNF, W3C EBNF)