Analyzing (un)structured data to convert it into a structured, normalized format.

learn more… | top users | synonyms (1)

1
vote
2answers
288 views

How would my custom language be categorized?

I'm developing my own scripting language to solve some unique challenges for a project. The language takes source code and converts the contents into tokens, and then a command factory is used to ...
1
vote
2answers
107 views

Creating documents from snippets [closed]

From time to time I create whole documents (e.g. XML or proprietary) programmatically. If it easy enough, I just write something like stringbuilder.append("<blah>"); ...
1
vote
2answers
324 views

Should I use a formal grammar for my interpreted scripting language

I have a scripting engine I just published as an open source project. It's been sitting on my harddrive waiting for about a year. My engine of course isn't complete in any way, but it does work for ...
1
vote
2answers
153 views

Creating a text input simplifaction tool

I have been working on a project for several months now to write a web-based tool that will help me at work. I work at a call center and the CRM software that is used is wretched, we basically have to ...
1
vote
2answers
131 views

Extracting useful information from free text

We filter and analyse seats for events. Apparently writing a domain query language for the floor people isn't an option. I'm using C# 4.0 & .NET 4.0, and have relatively free reign to use ...
1
vote
1answer
138 views

How do I parse a header with two different version [ID3] avoiding code duplication?

I really hope you can give me some interesting viewpoints for my situation, because I am not satisfied with my current approach. I am writing an MP3 parser, starting with an ID3v2 parser. Right now ...
1
vote
0answers
125 views

Haskell, Rust, or D for POSIX shell implementation? [closed]

I am planning on writing my own Bourne shell. It will be full-featured, capable of being used as a system /bin/sh. The shell will be implemented very differently from other Bourne shells, however. ...
1
vote
1answer
970 views

Using python to parse log files? [closed]

My first useful projects as a programmer has been python scripts that parse out relevant information from log files and do some analysis. I've bumped around and found my way to some functional ...
1
vote
0answers
46 views

Compound container for storing output from a parser

Consider a hierarchical structure like this directory [ [item_0;item_1;...;item_n] [item_0;item_1;inner_directory[...];item_m] other_directory [...] ] ...
1
vote
2answers
172 views

Resources for writing a parser combinator library [closed]

I often use parser combinator libraries, but I've never written one. What are good resources for getting started? In case it matters, I'm using Julia, a functional (but not lazy) language.
1
vote
1answer
214 views

How to read reduce/shift conflicts in LR(1) DFA?

I am reading an explanation (awesome "Parsing Techniques" by D.Grune and C.J.H.Jacobs; p.293 in the 2nd edition) and I moved forward from my last question: How to get lookahead symbol when ...
1
vote
1answer
248 views

Does JAXP natively parse HTML?

So, I whip up a quick test case in Java 7 to grab a couple of elements from random URIs, and see if the built-in parsing stuff will do what I need. Here's the basic setup (with exception handling etc ...
0
votes
3answers
256 views

Do markup languages ​​have the equivalent concept of `semantics` that you can find in C or C++?

Maybe I miss something, but do the so called markup languages have the equivalent concept of semantics that you can find in C or C++? Judging from how you parse the language, you don't really have ...
0
votes
1answer
80 views

Should a structure be refactored into smaller structures?

