School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!
Welcome to Dream.In.Code
Become an Expert!

Join 340,132 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 3,937 people online right now. Registration is fast and FREE... Join Now!



lexer python

lexer python Rate Topic: -----

#1 srk619  Icon User is offline

  • New D.I.C Head
  • Pip
  • Group: New Members
  • Posts: 5
  • Joined: 04-April 09


Dream Kudos: 0

Posted 04 April 2009 - 07:33 AM

hi,

as im new to python i dont how to do this question can some help me out, the question is:

Write a lexer to read in decimal numbers. Think hard about how to do this. If your input is
the following string: “12345.9876” what do you have to do to each character in the string
to generate your float? How are the numbers before the decimal point different to the
numbers after the decimal point? Make sure you have an algorithm that works correctly
on paper before you start coding and draw a state transition diagram for the scanning part
of your lexer.

i noticed on the website you guys have code snippets so can some point me into the right dirrect of code or if some has already answer this question plz show their post so that i can get an idea
Was This Post Helpful? 0
  • +
  • -


#2 Nykc  Icon User is offline

  • Gentleman of Leisure
  • Icon
  • View blog
  • Group: Author w/DIC++
  • Posts: 6,979
  • Joined: 14-September 07


Dream Kudos: 375

Posted 04 April 2009 - 08:55 AM

Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Please post like this:

Thank you for helping us helping you.
Was This Post Helpful? 0
  • +
  • -



Fast Reply

  

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month