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)

5
votes
1answer
92 views

Awesome INI Loader

I wrote a simple to use C++ INI file parser. The only thing it requires is the STD libs (of course that come with most major C++ compilers) So far it works very well, and the only thing that needs ...
1
vote
1answer
28 views

Argparse implementation

This is a follow up to Log probe requests of WiFi devices focussing on a specific element of the code. How can I indent this code to make it look great and be well formatted? ...
6
votes
2answers
47 views

Extracting information from a URI

I'm completely new to C and my first project is to create a simple cURL-like HTTP request client... but first, I need to create a function that can parse a URL. I've created this function, and it ...
2
votes
1answer
29 views

Performance of parsing math functions

I wrote the following code as part of a larger application. This code takes a string that defines a mathematical function on such as r,y x[0], x[1] etc. or any ...
4
votes
2answers
56 views

Expression design

I'm designing a Tokenizer / Parser / AST. I'm wondering if this basic idea of an expression is good and if this way of implementing Simplification is good, or should I use something like the Visitor ...
1
vote
0answers
35 views

Parsing a logic formula

I recently made a little program which task is to parse a logic formula (given in conjunctive normal form) I do the parsing with reloaded operator>> but I am ...
1
vote
1answer
28 views

Parsing specifically nested XML Tags

I've written a function that works however I'm sure there is a better way. I need to parse specific tags from an xml document (Microsoft Word docx document.xml). Here is the general structure of the ...
4
votes
0answers
29 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
14 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 ...
11
votes
2answers
82 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
55 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
39 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
34 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
24 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
26 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
176 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
100 views

Parsing /proc/net/sockstat

I have this very simple code which is used to parse values: ...
7
votes
2answers
250 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
44 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
123 views

Optimising single-delimiter string tokenisation

I am trying to optimise my tokenizing of tab delimited strings: ...
6
votes
3answers
175 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
220 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
42 views

Simplifying the code with same list comprehensions

I have such method where: primary_images is dict, additional is ...
3
votes
1answer
35 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
38 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
41 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 ...
3
votes
0answers
76 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
78 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
61 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
78 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
142 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
132 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
52 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
32 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
92 views

Parsing objects from complex String in Java

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

Transposing rows and columns for file contents [closed]

This program transposes rows and columns for file contents: ...
3
votes
3answers
102 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
100 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
58 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
97 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
158 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
72 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. ...