Questions tagged [parsing]
Analyzing (un)structured data to convert it into a structured, normalized format.
22
questions with no upvoted or accepted answers
4
votes
0
answers
91
views
Truncating HTML content at specific content blocks
I have HTML content in my DB and I would like to present a list of these individual items but truncate each of them so they're not fully displayed. I would like to keep truncated items human-...
3
votes
0
answers
55
views
Parse track meet output file result
I am building out a parser for a well-known track & field meet management software output file (sample output).
I can parse this manually, and put items into my object model (overview below), but ...
3
votes
0
answers
100
views
Loop Unfolding and Named Significant Bits
I've been writing a Parser Compiler for the last seven or so years, and I recently got to the point (yet again, never satisfied) of structuring the portion dealing with the portions of the language ...
2
votes
0
answers
308
views
What obstacles should I expect in building universal Abstract Syntax Tree's manipulation tool?
I am trying to build code generation and transformation tool and hence I need software for Abstract Syntax Tree manipulation for at least three languages (Coq, Haskell, Java). So far I have managed to ...
2
votes
0
answers
344
views
Implementing semantic actions in table driven predictive parsing
When doing table driven predictive parsing on an LL(1) grammar, (as explained in good detail here for example), how can we augment the algorithm to allow processing of semantic actions while doing the ...
1
vote
0
answers
75
views
Is there a easy and useful error handling algorithm for bottom-up based parser?
My English skill is poor because I'm not a native English speaker.
Please understand.
I wonder that there is a error handling algorithm easy and useful in LR parser.
LR Parser is bottom up based so it ...
1
vote
0
answers
154
views
Concurrently parsing records in a binary file in Go
I have a binary file that I want to parse. The file is broken up into records that are 1024 bytes each. The high level steps needed are:
Read 1024 bytes at a time from the file.
Parse each 1024-byte "...
1
vote
0
answers
2k
views
Calculating uncompressed file size without uncompressing file in zlib
I am writing a python program which parses zip (currently only zlib, using DEFLATE compression) files and verifies the correctness of their headers and data. One of the things I'm trying to achieve is ...
1
vote
0
answers
5k
views
Best practices to parse a log file using Python
I'm writing a Python tool to parse a log file from game server. The log file is of format:
ms:classname::id::method::arg1::arg2....
There are a lot of classes, and a lot of methods for each class, ...
1
vote
0
answers
84
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 ...
1
vote
0
answers
53
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
1
answer
768
views
What is a lattice parser?
My friend asked me for help with his task: "Redeem a lattice parser with any programming language" - the problem is that he can't clearly explain me how the lattice parser should work. I've tried to ...
0
votes
0
answers
152
views
What is it about kdb/q that makes the grammar not suitable for ANTLR style parser generators?
I want to build a code analysis tool for personal use when programming in kdb/q.
In order to do this, I need to be able to parse q code into an AST. I have never written a parser before. ANTLR4 seems ...
0
votes
0
answers
221
views
How can you multithread an html parser [ in C++ and similar languages ]?
Ive done two HTML parsers.
Done with Regular Expressions [that accounted for nesting]. It was quick, but error prone.
Done by evaluating Character by Character through switches. Here was the basic ...
0
votes
0
answers
424
views
Parsing custom if statement input in PHP
I'm working on a feature where users can get data based on the if statement they write. The if statement looks something like the excel's conditionals.
Basic syntax:
IF ( lhs == rhs, ifTrue, ifFalse)...
0
votes
0
answers
49
views
Which components of an HTML Element, can I assume will be static over the course of its lifetime?
This is a question for people who are familiar with how HTML typically is built and behaves on webpages.
Backstory and requirements
I am building an HTML tracker with a C++/Qt backend. I am trying ...
0
votes
0
answers
94
views
Parsing nested structure from facebook pfff - how to decide on parser
I'm playing around since a while with building a little open source project based on the output of facebooks pfff tool, that can parse multiple programming languages and output some kind of unified ...
0
votes
0
answers
136
views
LALR parsing (with Ply) non-deterministic and sometimes fails
I have written a parser using Python Ply library.
While doing tests with an input file I have noticed a strange behaviour : sometimes the input is correctly parsed with no error and sometimes, there ...
0
votes
0
answers
965
views
Writing Z80 table based assembler/disassembler
I have a long-term project: DIY computer with various processors. One of my wishes not only make hardware, but software too.
So I started from assembler/disassembler for Linux, though there is a lot ...
0
votes
0
answers
906
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
1
answer
480
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. http://www.zyvex.com/Research/...
-2
votes
1
answer
159
views
Multiple variable declaration, multiple variable assignment, context-sensitive 'in' statement
Lately I've been playing with writing my own programming language, following the excellent Crafting Interpreters book but I've hit something of a snag.
I'd like to extend the parser to accept ...