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)

3
votes
0answers
38 views

Python API for TreeStructInfo - new simple config format

I've created a simple (300 SLOC) API for a new configuration format (I'm not the author of it). Unfortunately, the specification is only in Polish at the moment, but you can see how it looks here. ...
3
votes
1answer
36 views

Reading and Parsing JSON from a Game Server

This is my naive (but currently working) attempt at reading JSON commands from a Java game server in Objective-C. I am afraid I might be doing something wrong, so hopefully this question will be a ...
3
votes
1answer
42 views

Dirty XML-to-JSON parser

I have that XML-to-JSON function based on ElementTree. It looks very simple but until now it does what it's supposed to do: give a JSON description of the ...
3
votes
1answer
59 views

Deserialize an email header into key-value pairs

I've created a function that will deserialize an email header into a list of key-value pairs. I've run numerous tests using MS Office Outlook 2010 and MS Office 14.0 Object Library, all of which were ...
3
votes
3answers
310 views

Parsing and formatting a time two ways (perfectionistic approach)

I'm still not satisfied by the readability of the code. The wanted behavior which would be self descriptive would sound like: "I've two fields; one is for the date and one for the hour. This two ...
5
votes
1answer
61 views

JavaScript path parsing

I was attempting to do some contribution to the underscore-contrib library, and I ended up writing a function that will parse a JavaScript path to later on expose through an API if the path exists or ...
14
votes
2answers
466 views

Lexer+Parser code for my “Reedoo” programming language

I've been working on my own programming language, as a hobby for the past couple of months now, called Reedoo. It is implemented in pure C++ 11 and uses only the libraries that come with C++; no ...
1
vote
0answers
17 views

XML data-parsing design that doesn't sacrifice efficiency [closed]

I have the following method signature ...
9
votes
1answer
59 views

Yet Another Fraction

A recent question inspired me to implement a Fraction class. I decided to write this one in vba, because I like writing tools for the poor souls that still have to ...
8
votes
2answers
77 views

Fixing double arithmetic errors

I am trying to account for the errors in double arithmetic in a C# program I am writing, and came up with this first solution that seems to work well for most cases: ...
2
votes
2answers
48 views

Histogram of length of words in text

This my first real program in python. I welcome harsh criticism. I tried to make it as efficient as possible. Trying to balance speed and readability as well. My program takes a file of text and ...
10
votes
5answers
912 views

Using TryXXX pattern to avoid exceptions

I have been using the TryXXX and GetXXX pattern lately to give clients a choice whether to trap an exception or to read a boolean. An example of this concept would be ...
1
vote
0answers
47 views

A function for parsing words from a string without using whitespace

I'm trying to parse words from a badly garbled text file that contains many repeats. It's about 100k characters in length and was formed from joining many substrings in alphabetical order. I'm ...
3
votes
1answer
17 views

Implementation of *nix ipcalc

I posted a JS subnetting calc before, but I wanted to try a CLI version, so I made this. The parts I'm most worried about are: structure (could I refactor the layout better?) Did I goof any math? ...
4
votes
3answers
239 views

Parsing dates from a webpage

I have two inputs (TextBox) on my front end. The following code parses them from their string representation to aDateTime object. If it fails, it then sets ...
1
vote
0answers
24 views

Extracting country data from HTML tables

I am trying to optimize/improve my coding skills in python The rationale behind this code is to extract some data from files and store them in a dictionary. I tried to comments lines to improve ...
11
votes
2answers
249 views

Markdown to HTML

...
4
votes
2answers
114 views

Serializing data from two URLs in the same object efficiently

This is a follow-up to: Serializing JSON data coming from two URLs in the same object I have two URLs (urlA and urlB) and they ...
2
votes
1answer
62 views

Java Query String Parser

I have written a Query String Parser to Parse a given query string. Is there any enhancement I can do? ...
5
votes
1answer
81 views

Parsing Valve Key-Value files

Introduction Valve recently launched the Dota 2 Workshop Tools, which allows players to create their own maps with custom gamemodes, similar to Warcraft 3 in capabilities. Ability and unit ...
4
votes
2answers
63 views

Evaluating algebra expression using an auxiliary VB class compiled on the fly and consumed in a C# project

I want to create algebra evaluator but I don't want to write my own parser because it takes much time to learn. I don't like algebra expression in C# because it does not look natural compared to VB ...
10
votes
2answers
108 views

Parsing of a (Linux) netlink hotplug uevent packet

The netlink service is used, among other things, to notify userspace about hotplug events (e.g. "a device has been connected"). These events come in the form of packets, which follow the following ...
1
vote
0answers
20 views

Infix epression evaluation

I'm looking for some feedback on my OCaml implementation of some methods to translate infix expressions to postfix and then evaluate them. I'm very new to OCaml, coming from C#/Java and JavaScript ...
5
votes
1answer
78 views

MP4 Parser: Reducing code duplication

I'm developing an MP4 parser. Each class represents each box in MP4 file, and every box class derives from base box class. The problem is that below code is duplicated on every box class: ...
8
votes
2answers
232 views

Serializing JSON data coming from two URLs in the same object

I have two URLs (urlA and urlB) and both the URL gives me a JSON response back in the same JSON format. Below is my JSON string ...
6
votes
1answer
55 views

