Click here to Skip to main content
15,890,845 members
Home / Discussions / C#
   

C#

 
AnswerRe: Information- Can we change the shape of button from Square to any other Pin
rahulsingi9-Nov-09 1:13
rahulsingi9-Nov-09 1:13 
QuestionFilling a Order Page Pin
Dirso9-Apr-09 3:01
Dirso9-Apr-09 3:01 
QuestionWorkflowMarkupSerializer doesn’t keep positions in a state machine workflow Pin
Win81289-Apr-09 2:53
Win81289-Apr-09 2:53 
AnswerRe: WorkflowMarkupSerializer doesn’t keep positions in a state machine workflow Pin
Win812810-Apr-09 1:40
Win812810-Apr-09 1:40 
Questionregular expressions Pin
xkrja9-Apr-09 1:22
xkrja9-Apr-09 1:22 
AnswerRe: regular expressions Pin
Ravadre9-Apr-09 2:01
Ravadre9-Apr-09 2:01 
GeneralRe: regular expressions Pin
xkrja9-Apr-09 2:16
xkrja9-Apr-09 2:16 
GeneralRe: regular expressions Pin
Ravadre9-Apr-09 3:21
Ravadre9-Apr-09 3:21 
Lets say you have:
<br />
int x; % foo<br />
% bar<br />
x = 5; %x = 5<br />


Your rules:
keyword = 'int'
ident = Everything that starts with _ or letter and has letters,digits,_ after that
comment = Starts with % to newline.

Now you write simple lexer that will scan letter by letter, trying to fit what you have to as many possibilities as you can. When no possibilites are left, you go back one letter, and find first one that fits. So, for our example would be:
buffer:    what it can be:
'i'          int or ident
'in'         int or ident
'int'        int or ident
'int '       nothing. Go back 1 letter
'int'        first rule that fits is keyword int, so it's int
' '          fits nothing from beggining, so ignore it
'x'          fits ident
'x '         fits nothing, go back
...


So generally, you will get lists of tokens, their start and end position, so you just color them Smile | :) .
GeneralRe: regular expressions Pin
xkrja9-Apr-09 3:25
xkrja9-Apr-09 3:25 
QuestionSleep thread Pin
yesu prakash9-Apr-09 1:16
yesu prakash9-Apr-09 1:16 
AnswerRe: Sleep thread Pin
Ravadre9-Apr-09 1:40
Ravadre9-Apr-09 1:40 
GeneralRe: Sleep thread Pin
_groo_9-Apr-09 1:52
_groo_9-Apr-09 1:52 
Questionhow to read COM in C# ---------Please help me Pin
gaurav_quexst9-Apr-09 1:12
gaurav_quexst9-Apr-09 1:12 
AnswerRe: how to read COM in C# ---------Please help me Pin
_groo_9-Apr-09 1:55
_groo_9-Apr-09 1:55 
QuestionGeneric FTP Uploader Pin
p_anant20009-Apr-09 1:05
p_anant20009-Apr-09 1:05 
AnswerRe: Generic FTP Uploader Pin
Eddy Vluggen9-Apr-09 1:17
professionalEddy Vluggen9-Apr-09 1:17 
QuestionPowering down a selected monitor Pin
MarkB7779-Apr-09 0:46
MarkB7779-Apr-09 0:46 
AnswerRe: Powering down a selected monitor Pin
_groo_9-Apr-09 2:47
_groo_9-Apr-09 2:47 
QuestionGet passed milliseconds from Timer [Solved] Pin
Xmen Real 9-Apr-09 0:36
professional Xmen Real 9-Apr-09 0:36 
AnswerRe: Get passed milliseconds from Timer Pin
Rob Philpott9-Apr-09 0:50
Rob Philpott9-Apr-09 0:50 
GeneralRe: Get passed milliseconds from Timer Pin
_groo_9-Apr-09 2:03
_groo_9-Apr-09 2:03 
GeneralRe: Get passed milliseconds from Timer Pin
Rob Philpott9-Apr-09 2:08
Rob Philpott9-Apr-09 2:08 
GeneralRe: Get passed milliseconds from Timer Pin
_groo_9-Apr-09 2:27
_groo_9-Apr-09 2:27 
GeneralRe: Get passed milliseconds from Timer Pin
Rob Philpott9-Apr-09 2:59
Rob Philpott9-Apr-09 2:59 
GeneralRe: Get passed milliseconds from Timer Pin
Luc 6480119-Apr-09 16:24
Luc 6480119-Apr-09 16:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.