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)

4
votes
0answers
17 views

Crawling and parsing meteorological data from the web into R

I am interested in collecting directly into R data published by the Mexican Met-office. The data pieces are spread through several URLs, but one can start here. There I can get the names and ...
3
votes
0answers
13 views

Generation and parsing of English numerals (cardinal and ordinal)

I need to use the English numerals (American) in Haskell, so I looked for a library that did it. I have not found one, therefore I developed the program that I am presenting here. There are actually ...
8
votes
0answers
52 views

HTML/XHTML/XML tokenization

I want to write a library to parse any valid or invalid HTML-like things. First of all, I am trying to build a lexer. Here is what I did; ...
2
votes
0answers
43 views

PDF-to-JSON converter

I've created some methods to help me convert PDF to text and then text to a JSON object. I've never done this before and I'm using this exercise as a way to improve my knowledge of Ruby. The ...
1
vote
1answer
34 views

String PathParser

I'm trying to decide if I should put time into refactoring this tiny class. PathParser only uses string locally and every other method is used by an outside class. ...
1
vote
0answers
19 views

Implementing `repsep` Parser

I wrote the following repsep parser. It consists of (where ~ means followed by) and + ...
3
votes
1answer
33 views

Serialization: Step 2 YAML Parser

After this question, the next part. Coding to the same interface as the previous question: Note: Since not every system has libyaml installed, the config script tries to detect its existance and ...
1
vote
1answer
23 views

Reading HTTP response from UART

I'm using a Telit GE864-GPS modem, which runs a dialect of Python 1.5.2. The Python module has access to the modem using a buffered UART, which may still be receiving when reading starts. The ...
1
vote
1answer
39 views

Partial implementation of parsing a config-file and command line options

I need to be able to accept some options from either the command-line or a config-file. This code is a snippet of the class that I am working on, I cannot post the entire class here. This code works, ...
3
votes
1answer
24 views

Parsing a Dialogue Script - fixing my 620 line mess

Given a Dialogue Script for SDT (NSFW! Google at own risk), parse said dialogue script for validation with checkers. A dialogue script consists of a set of lines. There's a special line, ...
0
votes
0answers
12 views

Writing Parser for JSON String [migrated]

As part of trying to write a JSON Parser, I'm working on parsing a JSON String value. Given the following definition from Prof. Brent Yorgey's Haskell course: ...
4
votes
3answers
167 views

Parsing a string of the form “key1=value1;key2=value2;” into a Hash

I need to parse the following input string into a hash table with the following format: Input: '1001=23;1001B=5;1002=0;1003=5;' Output: ...
3
votes
1answer
93 views

Parsing /proc/net/sockstat

I have this very simple code which is used to parse values: ...
7
votes
2answers
237 views

Identifying which paragraph, if any, is a superset of all words in a document

Description need to find out the paragraph number which is containing all the words in the file. input file java.txt What is a JVM? What is the most ...
2
votes
1answer
42 views

Method for parsing floats and adding totals

My intention is to create a nice DRY method (add) which will take care of parsing floats and adding totals internally and will be called by other methods. I feel ...
4
votes
5answers
120 views

Optimising single-delimiter string tokenisation

I am trying to optimise my tokenizing of tab delimited strings: ...
6
votes
3answers
173 views

Code Generator Generator

I've created a code generator generator, which is hosted here. I need its parser portion reviewed for OOP, OOD, and C++ best practices. gengenparser.h ...
6
votes
2answers
207 views

Rubberduck VBA Parser, Episode VI: Return of the Abstraction

VBA comment syntax is fun... and VBA line continuation makes it even more fun. Picture a VBA module like this: ...
1
vote
1answer
41 views

Simplifying the code with same list comprehensions

I have such method where: primary_images is dict, additional is ...
3
votes
1answer
34 views

Parsing a long without using inbuilt function parseLong

I came across it as a problem to solve. What kind of limitations are there? ...
5
votes
2answers
180 views

Constructing a class from a line in a parameter file

I've got a problem where I need to parse a line in a parameter file of the form PotentialName [... variable number of parameters] I've got code which works ...
4
votes
0answers
37 views

Extending Exceptions with module-specific prefix, intended for parsing error reporting

For one of my [WIP] project, I extended the dictionary class a lot with specific handlers, as such I determined that I wanted KeyError and ...
1
vote
1answer
35 views

Parse a config-file and add to command-line-arguments using argparse in Python

I am trying to parse the command line arguments using argparse, and if the user specifies a yaml file for the config-file, add those arguments to the args from argparse ...
2
votes
0answers
61 views

Pure Python script that saves html page with all images

Here is pure Python script that saves html page without CSS but with all images on it and replaces all hrefs with path of image on hard drive. I know that there are great libraries like ...
6
votes
1answer
71 views

Rubberduck VBA Parser, Episode V: The ANTLR Strikes Back

I changed my mind. I don't want to implement 200-some Node classes. Instead, I'll be working directly with the ANTLR generated classes, to implement the Rubberduck ...
3
votes
2answers
57 views

