Parsing refers to the action by software of breaking an artifact into its constituent elements and capturing the relationship between those elements.

learn more… | top users | synonyms (1)

1
vote
1answer
31 views

Is this a safe way to parse out HTML tag attributes?

I needed a super simple parser to get html attributes and their values. I didn't want to load a big library or anything so i made this. I realize I am making assumptions here, mainly: Attribute ...
2
votes
2answers
33 views

Perl 6: Grammar issues (simple defines)

My goal is to parse defines in Objective-C code: ...
2
votes
1answer
23 views

Parsing playlists efficiently

I have this regexp working, simple, but I feel like it may not be the best way to code it. Basically, I have a playlist separated by line breaks returned as tcp data like so: ...
6
votes
1answer
51 views

Extraction of data from Flickr

I'm crawling Flickr for data for my university research project. However it's very slow and I'm not sure what it is exactly. It could be the FileWriter slowing it ...
5
votes
3answers
87 views

Converting KML/XML to Javascript

So, I have the boundaries of every states in the US, from the google map KML file. This KML file is actually a XML file. I'm converting this file to a JS file compatible with google map in order to ...
4
votes
2answers
47 views

Packaging a single-file Python copy-tool

I'm currently working on a very simple one-file project: Lumix provides the possibility for the camera TZ41 (and others) to load GPS data and tourist information from a DVD to a SD-card so that you ...
7
votes
2answers
187 views

Parsing CSV file with BufferedReader vs Scanner

I have to parse file line by line and in single line I have split by ",". First String would be Name and Second would be count. Finaly I have to display the Key and Count For example ...
6
votes
2answers
69 views

Performance tuning on a text file to object conversion

I'm using an API which returns text in the following format: ...
5
votes
1answer
47 views

Infix-to-postfix parser using Dijkstra's shunting yard algorithm

I've been trying to expand my programming horizons, and have entered the world of grammars and parsing, which I'm brand new to. I have been improving a little implementation of Dijkstra's shunting ...
3
votes
1answer
46 views

Parse XML using Python XML eTree

I am a high school intern, and I am trying to parse my mentor's code so that he can read in an XML file and call simple methods to edit or get information from his XML file. I was hoping someone ...
3
votes
1answer
38 views

Extracting performance statistics from FTP session transcript

I've borrowed and written the following code to output the disconnect time. All works well but I'm curious as to how I could tighten/ shorten the code. If anyone feels like having some fun then I'd ...
9
votes
1answer
65 views

Processing C++ comments

