Parser programming in C

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • arunraj2002in
    New Member
    • Jun 2007
    • 22

    Parser programming in C

    i want to write a C program which counts commented line, uncommented line and blank lines .
    Basically a parser programming in C?
  • sicarie
    Recognized Expert Specialist
    • Nov 2006
    • 4677

    #2
    Originally posted by arunraj2002in
    i want to write a C program which counts commented line, uncommented line and blank lines .
    Basically a parser programming in C?
    That's not a parser program, you just want to count lines.

    It's easy: open the file. While !eof getline, increment counter. Close file.

    Comment

    • arunraj2002in
      New Member
      • Jun 2007
      • 22

      #3
      Originally posted by sicarie
      That's not a parser program, you just want to count lines.

      It's easy: open the file. While !eof getline, increment counter. Close file.
      It will be helpful if u can give me an idea how to proceed atleast..

      Comment

      • sicarie
        Recognized Expert Specialist
        • Nov 2006
        • 4677

        #4
        Originally posted by arunraj2002in
        It will be helpful if u can give me an idea how to proceed atleast..
        I did, read it again.

        Comment

        Working...