mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 07:13:02 +00:00
* src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
['"/] too eagerly. * tests/input.at (Torturing the Scanner): New.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Checking the output filenames. -*- Autotest -*-
|
||||
# Copyright 2002 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -20,6 +20,31 @@ AT_BANNER([[Input Processing.]])
|
||||
|
||||
# Mostly test that we are robust to mistakes.
|
||||
|
||||
|
||||
## ----------------------- ##
|
||||
## Torturing the Scanner. ##
|
||||
## ----------------------- ##
|
||||
|
||||
AT_SETUP([Torturing the Scanner])
|
||||
|
||||
AT_DATA([input.y],
|
||||
[[%{
|
||||
/* This is seen in GCC: a %{ and %} in middle of a comment. */
|
||||
const char *foo = "So %{ and %} can be here.";
|
||||
%}
|
||||
/* %{ and %} can be here too. */
|
||||
|
||||
%%
|
||||
exp: 'a';
|
||||
]])
|
||||
|
||||
AT_CHECK([bison input.y])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
|
||||
|
||||
|
||||
## ------------ ##
|
||||
## Invalid $n. ##
|
||||
## ------------ ##
|
||||
|
||||
Reference in New Issue
Block a user