Thread: helping with code in FLEX

  1. #1
    Registered User
    Join Date
    Nov 2014
    Posts
    4

    helping with code in FLEX

    hi there!
    so i'm studying "compilation" course right now and i got for my homework this question (question number 4):
    http://www.cs.sfu.ca/~anoop/teaching...l-2011/hw1.pdf
    so i got stuck in question number 4 and i don't know how to solve it. i don't understand how can i make a regular expretion that can go over the words for example:
    aa bb ab
    so i need to get "aa bb" as a pair, and also "bb ab" as a pair, so how can i go back and "take" the bb for the second pair?

    this code is needed to be written in flex
    i need help urgent! this hw is need to be submitted this Saturday and that's my last question for this homework.
    hope for any help!

  2. #2
    Registered User Al3's Avatar
    Join Date
    Nov 2014
    Posts
    135
    I am not sure but I think this site is remotely related to C programming (C/C++).

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    There are enough clues in your PDF to at least spend a few days trying things out for yourself.

    And no, it's not urgent at all (fixed).
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by Moran Abilea
    this code is needed to be written in flex
    Moved to Tech Board. Frankly though, you might get a better response elsewhere. As Al3 noted, the primary focus here tends to be on C and C++ (and sometimes C#, heh).
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  5. #5
    Registered User
    Join Date
    Nov 2014
    Posts
    4
    yeah it's urgent i need to submit it on saturday lol
    and it's C code you are all right about that

  6. #6
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    Well nobody's going to do anything for you until you make some effort on your own.

    Read your assignment - step 3 is half of step 4, for those with eyes to see it.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  7. #7
    Registered User
    Join Date
    Nov 2014
    Posts
    4
    i had a lot more question and i've already done them (my assignment is different from the one that i've posted, only question number 4 is the same in my homework)
    i don't know how to make the regular expression for seprating pair of words why don't you understand that?
    for example if you still don't understand what is the problem which i don't know how to do: "aa bb cc" the pairs are "aa bb" "bb cc" when the "bb" is common for both of the string and i need to take this "bb" as considration for the pair of words.
    if someone can show me a the regulat expression for example i can continue with this code, until then i'm stuck and can't continue this question
    i'm not asking for doing my homework that's not the point! i just need help with this specific problem!

  8. #8

  9. #9
    Registered User
    Join Date
    Nov 2014
    Posts
    4
    so what i can see you can search in google my question you are so smart
    can anyone help me instead of laugh at me like i'm noob?
    i just need help with the regular expression! which language i need to talk in order someone will understand this simple asking for help??!?!

  10. #10
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    FFS, you've got enough examples in your given literature to at least have a stab at doing this.

    Cajoling someone into giving you the re won't help you AT ALL when your next assignment comes along and you still have no f'ing clue how to formulate a re to do something.

    Stop whining, wasting time finding other forums to post on, and buckle down to some study, some experimenting and some testing.

    Come back when you have some actual evidence of your efforts to post.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. helping with code in FLEX
    By Moran Abilea in forum C Programming
    Replies: 1
    Last Post: 11-17-2014, 02:19 PM
  2. Helping Hand
    By AMcIntyre in forum C++ Programming
    Replies: 1
    Last Post: 10-19-2009, 05:47 PM
  3. Flex 3 SDK on Kubuntu
    By sean in forum Linux Programming
    Replies: 3
    Last Post: 12-12-2008, 06:41 PM
  4. C and a bit of yacc/flex
    By -EquinoX- in forum C Programming
    Replies: 1
    Last Post: 10-19-2008, 09:24 AM
  5. Anyone interested in helping me out again??
    By xMEGANx in forum C++ Programming
    Replies: 19
    Last Post: 10-04-2007, 01:43 AM