/* $NetBSD: lex_ident.c,v 1.7 2023/06/04 19:28:54 rillig Exp $ */ /* * Test lexing of word-like tokens, such as keywords, identifiers, numeric * constants, character constants, string literals. */ /* * Conceptually, backslash-newline is replaced with nothing, in a very early * stage of the translation, see C11 5.1.1.2p1, item 2. Indent does not * preserve these; in most cases, they are simply removed. */ //indent input in\ t \ var\ iable; int no_backslash; // $ Test long identifiers, to cover the code that expands a buffer first to // $ more than 400 bytes and then to more than 1400 bytes. struct long_tag_name_to_overflow_the_token_buffer_4567890\ 12345678901234567890123456789012345678901234567890\ 12345678901234567890123456789012345678901234567890\ 12345678901234567890123456789012345678901234567890; struct long_tag_name_to_overflow_the_token_buffer_4567890\ 12345678901234567890123456789012345678901234567890\ 12345678901234567890123456789012345678901234567890\ 12345678901234567890123456789012345678901234567890\ 12345678901234567890123456789012345678901234567890\ 12345678901234567890123456789012345678901234567890\ 12345678901234567890123456789012345678901234567890\ 12345678901234567890123456789012345678901234567890\ 12345678901234567890123456789012345678901234567890\ 12345678901234567890123456789012345678901234567890\ 12345678901234567890123456789012345678901234567890\ 12345678901234567890123456789012345678901234567890; //indent end //indent run int variable; int no_backslash; struct long_tag_name_to_overflow_the_token_buffer_4567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890; struct long_tag_name_to_overflow_the_token_buffer_45678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890; //indent end /* This is a syntax error; see lex_word. */ //indent input int identifier\n; //indent end //indent run int identifier \ n; //indent end