aboutsummaryrefslogtreecommitdiffstats
path: root/passes/techmap/libparse.h
diff options
context:
space:
mode:
authorJim Lawson <ucbjrl@berkeley.edu>2019-04-01 11:09:12 -0700
committerJim Lawson <ucbjrl@berkeley.edu>2019-04-01 11:09:12 -0700
commitb8dfda876795dbf08bec49ab06ac8603025d2114 (patch)
tree35cd5485c70c17e93426d54a104018bae90ed924 /passes/techmap/libparse.h
parent6d2ea6fe5563205c0f565810d615c4900d4508d8 (diff)
parent22035c20ff071ec5c30990258850ecf97de5d5b3 (diff)
downloadyosys-b8dfda876795dbf08bec49ab06ac8603025d2114.tar.gz
yosys-b8dfda876795dbf08bec49ab06ac8603025d2114.tar.bz2
yosys-b8dfda876795dbf08bec49ab06ac8603025d2114.zip
Merge remote-tracking branch 'upstream/master'
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);
};
}