Thread: Interpreting literal escape sequences from a file...

  1. #1
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708

    Interpreting literal escape sequences from a file...

    I have a generic parser class which I have packaged as an exe. The program opens a configuration file which contains the parsing rules. The problem is when the user tries to define an escape sequence as a token. In a compiler environment this is as simple as

    parser.define("\t");

    But of course the compiler then converts this to the actual ASCII value for me.

    So I am looking for a standardized way to interpret all possible escape sequences as read from the configuration file.

    Any ideas?

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    Aha, thank you. Actually, the more I thought about it, it seems the traditional ones would work just fine, I'll just be sure to include a table along with the program that lists them for the user, for posterity.

    Thanks for the input, Salem.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File being filled with NULLs
    By Tigers! in forum Windows Programming
    Replies: 2
    Last Post: 06-30-2009, 05:28 PM
  2. Formatting a text file...
    By dagorsul in forum C Programming
    Replies: 12
    Last Post: 05-02-2008, 03:53 AM
  3. Need Help Fixing My C Program. Deals with File I/O
    By Matus in forum C Programming
    Replies: 7
    Last Post: 04-29-2008, 07:51 PM
  4. gcc link external library
    By spank in forum C Programming
    Replies: 6
    Last Post: 08-08-2007, 03:44 PM
  5. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 04:54 PM