Interpret single line basic scripting code [closed] - regex

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
I've a very big file containing the following data structure, it's a very basic scripting language and I can't get to find a way to interpret or get complete structures for it.
Here's what the structure looks like:
# GAME MAP
00-01: Content={3555}
00-00: Content={1000, 1001, 1002 String="Some text.", 1003, 1004}
01-00: Content={1006, 1005 Amount=5}
02-00: Refresh, Content={1001, 1555 Content={1200, 1001 String="Text"}}
The structure is as follows:
BYTE-BYTE: Data, Content={OBJECT DATA}
OBJECT DATA Can contain other OBJECT DATA which is defined with "Content={}" as seen above, any ideas what can I do to interpret this? Doesn't matter the language I just need to see a way for it. (C# or C++ preferably).

Parenthesized (nested) structure need a grammar to be parsed, a regular expression is not sufficient. (Theorically if you know in advance the max depth you could solve your problem with a regex but it would be quite complicated). Antlr or javaCC (Java) allow you to write parser that can do it.

Related

String conversion to a mathematical expression [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I've written an application that converts a string into a mathematical expression for evaluation. This is done by converting the string into postfix and then by constructing an expression tree and solving it.
Now I want to know though, what is the most efficient way to do conversion into postfix?
Sample expression -
(2+(3*4+(4/(3*(4+6))))) or (3+4) or 3+4
I would suggest you consult Sedgewick's Algorithms, 4th ed. The code from the book for converting arithmetic expressions into postfix form is available from the website.
I suppose this question is about the algorithm, BUT - If I would have to something like that I would use something like BOOST::Python to just exec the string as python code and get the result. I like to avoid writing code, If I can..

data structure project using Avl tree [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
hello everybody Can anyone help me in choosing a project for data structure course final project in c++ my teacher told me to do it using avl tree I just want to ask which project will be useful to do it any management system,like library,banking,etc,which proposal will be best plesae help me I will be very thankful to you :)
Avl trees are used, basically when you want to store information and search for it using quickly from a key.
With this premise, you can use them, for example, in a relational database key search, a dictionary word search, a compiler analizer, etc.

Bindind to keys C++ [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
Hello there I am a realative newbie when it comes to using different "commands" in order to achieve things so I was wondering if any of you know a way to bind a key to do a certain task anywhere in the programme ,so I would be able to display a function for example and after the display finishes the programme carries on normally like nothing happened and then that same key on any other push would still do the display . Thanks in advance
Plain C++ does not have any concept of "key binding". The platform (e.g., the operating system) has this knowledge and it provides some libraries to handle it. So, you must provide more information about the operating system, or use a cross-platform library like Qt.

How is it possible to create an information fetcher for a game like League of Legends? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Basically what I'm wondering is, how could you get like a list of all mobs, champions their hp, mana etc with programming? I know this is possible because it has been done before but I just can't see how you would be able to do this. Is looking in the assembler code necessary or can you do it in some other way? I'm mostly wondering about the theory behind it. (Using C++ if that helps anything at all)
Such things are usually done using crawling (e.g. retrieving the data from the web pages provided by Riot Games; might be partially outdated) or using reverse engineering to get this data from the game client's files (might not contain everything). In either way you'd get datasets which you'll have to read or interpret (look for values or replicate the way the game client reads and interprets the data).
I'm not sure whether there are some tools or APIs released somewhere, at least I haven't heard of anything officially supported or endorsed; most of this is essentially in a gray zone usage wise.

How to read files from a torrent file? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions must demonstrate a minimal understanding of the problem being solved. Tell us what you've tried to do, why it didn't work, and how it should work. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I want to extract information about torrent file like: files names inside it, their sizes ..., is there a C++ library for Linux that help me achieve this easily? or what is the structure of a torrent file and how do I find these information?
You can use the libtorrent library—a feature complete C++ BitTorrent implementation focusing on efficiency and scalability.
If you want to write your own library, there is the official BitTorrent Protocol Specification but it is very poorly written and lacks a lot of details. There is also a much better specification available.