IRC Server Response Parser for IRC Client

I wrote a parser for the IRC RFC 2812 spec and would like input on my use of the strategy pattern for this. I created an IrcMessage class that is responsible for ...
5
votes
3answers
77 views

Ini file parser project

I would appreciate any opinions and critiques anyone has on my code. My code allow you to read a ini file. parser.c ...
10
votes
2answers
125 views

Of Procedures and Variables: never enough nodes

Building on my ANTLR tree listener, I'm now starting to see how the whole thing is coming together. As I proceed to implement the numerous Node classes I'm going ...
12
votes
1answer
138 views

Rubberduck VBA Parser, Episode IV: A New Hope

My home-made wannabe-a-parser was wet behind the ears, so I started seriously looking into more mature alternatives, and ended up adding a dependency to the ANTLR lexer/parser generator tool, and ...
5
votes
1answer
128 views

Parsing travel duration data

I'm trying to parse an estimated travel duration and distance between two waypoints using Google Directions API. Tap on this to see an example of data received. ...
1
vote
0answers
46 views

Node.js log parser for mongoDB

I have developed a log parser, the goal is to take whatever log type I can, and convert them in a mongoDB collection. I think I've done a pretty good job at reading whatever type of log are trhown at ...
2
votes
1answer
31 views

Parsing DAG from text

This module allows to parse indented text file into Map from node to child nodes identified by Coordinate. This module seems way ...
0
votes
1answer
87 views

Parsing objects from complex String in Java

I want to convert string arrays with following structure: ...
6
votes
2answers
54 views

Extensible Abstract Log Reader

My goal with the following code is to provide an extensible class that can be extended in order to read log files and transforms them into meaningful output. I'd like to have comments about the code ...
2
votes
1answer
39 views

Writing Read instances for HList

I'm a total newbie at parsing, so I figured I'd start by writing instances of Read for HList, which does not currently have ...
18
votes
8answers
1k views

Optimize custom double.parse()

In my company's code, they use double.tryParse() which is quite good but sets too much security for our needs. As we sometimes have to parse a few billion strings, ...
1
vote
1answer
67 views

Transposing rows and columns for file contents [closed]

This program transposes rows and columns for file contents: ...
3
votes
3answers
89 views

CR2 raw image file parser in Python 3

I haven't used Python in a number of years, but recently started working on a project called Photoshell which is written in Python 3. As I attempted to learn the "Pythonic way", I wrote a parser for ...
3
votes
3answers
96 views

Using namedtuple for slice of class

I am working with very large datasets in a distributed environment. In particular, I am writing some code in Python for analyzing web logs in Spark. Because of the nature of Map-Reduce computing and ...
2
votes
1answer
57 views

Efficient byte sequence detection

I seek the assessment of which code block is more efficient in Java at detecting the byte sequence of 00 00 00 01 and ...
4
votes
0answers
95 views

Representing arithmetic in Rust or C++

I need a method to represent basic arithmetic to help me better understand context-free grammar, so I wrote these. Am I writing it the right way? Is there anything that can be improved? Rust ...
3
votes
3answers
154 views

Improvement of a regular expression pattern

I created this script to take informations "at-the-moment" of this site: Pictures of name channel Name of channel Pictures channel Times Title Type My script ...
1
vote
2answers
66 views

Parse File or String input in a uniform way: Is it possible with Generics?

I have a Parser class which creates a collection of String pairs, parsed in the format key=value. ...
12
votes
2answers
189 views

My recursive parser is wet behind the ears (well, it's not DRY at least)

I have an issue opened on GitHub since mid-November, to refactor & DRY up the Rubberduck Parser module (the idea is to model the code in a VBA project or code ...
3
votes
2answers
62 views

Basic XML Parser

A while back, I posted an XML Writer. Today I have finished what I hope to be a solid XML parser that, while not professional, will get the job done. To start, I do use a stack on one part of the ...
2
votes
1answer
61 views

Text formatting with embedded markup for terminal output

I'm learning Rust. I wrote the following library to format text and output it to terminal, so that the formatting markup is embedded with the string itself (looks similar to HTML4). I feel the code ...
4
votes
1answer
46 views

String parsing/stripping code

I am mostly interested in how the parse_string function could be improved. But any comments on my test strategy also welcome. The input is a string which can be ...
13
votes
2answers
159 views

I think I might be having a regex nightmare

I've been working on the Rubberduck (an add-in for the VBA Editor /"VBE"), specifically here the VBA.Parser namespace. Here's how I ended up implementing the syntax ...
10
votes
3answers
126 views

Making kexec reboots less painful

kexec is a way for a Linux kernel to directly boot another Linux kernel without going through the usual BIOS startup sequence, which can take several minutes on enterprise servers. The big problem ...
4
votes
1answer
100 views

Parsing Lua 5.2 strings with patterns

I wrote some code to parse Lua 5.2 strings in Lua 5.1, using patterns. It's a bit too slow, but it works fine as far as I tested. ...