]> git.saurik.com Git - bison.git/blobdiff - src/lex.c
Be kind to translators, save some useless translations.
[bison.git] / src / lex.c
index f0fbf4851d408f11b470745b87d3635a71dfcedf..3a51c9741e84498a6f27761136a6ea3647b61a3b 100644 (file)
--- a/src/lex.c
+++ b/src/lex.c
@@ -15,7 +15,8 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with Bison; see the file COPYING.  If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
 
 
 /*
@@ -270,7 +271,9 @@ literalchar (char **pp, int *pcode, char term)
      so that `\012' and `\n' can be interchangeable.  */
 
   p = *pp;
-  if (code == '\\')  {*p++ = '\\'; *p++ = '\\';}
+  if (code == term && wasquote)
+    *p++ = code;
+  else if (code == '\\')  {*p++ = '\\'; *p++ = '\\';}
   else if (code == '\'')  {*p++ = '\\'; *p++ = '\'';}
   else if (code == '\"')  {*p++ = '\\'; *p++ = '\"';}
   else if (code >= 040 && code < 0177)