Parsing refers to the action by software of breaking an artifact into its constituent elements and capturing the relationship between those elements.
2
votes
2answers
47 views
Parsing a single CSV line into a list of strings
I've written this method to replace an older method that was much simpler, but used the regex split method and couldn't tell if a comma was in quotes/brackets/etc. and didn't read double quotes as ...
0
votes
0answers
19 views
Parsing sentences to create a chat bot
I am developing a chat bot with Node.Js. I am trying to find efficient way to parsing sentence.
...
1
vote
0answers
39 views
1
vote
0answers
34 views
Simple, functional URL parsing library in Clojure
I recently wrote some code to handle parsing of URLs, even if those URLs might not be one hundred percent perfectly well-formed. (This constraint made using Java's ...
3
votes
1answer
33 views
Find change in XML and print node
This code has been developed with help on Stack Overflow. It is designed to compare two XML files and print the node for any differences (i.e if a entry appears in A.xml and not B.xml and vice versa).
...
1
vote
0answers
61 views
Page Spider in PHP
I have a working spider, however, it runs fairly slowly thanks to Australia's horrible internet. Can anyone give me some tips on speeding this up?
...
5
votes
1answer
27 views
Using parser_combinators to parse a string
I am playing with Rust, and am trying to write a simple parser.
I need to parse the string:
"0123,456789"
into a stucture:
...
-1
votes
2answers
76 views
Parsing a big text file, extract data & store it in a CSV file
I have a big log file (say 1-3 Gb) which I need to parse, extract data & save it in a CSV file.
Text File Data
...
7
votes
1answer
160 views
Parsing equations from stdin
The program should read equations from stdin, parse them and generate a matrix of the coefficient which represents the system.
Example:
...
4
votes
2answers
56 views
Extracting a number from provided URLs inside a text file
I need to extract a ID (int number) from a Url.
Example: http://www.example.com/foo/bar/12345
For this I wrote 4 methods where the first one ...
6
votes
1answer
113 views
Code Inspection: Procedure not used
Here is yet another piece of Rubberduck code, this time the nasty ProcedureNotUsedInspection class, whose role is to identify all procedures that are never called ...
2
votes
1answer
41 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
57 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
128 views
Extracting a Decimal from a string
I have the following method which extracts a decimal value from a string.
...
3
votes
1answer
72 views
Java 8 file read method
I have a method which extracts filedata and converts it into a String array:
...
16
votes
3answers
840 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
54 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
38 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
68 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
1
vote
1answer
29 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
118 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
34 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
53 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
34 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
61 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
41 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
37 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
52 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
25 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
87 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
87 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
49 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
33 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
44 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
30 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
188 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
134 views
7
votes
2answers
284 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
46 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
143 views
Optimising single-delimiter string tokenisation
I am trying to optimise my tokenizing of tab delimited strings:
...
6
votes
3answers
183 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
252 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
41 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
185 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
41 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
66 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
...