1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-12-23 09:47:22 +02:00

b2/: add C-style comments

This commit is contained in:
Werner Almesberger 2012-04-25 19:37:53 -03:00
parent 45196de62f
commit b3c865e6fd
2 changed files with 9 additions and 2 deletions

View File

@ -1,5 +1,9 @@
<comp> = R<C<L<D;
<diode> = D<SCH<Z<TVS;
/*
* Example hierarchy
*/
<comp> = R<C<L<D; // order doesn't really matter
<diode> = D<SCH<Z<TVS; // D < SCH may make sense, the rest doesn't
T=<comp> {
R: { R=#R TOL=%R };

View File

@ -31,6 +31,9 @@ static int lineno = 1;
"<=" return TOK_LE;
">=" return TOK_GE;
"//"[^\n]* ;
"/*"([^*]|("*"+([^*/])))*"*"+"/" ;
[ \t] ;
\n lineno++;
^#[^n]*\n lineno++;