Written a code that parses through a file reading

Assignment Help C/C++ Programming
Reference no: EM13168429

written a code that parses through a file reading it line by line and splitting it into tokens by white space. But I want a pair of single quotes to be one token, not how many words are in it,

For example I want something like

Done a'ccept command' Done

to be three tokens not four the three bieng

first Done second a'ccept command' third bieng Done.

So far I have

void file_parser::check_quote(tokens<v>) {

boolean has_quote;

for (int i = 0; i <= tokens.size(); i++) {

String temp = tokens.c_str();

for (int i = 0; i <= tokens.size(); i++) {

if (tmp[i] == '\'') {

has_quote = true;

int FirstQuote = i;

}

if (has_quote && i != FirstQuote && tmp[i] == '\'') {

int SecondQuote = i;

for (int k = FirstQuote; k <= SecondQuote; i++) {

}

}

}

}

 

 

Reference no: EM13168429

Questions Cloud

Short memo to the vice-president of production : Write a short memo to the vice-president of production recommending whether the availability of any of the three resources (blending, purification, or labor) should be increased from current levels. If you recommend an increase, specify at most ho..
What are the solute particles present in aqueous solutions : Methanol, CH3OH, is a nonelectrolyte; acetic acid, HC2H3O2, is a weak electrolyte; and ammonium chloride, NH4Cl, is a strong electrolyte. What are the solute particles present in aqueous solutions of each compound? (Select all that apply.)
How many grams of water should theoretically be produced : If 6.01 grams of Nh3 reacts completely, how many grams of water should theoretically be produced?
Shortage of resilience research on canadian aboriginals : Write an essay of 500-750 words. Be sure that you are presenting the concepts in your own words and that you include current information.
Written a code that parses through a file reading : written a code that parses through a file reading it line by line and splitting it into tokens by white space. But I want a pair of single quotes to be one token, not how many words are in it
Show your work for the reduction : Find the complement of F(A,B,C) = AB + ( BC' * A) and reduce it. show your work for the reduction using the axioms of boolean algebra. then, implement the simplified expression using AND,OR and NOT gates
How can we use both karnaugh maps : How can we use both Karnaugh maps and DeMorgan equivalences to better understand systems we build?
Calculate the ph of each of the following solutions : Calculate the pH of each of the following solutions.
What is the mass of the water : A source of energy releases 3000 calories. This changed the temperature of a mass of water from 25 C to 55 C. What is the mass of the water?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a program that fills in an array

Write a program that fills in an array, a, of 25 integers where each element contains the sum of all the previous elements plus 1, e.g., a[0] is 1 and a[3] is equal to a[0] + a[1] + a[2] + 1.

  Write a program that reads numbers

Write a C++ program that reads N positive numbers from the keyboard, calculates and shows the smallest number of all numbers

  Add 10 people to the line

Add 10 people to the line and process them. Each time you process someone, print out their ticket information. After all 10 have been serviced, print the average wait time. Below is an example of the time calls you will need and a wait function.

  Write a complete c++ program

The main program will read in a parameter value n (read this in main). Then it will call a function read2arrays (details below) to read lists of grades into two arrays, which the main program will call test1 and test2 (or some other names of your ..

  Containing all the genes in the dna sequence

As described above plus an integer reference parameter, and return a dynamically-allocated array of strings containing all the genes in the DNA sequence. Each string in the array will contain a unique

  Problems on oops

Problems on OOPS

  Write a bouncing ball video game

The balls bounces within the screen where the two horizontal walls are fixed

  C program to randomly generate more than ten ip address

Write C or C++ program which Randomly generates more than 10 IP addresses written in decimal format and write results in text file (e.g. Dec_IPAddresses.txt)

  Write c program that prompts for variable number of integers

Write a C program that prompts for a variable number of integers, adds them up, averages them, and prints out the average.

  Create class having constructor to recieve two ints

Create a class (in C++)named Card. The class should have two int data members named face and suit.The class should have a constructor that recieves the two ints and uses them to initialize the data members.

  Write a pseudocode statement

Assume that a program has two string variables named str1 and str2. Write a pseudocode statement that assigns an all uppercase version of str1 to the str2 variable. is str.add(str1,str2) part of it?

  Write a program that will read in 5 numbers

Write a program that will read in 5 numbers and add 10 to the first number, 20 to the second number, and 30 to the third number, 40 to the fourth and 50 to the 50th.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd