java - How to write a parser for haml-like languages? -


I want to write a converter of languages ​​like parser and hackles, want to parse them and convert them to html content. I am / P>

I found that people usually use regular expressions to do this, but we have to write many regular expressions, which is not easy. Is there a device or library to do this? I hope this is Java and easy to use.

And, is there any article about writing such a parser? thank you in advanced!

Regular expressions are usually a poor-parse, not a real-world real parser.

Parsons are usually generated by parser generators. You specify the language in a specification file and the parser generator will convert it into the source code for your parser.


Comments