aboutsummaryrefslogtreecommitdiffstats
path: root/passes/techmap/libparse.h
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2019-03-25 14:47:33 +0100
committerGitHub <noreply@github.com>2019-03-25 14:47:33 +0100
commit2bb96329444be71f21934906d4b9d357fe4c1fb6 (patch)
tree2b6d8d6dce700ff20065a7311b0a1f7de71333c6 /passes/techmap/libparse.h
parentccfa2fe01cffcc4d23bc989e558bd33addfea58e (diff)
parent1f7f54e68eb201976ddd42cb906492bf9e611030 (diff)
downloadyosys-2bb96329444be71f21934906d4b9d357fe4c1fb6.tar.gz
yosys-2bb96329444be71f21934906d4b9d357fe4c1fb6.tar.bz2
yosys-2bb96329444be71f21934906d4b9d357fe4c1fb6.zip
Merge pull request #897 from trcwm/libertyfixes
Liberty parser: Accept ranges [A:B], and ignore missing ';'.
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);
};
}