CSS2.1 grammar includes strong consulting so as not to parse CSS directly in this way, "because it does not express conventions , only CSS 2.1 syntax.
Indeed, any parser that ignores these parsing conventions (as we tried to do), encounters problems when working with pages containing errors or unknown constructs.
Therefore, we would like our ANTLR CSS2.1 parser, which currently does not comply with cross-compatibility and error handling compatibility conventions, to somehow use the parse tree generated by the underlying grammar, which includes parsing conventions. (Perhaps the latter could have been created by another ANTLR parser.)
Is this a smart approach? Are there any well-understood methods for doing this?
Again, the goal is to create a robust CSS2.1 parser that intelligently handles errors and new constructs in accordance with CSS parsing conventions.
source share