Parsing is the process of analysing a string of symbols, either in natural language or in computer languages, conforming to the rules of a formal grammar.

learn more… | top users | synonyms (1)

5
votes
1answer
52 views

Parsing and plotting complex numbers

I am trying to write a Haskell application that parses a bunch of complex numbers from a Mathematica output and then produces a PPM image. The end product looks like this: The code to create this ...
2
votes
1answer
63 views

Parsing a component of a regex followed by an optional quantifier character

I have a piece of parsec code that parses a unit optionally followed by ?, + or ...
5
votes
1answer
46 views

High performance parsing for large, well-formatted text files

I am looking to optimize the performance of a big data parsing problem I have using Python. The example data I show are segments of whole genome DNA sequence alignments for six primate species. Each ...
10
votes
4answers
778 views

Method to count all comments in single external C# file

I recently had an interview question: Write a method that counts all comments in a single external file. It was a timed question and I wanted to know if this is the best way to accomplish the ...
2
votes
1answer
65 views

File parser to extract data from text file

I am trying to extract the data from input file and store it for plotting. I have tested this code for a few files of same format. I am not sure if the code works correctly with the little change in ...
2
votes
3answers
142 views

Reading a configuration file

I have written the following C code to parse a configuration file for settings to my program. I denote comments with a # and blank lines are allowed. e.g.: ...
10
votes
2answers
90 views

Processing command line parameters

This code works, but I'm curious what feedback you have about style and doing things in a more "pythonic" way. ...
6
votes
1answer
52 views

Convert Bitmap Font to Texture Atlas

