CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2013
    Posts
    8

    making a text editor

    when making a text editor do you have to create a parser for it or are parsers just used in compilers and interpreters?

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: making a text editor

    What kind of "text editor" are you going to make?
    What is wrong for you in using already existing ones?
    What is the "parser" about to do?
    What is the "interpreter" about to do?
    What is the "compiler" about to do?
    Victor Nijegorodov

  3. #3
    Join Date
    Oct 2013
    Posts
    8

    Re: making a text editor

    a text editor like notepad.
    I just wanted to understand how input is received as character codes and then translated into drawing characters on the screen.
    Would you need to make a parser in that case or is it unnecessary ?

  4. #4
    Join Date
    Apr 1999
    Posts
    27,449

    Re: making a text editor

    Quote Originally Posted by icealys View Post
    when making a text editor do you have to create a parser for it or are parsers just used in compilers and interpreters?
    Seriously, if you really are trying to make a text editor, the first thing you shoud do is research the topic of building a text editor. There are many articles written over the decades on the methods used to construct such a utility.

    I have no idea why you're asking about "parsers", "compilers" or "interpreters" with respect to editing text.

    Regards,

    Paul McKenzie

  5. #5
    Join Date
    Apr 1999
    Posts
    27,449

    Re: making a text editor

    Quote Originally Posted by icealys View Post
    a text editor like notepad.
    I just wanted to understand how input is received as character codes and then translated into drawing characters on the screen.
    You don't need to study an editor to know these things -- these are low-level, but basic operations of a terminal-based system (i.e. your computer, screen, and keyboard). How does the command-prompt work when you type in characters at the C:\ prompt?

    Regards,

    Paul McKenzie

  6. #6
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: making a text editor

    Parsers are used where parsers are needed. For a simple text editor, I wouldn't think so, but it could depend on what features you want to implement.

    You can find source code for a word processor by following the links here.

    http://msdn.microsoft.com/en-us/libr...=vs.90%29.aspx
    Last edited by GCDEF; October 24th, 2013 at 06:27 PM.

  7. #7
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,234

    Re: making a text editor

    Here is how to make a simple text editor in less than one minute. Just in case you won't to reinvent the wheel.
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured