Source code file (Lex)
Lex performs simple transformations but the program’s main purpose is to facilitate lexical analysis. Lexical analysis is the processing of character sequences such as source code to produce symbol sequences called tokens for use as input to other programs, such as parsers.
The X file extension is also used for a file format for AVS image (SDSC Image Tool).
Learn more about X files:
Wikipedia has an entry on X files.
See the Unix FAQ at IT Knowledge Exchange.