aboutsummaryrefslogtreecommitdiffstats
path: root/passes/techmap/libparse.h
diff options
context:
space:
mode:
authorEddie Hung <eddieh@ece.ubc.ca>2019-03-25 13:17:22 -0700
committerEddie Hung <eddieh@ece.ubc.ca>2019-03-25 13:17:22 -0700
commit6b90d3cf6cd433420ed46e0cc31fc71773f3117b (patch)
treeb443709301ab64f909969018c661969f49e1aff3 /passes/techmap/libparse.h
parentbf83c074c82756b1cd23a9c3998b6c4d535dae29 (diff)
parentddc1a4488e9fc10f557e4260df0becbc1cf43f72 (diff)
downloadyosys-6b90d3cf6cd433420ed46e0cc31fc71773f3117b.tar.gz
yosys-6b90d3cf6cd433420ed46e0cc31fc71773f3117b.tar.bz2
yosys-6b90d3cf6cd433420ed46e0cc31fc71773f3117b.zip
Merge remote-tracking branch 'origin/master' into xc7srl
Diffstat (limited to 'passes/techmap/libparse.h')
-rw-r--r--passes/techmap/libparse.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/passes/techmap/libparse.h b/passes/techmap/libparse.h
index cf6325570..c9ebd06c5 100644
--- a/passes/techmap/libparse.h
+++ b/passes/techmap/libparse.h
@@ -46,9 +46,17 @@ namespace Yosys
LibertyAst *ast;
LibertyParser(std::istream &f) : f(f), line(1), ast(parse()) {}
~LibertyParser() { if (ast) delete ast; }
+
+ /* lexer return values:
+ 'v': identifier, string, array range [...] -> str holds the token string
+ 'n': newline
+ anything else is a single character.
+ */
int lexer(std::string &str);
- LibertyAst *parse();
+
+ LibertyAst *parse();
void error();
+ void error(const std::string &str);
};
}