From d962dfe48c4aad172952bb6c031b5f327ce1cb0a Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Fri, 27 Jun 2008 17:52:45 -0400 Subject: [PATCH] One or two digit octal escapes are legal --- src/verilog.y | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/verilog.y b/src/verilog.y index 089d6705f..44639b188 100644 --- a/src/verilog.y +++ b/src/verilog.y @@ -1463,8 +1463,12 @@ string V3Parse::deQuote(FileLine* fileline, string text) { } } else { if (octal_digits) { - fileline->v3error("Non-three digit octal escape code (\\###)"); + // Spec allows 1-3 digits octal_digits = 0; + quoted = false; + newtext += octal_val; + --cp; // Backup to reprocess terminating character as non-escaped + continue; } quoted = false; if (*cp == 'n') newtext += '\n';