Here's the first functional version of my Python 2 script for processing comments in C++ source files. It's a personal project, I expect to expand it later with more advanced options (mainly about ...
11
votes
2answers
95 views

Parsing Valve Map Files (VMF) into a tree like structure

I've written a small library of objects for parsing of Valve Map Files (VMF). These files are always generated and exported from either the Hammer World Editor, or a Source engine built in map making ...
9
votes
3answers
183 views

Parsing comma-separated floats and semicolon-delimited commands

I wrote a cstring parser. It has to work with a relatively wide amount of arguments (usually 3 or 4, but maybe in future with a different amount), which are ...
3
votes
1answer
36 views

getword that properly handles undersores, string constants, comments, or preprocessor control lines

Our version of getword does not properly handle underscores, string constants, comments, or preprocessor control lines. Write a better version. This is the exercise 6-1 and can be foud on K&R ...
1
vote
2answers
58 views

How to handle JSON's undefined value in a better way?

I'm working on Google Book API to post a book's basic information. I notice that some of the books will always miss a value or two under volumeInfo, like this book ...
3
votes
1answer
84 views

Which approach is preferable string parsing?

I want to find total word count in string. I have two methods as mentioned below. ...
4
votes
1answer
47 views

Library for parsing strings to java types, generic types and collections/arrays

I've done a library that can parse strings to different java types and to List<...>, Set<...>, ...
3
votes
1answer
65 views

Parse needs to be more efficient

I will preface by saying that this data set is much larger than what I have here. I'm having to loop through an XML file to get data and display it on a site with jQuery. I have to use jQuery because ...
7
votes
2answers
380 views

Object Creation during loops

I'm trying to parse a CSV file into objects. I've already got a very efficient CSV parser (SuperCSV). The problem arises when trying to create the object with the data that is being read out. I've ...
1
vote
1answer
85 views

Ruby html href parser working slow

I wrote this simple HTML parser in Ruby. Basically I have a folder that has files. Every file has crawled web pages. The only addition within these files is before the HTML content there is a page ...
5
votes
2answers
66 views

First program with scraping, lists, string manipulation

I wanted to find out which states and cities the USA hockey team was from, but I didn't want to manually count from the roster site here. I'm really interested to see if someone has a more elegant ...
9
votes
2answers
313 views

Math expression solver

Recently I've stumbled upon an interesting challenge for me. You should develop C application, that solves math expressions. Operations such as (+,-,*,/) should be supported, as well as (cos, sin, ...
5
votes
3answers
68 views
4
votes
2answers
58 views

Parsing record-jar format in PHP 5.3

Here is a simple function I wrote to parse record-jar data. I need it in a php5.3 application to validate bcp47 language tags. It converts the language subtag registry among other things, into a ...
3
votes
1answer
34 views

Parsing psql output into multiple files

I wrote the following simple Perl script to read lines from stdin that are the output from a psql call that returns lines of the ...
4
votes
0answers
55 views

Reading Intervals from command line

I want to parse a command line using boost.program_options. Most of my command line arguments will be intervals, which I could implement as something like ...
4
votes
2answers
110 views

Numeric expression parser - calculator

In particular, if someone could describe a better way to go from the tokenized list to the Expression tree, it would be super helpful. I would like to get rid of the casting in the parser but am not ...
3
votes
2answers
90 views

Parsing annotation

I have implemented code for parsing annotation: ...
6
votes
2answers
2k views

Read an input text file and store the tokens in 2 different arrays

I am very new to Java so please ignore if there are obvious mistakes. If my question seems redundant then please guide me towards the correct link. However, I have surfed enough in order to find the ...
2
votes
2answers
493 views

Android AsyncTask, HTTP Request and Parsing

I am working on Android applications for last 2 years and about 80% applications I have developed involve web-services consumption followed by some sort of XML or JSON parsing. Initially, when I had ...
7
votes
1answer
113 views

HTTP Authorization header parser

I'm writing a parser for HTTP Authorization header (see RFC2616#14.8 and RFC2617#1.2). Note that I explicitly don't care about the base64-encoded syntax used by HTTP Basic authentication. I'm only ...
6
votes
1answer
231 views

Speed up CSV reading code (vector of doubles)

I am trying to read a single-columned CSV of doubles into Java with a string header. It is 11 megabytes and takes over 15 minutes to read, which is clearly ...
1
vote
2answers
114 views

node.js library for extracting words from a text

I'm looking for feedback on my library for extracting words from a text: https://npmjs.org/package/uwords The extracted word is defined as sequence of Unicode characters from Lu, Ll, Lt, Lm, Lo ...
15
votes
5answers
1k views

Validating opening and closing bracket pairs

I have refactored one of my old homework assignments (mainly to utilize std::stack and some C++11), and I'm still having trouble making it less repetitive. It ...
3
votes
2answers
65 views

Mixing function parameters, commands and command arguments in Bash functions

I'm trying to write a bash function that will take a command such as xcode-select -v or brew -v that outputs a lot of extra ...
7
votes
5answers
230 views

Reading from text file with RegexMatch

Below is the method that I have written for reading from a text file. While reading, I need to match line string to given regex and if it matches then I need to add the line string to a collection. ...
3
votes
1answer
78 views

Reading and validating 2D matrix bar code

I need a review on this. This code will read a 2D matrix bar code, which I hard-coded as a string str. It has "]d" starting string, which is a GS1 International ...
7
votes
1answer
144 views

getfloat, the floating point analog of getint

Write getfloat, the floating-point analog of getint. What types does getfloat return as its function value? gefloat would also return an integer value. Here is ...
6
votes
1answer
42 views

Loop through JSON and create prefab in Unity3D

I am creating an app in Unity3D and it is my first time coding in C#. I use the following code to parse a JSON file hosted on my server and use the information to render prefabs within my scene: ...
41
votes
11answers
9k views

Nesting versus GOTO: which is better to avoid?

In Java they're not really known as GOTO statements and are rather referred to as Branching Statements, but I find that the former term is a bit more indicative of ...
6
votes
2answers
98 views

Educational “Library” project

The assignment is very open and we have only 4 things it needs to cover: File write and read Use a Struct Export into HTML format use a common sorting algorithm so I've decided to create a little ...
6
votes
1answer
126 views

Parsing function is 50 lines long

This is a parsing function that will at tildes (~) to end of search terms in certain circumstances. Example an inputs and outputs: Input: Output: name:(john doe) ...
7
votes
2answers
237 views

Digit to words converter

This is one of the longest programs I have made with methods and I think I must be doing this rather inefficiently. Any comments to improve would be appreciated. ...
6
votes
3answers
173 views

Coderbyte SimpleSymbols challenge in Javascript

I am working on a CoderByte problem in JavaScript. I have solved the problem below. Although I am trying to figure out if there is an easier way to do it? I am guessing RegEx will come up, although I ...
5
votes
1answer
96 views

How to efficiently parse the data coming from the URL?

I need to parse the data coming from the URL which looks like below - ...
3
votes
1answer
85 views

feedback for exercise 4-11 in K&R

I know that there is one more topic about the exercise 4-11, but the difference is that I solved this exercise and i just need some feedback on my solution. So, I'll explain how it works on an output ...
6
votes
1answer
727 views

Parsing text file in C++

I have a text file that contains name, age, salary, ...
1
vote
2answers
99 views

Is this code efficient for file parsing?

Is the below code efficient for parsing the file, or do I face performance issues? If the latter, please offer suggestions. ...
4
votes
2answers
83 views

Parsing text file content

I asked this question yesterday, and now I have come up with this code: stock.h ...