User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Computer Science and Software Design section within the Software Development category of DaniWeb, a massive community of 391,555 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,635 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Computer Science and Software Design advertiser:
Views: 1277 | Replies: 3
Reply
Join Date: Mar 2006
Posts: 12
Reputation: a.baki is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
a.baki a.baki is offline Offline
Newbie Poster

Help Regular Expressions

  #1  
Mar 27th, 2007
How can I write regular expressions(REs) for any language that are syntactically correct.

For example, Turkish has two classes of vowels — front and back. Vowel harmony states that words may not contain both front and back vowels. Therefore, most grammatical suffixes come in front and back forms, e.g. Türkiye'de "in Turkey" but kapıda "at the door".
front = { a, ı, o, u }
back = { e, i, ö, ü }

And how can I draw a Finite Automato for these REs

Can anyone give me simple examples.
I will try to write regular expression for the whole grammar of language and than write the code in C. But need some starting point.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2005
Posts: 4,663
Reputation: iamthwee is just really nice iamthwee is just really nice iamthwee is just really nice iamthwee is just really nice 
Rep Power: 16
Solved Threads: 297
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Industrious Poster

Re: Regular Expressions

  #2  
Mar 27th, 2007
Why would you need regex. I can think of a way to do that without it.
Member of: F-ugly code club

Join today don't delay!
Reply With Quote  
Join Date: Mar 2006
Posts: 12
Reputation: a.baki is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
a.baki a.baki is offline Offline
Newbie Poster

Re: Regular Expressions

  #3  
Mar 28th, 2007
I supposed to do so.
Reply With Quote  
Join Date: Jun 2005
Location: Troy
Posts: 1,276
Reputation: Rashakil Fol has a spectacular aura about Rashakil Fol has a spectacular aura about 
Rep Power: 7
Solved Threads: 36
Colleague
Rashakil Fol's Avatar
Rashakil Fol Rashakil Fol is offline Offline
Salamander Man

Re: Regular Expressions

  #4  
Mar 28th, 2007
Write one with three states: one for where it hasn't seen any vowels yet, one for where it's seen front vowels, and one for where it's seen back vowels. And a failure state if it has to be a deterministic FA. I'll leave the edges to you.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Computer Science and Software Design Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Computer Science and Software Design Forum

All times are GMT -4. The time now is 9:39 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC