• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Syntax Coloring?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Syntax Coloring?


  • Subject: Re: Syntax Coloring?
  • From: Keitaroh Kobayashi <email@hidden>
  • Date: Mon, 24 Aug 2009 22:36:14 -0300

On Sun, Aug 23, 2009 at 9:32 PM, BareFeet <email@hidden>wrote:

> Hi Keita,
>
>  Hello, I'm writing a code editor and so far, i've been using Flex for
>> regex-matching the whole document every time the text is changed and
>> coloring appropriately...
>>
>
> How are you doing this? How did you incorporate Flex or regex-matching?
>

It's terribly inefficient... Each time the text is modified, the whole text
is sent into flex, which parses it into tokens (strings, comments, etc), and
I colorize depending on what kind of token it is... I guess it's a little
hard to describe.

Anyways, I was thinking I could keep the basic flex part, and apply it only
to the changed portions of the text. The problem with that is that I would
have to check for quotes and record what's inside the quote from where the
person started typing... But then that runs into the problem of somebody
just putting their text cursor randomly in a string, etc etc.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Syntax Coloring?
      • From: Rob Keniger <email@hidden>
References: 
 >Syntax Coloring? (From: Keitaroh Kobayashi <email@hidden>)
 >Re: Syntax Coloring? (From: BareFeet <email@hidden>)

  • Prev by Date: Re: applicationWillTerminate: issue
  • Next by Date: Re: authorization services
  • Previous by thread: Re: Syntax Coloring?
  • Next by thread: Re: Syntax Coloring?
  • Index(es):
    • Date
    • Thread