Results 1 to 7 of 7
Like Tree1Likes
  • 1 Post By SurfMan

Thread: hellp

  1. #1
    jon33 is offline Member
    Join Date
    Oct 2014
    Posts
    2
    Rep Power
    0

    Post hellp

    Help needed to create an Automata state machine in Java
    Hi all,


    letter ( letter | digit )*

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    13

    Default Re: hellp

    Check out the Pattern and Matcher classes in the JDK. They use regular expressions. If you want to write
    your own, the algorithms are the same regardless of the language.

    Regards,
    Jim
    Last edited by jim829; 10-21-2014 at 03:27 AM. Reason: s/Match/Matcher
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  3. #3
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,991
    Rep Power
    8

    Default Re: hellp

    What are your expectations of this forum? You're not going to find someone who will spoonfeed that code to you. At least not here. Show us what you got and where your problems are. Lots of people here will look into that and help you on your way.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  4. #4
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,991
    Rep Power
    8

    Default Re: hellp

    Quote Originally Posted by jim829 View Post
    Check out the Pattern and Match classes in the JDK. They use regular expressions.

    Regards,
    Jim
    And now you have two problems :)
    jim829 likes this.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  5. #5
    jon33 is offline Member
    Join Date
    Oct 2014
    Posts
    2
    Rep Power
    0

    Default Re: hellp

    Thank you

    I need a program written in Java or C ++ to convert Regular expressions Example:
    letter (letter | digit)*
    to the program

  6. #6
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    13

    Default Re: hellp

    First, as SurfMan said, we don't write code here except to occasionally demonstrate a concept. We do help folks try and figure out problems with their own code.

    As for your problem I still don't understand the requirement. Do you want to write a regular expression engine to handle your expression or do you want to employ Java's regular expression support classes to properly parse and evaluate your expression?

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  7. #7
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: hellp

    The answer is probably in that "state machine" bit which has been otherwise ignored in this thread so far. I'm going to make a guess that letting Java classes handle it is not the subject of this assignment.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. hellp
    By assia in forum New To Java
    Replies: 3
    Last Post: 05-13-2013, 01:12 PM
  2. hellp with loops required!!!
    By sr2000 in forum New To Java
    Replies: 1
    Last Post: 11-30-2009, 06:15 PM

Posting Permissions

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