xinmeng / metahdl

Language for simplifying parameterized RTL design
8 stars 1 forks source link

Support comments and shape reserving #7

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Comments in MetaHDL source are dropped in generated code, and code are 
re-formatted. Users want to keep those comments and code shape (indentation, 
new line, spaces, etc.) in generated code.

Original issue reported on code.google.com by zin...@gmail.com on 11 Aug 2012 at 3:41

GoogleCodeExporter commented 9 years ago
Treat white spaces, new lines, comments and indentations as “padding 
elements”, and pass them from lexer to pasers via a global variable. Every 
terminal or non-terminal has pre/post (both or either? to avoid duplicated 
texts, think about it) padding element that will be output to generated code 
literally. 

This feature should be configurable (On/Off). How to co-exist with current 
formatting system?

Original comment by zin...@gmail.com on 11 Aug 2012 at 3:41

GoogleCodeExporter commented 9 years ago

Original comment by zin...@gmail.com on 11 Aug 2012 at 3:46