In one of the projects (in C), I have the code that looks like this (the names are obfuscated specially for question to not give out details of the probject): typedef struct Module_s { /* These ...
0
votes
2answers
206 views

Using a parser to locate faulty code

Lately I've been working a lot in PHP and have run into an abnormally large number of parsing errors. I realize these are my own fault and a result of sloppy initial coding on my part, but it's ...
0
votes
1answer
26 views

Rule order for Parsing Lists with LALR(1)

When creating the grammar for parsing a list (something like “ITEM*”) with a LALR(1) parser, this basically can be done in two ways: list : list ITEM | ; or list : ITEM list | ...
0
votes
2answers
129 views

High-level strategy for distinguishing a regular string from invalid JSON (ie. JSON-like string detection)

Disclaimer On Absence of Code: I have no code to post because I haven't started writing; was looking for more theoretical guidance as I doubt I'll have trouble coding it but am pretty befuddled on ...
0
votes
1answer
217 views

Haskell: Best tools to validate textual input?

In Haskell, there are a few different options to "parsing text". I know of Alex & Happy, Parsec and Attoparsec. Probably some others. I'd like to put together a library where the user can input ...
0
votes
2answers
125 views

Implementing a first basic interpreter: what should I learn first? [duplicate]

I'm about to implement my own very simple programming language, and an interpreter to execute code in that language. The language will be very basic. Example code: var x = 3 if x > 2 print x if x ...
0
votes
2answers
79 views

Storing tokens during lexing stage

I am currently implementing a lexer that breaks XML files up into tokens, I'm considering ways of passing the tokens onto a parser to create a more useful data structure out of said tokens - my ...
0
votes
1answer
820 views

Why nginx's http parser doesnt use regular expressions?

I see the http parser written by Igor Sysoev for nginx does not use regular expressions https://github.com/joyent/http-parser What could be the main reason for such design decision? I guess I could ...
0
votes
2answers
251 views

How to extract operators from the grammar productions for conflict resolution in LALR parser?

Is there some standardized or widely accepted algorithm for picking up operators in shift/reduce conflicts in LALR parser? The question is naive, my problem is not with implementing my solution, but ...
0
votes
2answers
77 views

BNF parsing rule for left associativity

Can someone please assist me with the following question. Write a BNF rule to parse into C -> E C -> E && E C -> E && E && E so that C generates as many E ...
0
votes
2answers
78 views

Large csv's to html report

I am working on a web front end + front end services. I receive good sized csv files (10k lines). My service processes them and condenses them into one larger csv file (up to 300k lines). This ...
0
votes
1answer
141 views

What are known approaches to graphing algebraic expressions?

I am planning to build an expression parser that will be used to graph algebraic functions ( think TI-83 ) with JavaScript. Functions will take the form of f(x)= Aside from typical operators such ...
0
votes
0answers
51 views

Pre-Compilation Processor:

What I want to do: Parse source code, search for a beginning and closing tag of my own definition (one that does not conflict with any defined patterns in the programming language), and then replace ...
0
votes
1answer
49 views

What is latent parsing in NLP?

I'm reading a paper describing a NLP work, and I hardly catch the concept of a term, "latent parsing". Original paper: http://web.stanford.edu/~angeli/papers/2013-acl-temporal.pdf The figure in the ...
0
votes
0answers
32 views

Parsing a website's source [duplicate]

I want to create an application and maybe upload it to the play store but I am not sure if that what my app does is legal or not. I am downloading a page's source from a website to get some ...
0
votes
1answer
142 views

Traversing an AST using Visitors

I'm writing a compiler for a C-like language, and I'm looking for an elegant way to traverse my abstract syntax tree. I'm trying to implement the Visitor pattern, although I'm not convinced that I'm ...
0
votes
0answers
39 views

Dedupe while or after write

I have a summary tool written in python that reads input files, and writes them into a summary file. I have the following stipulations: No duplicates. If it exists, add a count to it. Is it ...
0
votes
0answers
53 views

Using JavaScript to find the correct offset in bundled files

I am currently making multiple parsers using PEGjs and have implemented my own partial preprocessor which using a RegExp finds and replaces '#include' directives with the desired files, resulting in a ...
0
votes
0answers
222 views

Parsing Razor-style Templates

I want to build a template engine (ITT not another template engine...) based on Razor. I've been at it for quite a long time not getting anywhere and quite frankly I'm at my limit. I've tried rolling ...
0
votes
0answers
69 views

Considerations for beginning work on a unified search

I have become interested in creating a unified search for a corporate asset management database. My goal is to allow users to submit queries like: stuff in building 3210 stuff in building 3210 owned ...
0
votes
1answer
142 views

How lookaheads are propagated in “channel” method of building LALR parser?

The method is described in Dragon Book, however I read about it in ""Parsing Techniques" by D.Grune and C.J.H.Jacobs". I start from my understanding of building channels for NFA: channels are built ...
0
votes
1answer
102 views

Making a sldprt to PDB file converter?

I wanted to create a parser that can read a solidworks file and turn it into a protein data bank file. This has already been done in a program called DiamondCAD. ...
-1
votes
2answers
350 views

How do I capture information from a website that doesn't provide an API?

Do you know any good tutorials, frameworks, anything that can help me to write code that captures information from a website that don't have a public API, or hasn't been written in a RESTful way? ...
-1
votes
1answer
620 views

Browser parsers vs Stand-alone parsers

Firefox/Chromium have well implemented(?) parsers. Then why are parsers like lxml and other such parsers being developed with so much effort put into it? Aren't they re-inventing the wheel? Or are ...
-1
votes
1answer
46 views

How to keep AST for feature access?

Consider such code (let's say it is C++) Foo::Bar.get().X How one should keep the AST for this -- as "tree" with root at left Foo(Bar(get(X)), or with root at right (((Foo)Bar)get)X? Or maybe as a ...
-1
votes
1answer
113 views

Suggestion on how to fill a web form (several times) [closed]

I need to fill a form using data from a CSV file. I was planning to use CURL+PHP to do it, but then I realized the form has several steps (one on each page), plus it uses javascript to fill hidden ...
-1
votes
0answers
3 views

convert string to integer does not work for nagative case C programming [migrated]

I have some homework in which the first step is converting the input string into an integer. Example when I input "1 2 3 4" then its output is : 1 2 3 4, or input is: a1b3c 4 then output is 1 3 4. ...
-2
votes
1answer
169 views

What is the right way to parse HTML? [closed]

I've heard, that parsing HTML using the Cthulhu way is not very good. But what are the right ways to parse HTML? Or is it possible to parse it at all?
-2
votes
2answers
79 views

file quantity limit in a directory on a linux file server and why?

What is a good limit to use on the quantity of files in a directory, and why? EDIT: Why shouldn't someone create a system that puts hundreds of thousands of files in the same directory? Why I ask: ...
-3
votes
2answers
285 views

What is the name of a grammar which can change its tokenizer in mid parse?

I was creating a language and discovered that my language tokenizer would have to change depending where in the parse it is. I.e. abc[1] would be parsed as 4 tokens (abc, [, 1, ]), where as { abc[1] ...
-3
votes
1answer
222 views

Best Object Oriented way of parsing a model with several fields(>50) and with null checks

I have a JSON-based data which contains many fields from a particular model. Any value from the list of fields can be null. I am trying to find the best object oriented way of parsing it and also it ...
-4
votes
0answers
25 views

User submitted html pages gripes [closed]

On a particular browser game, users are allowed to create their own presentation pages using basic HTML. The only CSS allowed is via the style attributes of the HTML tags themselves. This rules out ...