I wanted to render the textures that comprise a bitmap font glyph onto the screen directly as an Image in libGDX. When you make a bitmap font using a program (such ...
1
vote
0answers
37 views

Parsing span library

This is a Python library for efficiently tracking span information while parsing source code, and generating errors on those spans. I intend to use it in my rewrite of mypy's Python parser to add ...
0
votes
2answers
43 views

Function that check's file type based on certain keywords

I have a function that breaks up a source file and checks each token against a keyword list to determine whether its a particular file type. How can I improve this function? ...
4
votes
1answer
47 views

XML parsing in Java using SAX parser

I have started learning XML parsing in Java (currently reading Java & XML by Brett McLaughlin). Here is my first program to parse XML using SAX parser. Please review the code and let me know if ...
10
votes
2answers
97 views

File parser convert to node data and neighbouring relational data

I have been working on a file parser that takes a very specific file format and parses it into a list that is arranged into node data and the neighbors that it relates to. I am new to Python (this is ...
7
votes
1answer
45 views

Python XML parsing, extraction and renaming files

I've written some code to: Parse an XML file. Extract some strings. Make copies of the original XML whose names are suffixed with the extracted strings. Please review this. ...
5
votes
1answer
74 views

Rust language tag implementation

language-tags is my first crate, it is hosted on GitHub and I uploaded it to Crates.io. It parses language tags like en-US into useful parts, like language and ...
6
votes
1answer
65 views

Templated Tokenizer Functions

I wanted to be able to tokenize a few different containers so I created a generic way to do it. I originally wrote this in Visual Studio 2012, but I had to modify it to get it to compile on Ideone. ...
4
votes
1answer
39 views

Find allele frequencies at each site for each iteration for each population from FASTA file

The script takes a FASTA format file in input and outputs the frequencies of each amino acid (A, C, ...
2
votes
2answers
65 views

Parsing a text file of node data into Nodes and Edges

I'm a fairly new developer (well, engineer really, but currently working on a software project). In the Android project I'm working on, I read a node representation of a map into my app and interpret ...
8
votes
3answers
71 views

Calculating bytes of code

I am new to Perl and I wrote this Perl script to calculate bytes of code and lines of code in a directory. I want to know if there are any improvements that can be made to it. ...
4
votes
3answers
356 views

Parsing huge data coming from a URL

I need to parse the data coming from the URL which looks like this: ...
8
votes
2answers
115 views

Parsing a simple tuple “(float,float,float)” in c++11 iostreams

I spotted this tutorial example at compactcpp: #5 – Parsing strings into “tokens” ...
5
votes
2answers
148 views

Script that parses the Chase.com page for my recent payments

I wrote this code earlier to parse Chase.com's online transactions page. It's written in WinForms. stepBtn is a button that starts this. ...
4
votes
1answer
55 views

Parsing a string to an object

I have this string containing this block of code: ...
2
votes
2answers
50 views

Structure of parser in Clojure

I'm working on my first Clojure project, which is a parser. Since it's my first project I'm unsure of many aspects, from my general approach to solving this problem to the small implementation ...
2
votes
1answer
66 views

Decode an alarm keypad message

In my efforts to learn the Swift language, I am trying to mix in a pet project along with my learning of the basic language syntax. In essence, i'm trying to write an iOS keypad application to work ...
5
votes
1answer
55 views

Dynamic length binary data parsing

I am currently writing code for a UART communication in my firmware. I am getting an interrupt every byte received (meaning I don't get a chunk of data, 1 byte at a time but, in the sample below I ...
2
votes
2answers
42 views

Email log parser

This code parses mail server log files and outputs statistics into an external file. Is there a way to make it more pythonic? Is it a good idea to use regex anywhere? Which libraries can reduce the ...
3
votes
3answers
299 views

Parsing multiple line records using Java 8 Streams

There was a suggestion in this StackOverflow question to move this question here. I added some more information and restructured the question a bit. I'm trying to parse the following file which ...
1
vote
1answer
53 views

Finite state machine for CSV data

I want to read a file containing comma-separated values, so have written a finite state machine: ...
4
votes
1answer
61 views

Create Java object from from page content or plain text

My job is to make a specified java objects from web page that contains following text: Companies: ...
0
votes
2answers
76 views

Unique combinations of sets with N min selections of overall set

I'm in the process of attempting to write a parser compiler. In this, sets play a major role. I'm in the 'lexical ambiguity' isolation phase, and to that, I need to yield a set of every possible ...
4
votes
0answers
107 views

RSS parser for Node.JS

I would like someone review this code and tell if it can be done better, or if the code is elegant and simple enough for the task at hand. I used code climate and I got 4/4 and my test coverage is ...
2
votes
1answer
50 views

Parse a string as a list of words and parse characters

I'm trying to create a list from a string with items alternating between words and parse characters like ['Hello', ' ', 'World'] Is there a built in function, ...
1
vote
1answer
93 views

Parsing a file for an Android device

I am trying to parse InputEvents of an Android device. Background: For an android device we have a utility getevent ...
1
vote
1answer
92 views

Parsing video files from a given directory

I have written a little class that is basicly looking for video files in given directory and then parsing some info about those files. Finally it saves everything in a list. To properly run this you ...
2
votes
1answer
67 views

Parsing oscilloscope data, follow up

Follow-up up on Parsing oscilloscope binary data. I wrote a simple parser for Tektronix's internal file format .isf. I revised my code to the following: ...
6
votes
3answers
104 views

Parsing oscilloscope binary data

I wrote a simply parser for Tektronix's internal binary file format .isf. The code is supposed to read in the file and return the header data as well as the actual ...
4
votes
1answer
119 views

Boolean expressions from infix to postfix notation using Dijkstra's Shunting Yard algorithm

I began working on a Java library that receives a boolean expression such as not A and (B or not C), compiles it to a circuit of logical gates \$\mathcal{C}\$, ...
2
votes
0answers
56 views

Organising loops for parsing a text file

The following code is from a utility I've written for myself. It takes a file in this format: ...
3
votes
1answer
59 views

Updating geo coordinates

An error in a live environment was detected when trying to convert string geo coordinates into a double. The current culture (hu-HU) uses comma instead of point ...
7
votes
1answer
706 views

A little integer parser vs clean code

I was said to post this as a new question. I improved my code from: Little part of the string to integer parser vs Clean Code However I think that it break SRP as it parses, iterates through string ...
4
votes
3answers
167 views

Little part of the string to integer parser vs Clean Code

I started reading a Clean Code book and some other articles on the Internet about OOD and design patterns and I'm a little confused. I've started to code a little string to integer parser which ...
10
votes
1answer
136 views

Injecting the Maharajah into the Barbarous Child's introduction

I'm building a random text generator! My idea was to borrow slightly from the string.Format method styling, have a "format string" that controlled the overall ...
6
votes
2answers
426 views

Writing an IRC Bot from scratch

I have been learning C# for a couple years now, and using small projects to help myself learn. My most recent project is a complete rewrite of my first C# project that just got out of hand (the old ...
5
votes
0answers
51 views

Expressing Rebol Dates in BNF

I'm looking to define the Rebol date format in BNF notation (as adapted for Rebol Parse). I'd like as best as possible to only define valid dates—at least those that are valid in Rebol at the moment: ...
3
votes
1answer
82 views

XML parsing program in C++

This is my code which works and compiles but I feel it may be non-optimal, especially the tag mapping and use of the if command. It reads two .xml files and finds ...
3
votes
3answers
106 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 ...
1
vote
2answers
86 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
1answer
118 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
47 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). ...