Splitting plain text dictionary data to multiple files, round 2

This is a continuation of my earlier question. I have a plain text file with the content of a dictionary (Webster's Unabridged Dictionary) in this format: ...
7
votes
2answers
102 views

Splitting plain text dictionary data to multiple files

I have a plain text file with the content of a dictionary (Webster's Unabridged Dictionary) in this format: ...
4
votes
2answers
112 views

Infix to Postfix Converter Program

This is my homework. Kindly help me check it? The instructions are: Implement an infix expression to postfix expression converter. You are to implement the infix to postfix algorithm presented ...
12
votes
3answers
223 views

SQLConnect - A library for connecting Objective-C/Swift applications to Microsoft SQL Server

The complete SQLConnect library can be found here. The file from which the following method belongs can be found here. At some point I may or may not open questions for reviewing other aspects of ...
4
votes
1answer
58 views

Is this a good algorithm to unflat js objects?

I am dealing with a scenario where I get data in the following form: ...
4
votes
2answers
112 views

Parse text file function

This method takes a text file of my work schedule and parses it. It works, but is kind of kludgey, and I'm looking for feedback and suggestions. My first attempt at a file parser, and my first look ...
2
votes
1answer
63 views

Parsing XML to send data into several files

My code works for the most part. (The problems are on the html side not the python side) however I feel it could run quicker or more efficiently. Due to the size of the XML document it parses it's ...
3
votes
2answers
72 views

More efficient conversion of tab-formatted nested data structure to json

I have data that looks like the "Input" below and need to convert it into JSON. My solution works by parsing the text to find a level for each data point. Then I use a recursive structure to build a ...
10
votes
3answers
384 views

Parsing ARP cache in C

How can I make this better? ...
6
votes
2answers
122 views

Simple CSS Parser

I wrote a very simple CSS parser and would appreciate some general feedback regarding the security, code style etc... Basically, this does the following: Take user's uploaded CSS file Save it to ...
6
votes
1answer
81 views

Predictive recursive descent parser for math expressions

I've been learning about language theory and parsing, and decided to write my first parser: a LL(1) recursive descent parser. But actually, it does a little more than just expressions; it can also ...
5
votes
2answers
87 views

Parsing Websites and transferring Data between Objects

I have a DiningHall class that has the 3 properties: openingTime, closingTime, and ...
6
votes
3answers
129 views

Pattern tokenization program

I am writing this program to try and get some practice at C++ and correct and proper styling. This code is meant to take user input from a pip and then run it through the program. The user enters a ...
6
votes
1answer
345 views

How to efficiently parse HTML table using jsoup?

I am trying to parse HTML using "jsoup". This is my first time working with "jsoup" and I read some tutorial on it as well. Below is my HTML table, which I am trying to parse. If you see my table, ...
6
votes
2answers
95 views

Put it in a bucket

You're running a jeans company. Your system is collecting detailed orders' data, but it's a bit archaic and it's storing the number of units ordered per size in a delimited string with 20 "fields", ...
2
votes
1answer
34 views

More idiomatic way to write this Python coordinate parser?

This is a Python 2 script to take in a file in one of two formats (unknown), and standardize it. The data are coordinates in the xy-plane. They represent airfoils in the first and fourth ...
3
votes
2answers
125 views

Parsing arithmetic expressions like (x + y * a + b *z)

I have this code which I wrote to parse arithmetic expressions. However, many people say there are problems with it but don't tell me what the problem is. Please let me know if you see any. Note ...
1
vote
2answers
55 views

Looking for matching names among two text files

I'm trying to enhance the execution speed of my below code. I am using only vanilla JavaScript. I would be willing to bring in additional libraries and plugins as long as they will enhance the overall ...
3
votes
3answers
196 views

Optimize parsing more and more

I have the below C# code for parsing. Do you think this is most optimize or I should use generic method or optimization required in these functions themselves? ...
4
votes
1answer
67 views

XSLT 2.0: Crawl HTML and add links

Background: I have 4 GB of text data dispersed in 250,000 html files. I want to interlink the files with <a> for the reader to click on. I have a 12 MB file ...
3
votes
1answer
172 views

Python script which fetches Amazon product details using its API

This is a script which takes an Amazon URL as input, takes out ASIN/ISBN from the URL, and uses Amazon Python API to fetch details. For this task, I looked at many Amazon URLs and observed the ...
5
votes
2answers
161 views

Short XML parser

This is my first code in C# ever. It compiles and works as intended (not complete), but I want to see what I'm doing right and wrong as a first-timer. ...
4
votes
3answers
68 views

Parsing US address with Clojure

The parser below is not designed for every single US address. I am parsing through a file where each line may or may not be an address. I am more focused on speed rather than robustness. ...
3
votes
1answer
87 views

Parsing Solr log files - version 2

This post is in reference to: Parsing Solr log files I re-wrote most of the code and split it up into a couple of classes. Currently, the class functionality is pretty limited, but I can see that I ...
3
votes
3answers
219 views

CSV reader (revised)

This is the successor of my previous CSV reader. I implemented quite some useful suggestions. I will give explanation on a few parts: Prefixing constant identifiers with ...