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
0answers
17 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
23 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
38 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
0answers
38 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 ...
1
vote
0answers
20 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
73 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
115 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
119 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
110 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
31 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
28 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
83 views

Parsing objects from complex String in Java

I want to convert string arrays with following structure: ...
6
votes
2answers
48 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
37 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
53 views

Transposing rows and columns for file contents [closed]

This program transposes rows and columns for file contents: ...
3
votes
3answers
56 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
77 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
55 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
83 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
148 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
54 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
185 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
57 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
58 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
44 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
149 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 ...
9
votes
3answers
112 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
79 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. ...
3
votes
2answers
34 views

Cut float numbers in a stream (putchar, getchar) and in a string

For example, the following row: "a+12.3456-b-0.456789+1.3-45678" will be transformed into "a+12.34-b-0.45+1.3-45678" That is, we need to cut out the figures after the point from the third figure. ...
7
votes
1answer
426 views

Math expression parser in C#

EDIT: Added refactored version 2.0 to the end! I have a parser that is supposed to take a string similar to a math expression and return a Tuple of: An array of strings where each string ...
15
votes
2answers
281 views

A header-only linear-time C++11 PEG parser generator supporting left-recursion and grammar ambiguity

I've rewritten my original parser generator to a header-only library which uses templates and functionals for better type safety and clarity. The generated parser creates an abstract syntax tree which ...
1
vote
1answer
25 views

Refactoring conditions in text parsing method

I am writing a generic text parser and have come up with the following text parsing algorithm, which works fine. I'm wondering how to refactor the following method to make it easily understandable and ...
4
votes
1answer
76 views

Simple attribute parser for HTML

I am studying Java and trying to write an HTML parser, which should parse tag names and attributes. I wrote a class (code below) using the State pattern. This is necessary for my training project, ...
1
vote
0answers
66 views

Parsing PHP-style nested query string parameters

I searched all over for a query string parser that could handle nested parameter names ala parse_str in PHP. I was unable to find anything, so this is what I've ...
2
votes
2answers
62 views

CSV File Parser in Ruby - Attempt No. 2

The following is my second attempt at a basic CSV parser in Ruby. I've addressed suggestions that I've got for my previous version here. I have omitted all test cases - the code listing would be too ...
6
votes
2answers
345 views

The Bucketizer Script

This code is written in a SSIS Script Component that basically accomplishes what I previously had as a T-SQL script, that was reviewed here. I need to split a 80 character string that contains 20 ...
2
votes
1answer
31 views

Printer Color Templates

I'm new to Python and I just wrote my first program with OOP. The program works just fine and gives me what I want. Is the code clear? Can you review the style or anything else? ...
4
votes
1answer
215 views

Combat log parser for World of Warcraft

This is part of a bigger project I'm doing to get better at JavaScript. It's basically the beginnings of a combat log parser for World of Warcraft. It looks a bit messy right now and I could really ...
1
vote
2answers
150 views

Reading columns of a delimited text file

This class reads a delimited text file into String arrays on demand. Delimiter can be any regex. Features include: Read a single column Read a range of columns Read arbitrary columns by providing ...
0
votes
1answer
79 views
2
votes
1answer
35 views

A Java class for reading MaCH dosage files v2.0

Version 2 of A Java class for reading MaCH dosage files ...
3
votes
1answer
60 views

A Java class for reading MaCH dosage files

A dosage file (used in computational genetics) is formatted like this: ...
1
vote
0answers
69 views

Handling hours, minutes, seconds

Basically I wanted to make a generic class for parsing time codes and dealing with small units of time. I have tried to keep it very simple (small API) and 0 dependency (apart from RSpec). Some ...
2
votes
0answers
16 views

URL fetcher and parser for XML feeds

Here is a program that will parse and print XML feed URLs. I want to reuse most of it to add post date to each link. This adds a new concern of CLI and output formatting on top of parsing and (poor) ...
8
votes
3answers
316 views

The stripping extensions

In order to make my life easier with parsing some VBA code, I have written a few extension methods to extend the string type, and put them in this ...
0
votes
0answers
29 views

HTML Tree Parsing in Perl

I finally converted my horrific HTML regex parsing: ...
8
votes
1answer
165 views

Markdown to HTML, again

I made another markdown parser. (original, this one on github). Look, I'm not crazy (sorta), I just like making markdown parsers… ...
23
votes
4answers
3k views

Someone thinks poorly of my server log parser

I have just been informed that the following code written by me is extremely poor. I have absolutely no idea why. It is memory efficient, and looks clean to me. But still the feedback is very poor. I ...
3
votes
2answers
41 views

Ruby infixed math parser

It only does expressions with 2 operands yet, but I'm wondering if there are any ways I can improve this: ...