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)

2
votes
1answer
33 views

Two error-reporting conventions for a command-parser

I need to implement some function and I would like to report about a fail made inside a function. If function doesn't fail I need to get a some result (for example, ...
3
votes
1answer
47 views

Program for compacting other given code

I've just finished a small function that will reduce the size of code as much as possible without breaking anything. Obviously it makes everything a bit unreadable so it's not really for cleaning the ...
2
votes
2answers
114 views

Extracting a Decimal from a string

I have the following method which extracts a decimal value from a string. ...
3
votes
1answer
61 views

Java 8 file read method

I have a method which extracts filedata and converts it into a String array: ...
15
votes
3answers
809 views

Who's using what where - turning code into symbols

The Rubberduck project is coming along pretty nicely, and for the next version the parsing strategy is getting yet another revision, and this time around it really feels like it's done right. Or is ...
3
votes
1answer
51 views

Checking referential integrity of a database schema

I am using PHP PDOs to parse the results I am receiving from MySQL queries against a database. I am now running into an issue with running out of allocated memory. Are there any suggestions on ...
2
votes
1answer
37 views

Python function to strip inline repr'd unicode strings

I have to write a python function that takes a string that contains raw unicode strings (e.g. "u'hello' there") and transform it into a string that strips the ...
2
votes
1answer
60 views

C++ program that recognizes a context-free language

This program (C++) was for a class project. A program that recognizes a given context-free language by implementing a pushdown-automaton (PDA). The PDA recognizes the following language: S → $T$ ...
3
votes
2answers
66 views

Parse a list of people to determine who likes someone

I have a data file that looks like this: ...
1
vote
1answer
26 views

Parsing logs in sed efficiently

I have an application which log file has most lines start with a time/date, followed by a debugging level and the actual log message. Often I want to watch the output live and colors make it a lot ...
5
votes
1answer
115 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
31 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
51 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
31 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
59 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
38 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
33 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
41 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
22 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
86 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
66 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
41 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
21 views

Implementing `repsep` Parser

I wrote the following repsep parser. It consists of (where ~ means followed by) and + ...
3
votes
1answer
43 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
25 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
43 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
28 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, ...
4
votes
3answers
181 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
120 views

Parsing /proc/net/sockstat

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

Optimising single-delimiter string tokenisation

I am trying to optimise my tokenizing of tab delimited strings: ...
6
votes
3answers
180 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 ...
7
votes
2answers
242 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
38 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
182 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
40 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
51 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
93 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
92 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
76 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
85 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
128 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
160 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
136 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
64 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
34 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
106 views

Parsing objects from complex String in Java

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