mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 18:23:03 +00:00
(Torturing the Scanner): Add tests for ";|" in a grammar.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# Checking the output filenames. -*- Autotest -*-
|
# Checking the Bison scanner. -*- Autotest -*-
|
||||||
# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
@@ -171,7 +171,7 @@ static int yylex (void);
|
|||||||
|
|
||||||
%%
|
%%
|
||||||
/* Exercise M4 quoting: '@:>@@:>@', @<:@, 1. */
|
/* Exercise M4 quoting: '@:>@@:>@', @<:@, 1. */
|
||||||
exp: '@<:@' '\1' two '$' '@' '{' oline output
|
exp: '@<:@' '\1' two '$' '@' '{' oline output.or.oline.opt
|
||||||
{
|
{
|
||||||
/* Exercise quotes in braces. */
|
/* Exercise quotes in braces. */
|
||||||
char tmp[] = "@<:@%c@:>@,\n";
|
char tmp[] = "@<:@%c@:>@,\n";
|
||||||
@@ -181,6 +181,7 @@ exp: '@<:@' '\1' two '$' '@' '{' oline output
|
|||||||
|
|
||||||
two: '\x000000000000000000000000000000000000000000000000000000000000000000002';
|
two: '\x000000000000000000000000000000000000000000000000000000000000000000002';
|
||||||
oline: '@' 'o' 'l' 'i' 'n' 'e' '@' '_' '_' 'o' 'l' 'i' 'n' 'e' '_' '_';
|
oline: '@' 'o' 'l' 'i' 'n' 'e' '@' '_' '_' 'o' 'l' 'i' 'n' 'e' '_' '_';
|
||||||
|
output.or.oline.opt: ;|oline;;|output;;;
|
||||||
output: '#' 'o' 'u' 't' 'p' 'u' 't' ' ';
|
output: '#' 'o' 'u' 't' 'p' 'u' 't' ' ';
|
||||||
%%
|
%%
|
||||||
/* Exercise M4 quoting: '@:>@@:>@', @<:@, 2. */
|
/* Exercise M4 quoting: '@:>@@:>@', @<:@, 2. */
|
||||||
|
|||||||
Reference in New Issue
Block a user