// Copyright (c) 2024, 2025, Oracle and/or its affiliates.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License, version 2.0,
// as published by the Free Software Foundation.
//
// This program is designed to work with certain software (including
// but not limited to OpenSSL) that is licensed under separate terms,
// as designated in a particular file or component or in included license
// documentation.  The authors of MySQL hereby grant you an additional
// permission to link the program and your derivative works with the
// separately licensed software that they have either included with
// the program or referenced in the documentation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License, version 2.0, for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA

// This file is a test case for the trim_comments.sh tool.
// This does not compile, it just exercies a number of cases where parsing
// out comments is non-trivial.

/* 1 this is a comment and should be removed */

2 this is not a comment; it should be preserved

3 this is not a comment /* 4 this is a comment*/ 5 this is not a comment

/*
6
this
is
a
comment
*/

7 not comment /*
8
multi
line
comment
*/ 9 not comment

"/* 10 this is a string and not a comment; it should be preserved */"

"this is a string \\" /*this is a comment*/ no comment // " comment

"11 this is also a string"

/*"12 this is a comment and not a string; it should be removed"*/

13 '"' /* 14 this is not a string, it is a comment */ '"' 15

16 1'000 "'17 this is a string /* so this is no comment */ because 1'000 is a number" 18 2'000

"19 all \" this /* is */ a \" string ' from // beginning \' to
end"

/*
20
\n
this
"
is
*
a comment
/
and
'
it
\'
should
/*
be
\"
removed
*
/
*/
21

// 22 this is a comment

23 this is no comment // 24 this is a comment /* 25 and this is a comment
26 this is not a comment // 27 this */ 28 is a comment

// \
29 this is a comment too

/// 30 this is a comment

31 this is no comment /// 32 this is a comment /* 33 and this is a comment
34 this is not a comment /// 35 this */ 36 is a comment

/// \
37 this is a comment too
