What does \ v and \ r mean? Is it white space?

I take a lexical analysis course, and \t\v\r used in lexer definitions to indicate spaces. What is \v and \r exactly ??

+12
whitespace lexer
source share
2 answers

\t is a horizontal tab, \v is a vertical tab, and \r is a carriage return.

They are certainly a subset of the space characters.

+19
source share

\ 'Single quotation mark (')
\ "Double quotation mark (")
ASCII Bell (BEL)
\ b ASCII Backspace (BS)
\ f ASCII Formfeed (FF)
\ n ASCII Linefeed (LF)
\ N {name} Character name in Unicode database (Unicode only)
ASCII Carriage Return (CR)
ASCII Horizontal Tab (TAB )
\ uxxxx Character with a 16-bit hexadecimal value xxxx (for Unicode only) (1) \ Uxxxxxxxx Character with a 32-bit hexadecimal value for xxxxxxxx (Unicode only) (2)
ASCII Vertical Tab (VT)

+9
source share

All Articles