2024-04-07 23:20:57 +02:00
|
|
|
================================================================================
|
|
|
|
Empty comment
|
|
|
|
================================================================================
|
|
|
|
|
2024-04-08 09:41:25 +02:00
|
|
|
//
|
2024-04-07 23:20:57 +02:00
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
2024-04-08 09:41:25 +02:00
|
|
|
(line_comment))
|
2024-04-07 23:20:57 +02:00
|
|
|
|
|
|
|
================================================================================
|
|
|
|
Single comment
|
|
|
|
================================================================================
|
|
|
|
|
2024-04-08 09:41:25 +02:00
|
|
|
// This is a comment
|
2024-04-07 23:20:57 +02:00
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
2024-04-08 09:41:25 +02:00
|
|
|
(line_comment))
|
2024-04-07 23:20:57 +02:00
|
|
|
|
|
|
|
================================================================================
|
|
|
|
Multiple comments
|
|
|
|
================================================================================
|
|
|
|
|
2024-04-08 09:41:25 +02:00
|
|
|
// This is a comment
|
|
|
|
// This is a second comment
|
2024-04-07 23:20:57 +02:00
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
2024-04-08 09:41:25 +02:00
|
|
|
(line_comment)
|
|
|
|
(line_comment))
|
2024-04-08 09:48:10 +02:00
|
|
|
|
|
|
|
================================================================================
|
|
|
|
Empty block comment
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
/**/
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(block_comment))
|
|
|
|
|
|
|
|
================================================================================
|
|
|
|
Whitespace block comment
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
/* */
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(block_comment))
|
|
|
|
|
|
|
|
================================================================================
|
|
|
|
Block comment
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
/* This is a comment */
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(block_comment))
|
|
|
|
|
|
|
|
================================================================================
|
|
|
|
Block comment with slashes
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
/* /// */
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(block_comment))
|
|
|
|
|
|
|
|
================================================================================
|
|
|
|
Block comment with asterisks
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
/* *** */
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(block_comment))
|
|
|
|
|
|
|
|
================================================================================
|
|
|
|
Block comment is not recursive
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
/* /* */
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(block_comment))
|
|
|
|
|
|
|
|
================================================================================
|
|
|
|
Unterminated comment
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(ERROR))
|
|
|
|
|
|
|
|
================================================================================
|
|
|
|
Comment end-delimiter only
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(ERROR
|
|
|
|
(UNEXPECTED '*')))
|