As you may already guess, I need some help. I'm currently working on a WPF with a friend, but we have a problem: We need to parse a certain type of text but we have just no idea how to do it. We found Sprache and it seems like a great parser, but we don't know how to use it. Also: English isn't our native language so the introduction article isn't very easy to understand for us.
So we made the decision to ask about it here on Stackoverflow.
The text we want to parse is located in a simple .txt file and looks like this:
focus_tree = {
id = german_focus
country = {
factor = 0
modifier = {
add = 10
tag = GER
}
}
default = no
focus = {
id = GER_autobahn
icon = GFX_goal_generic_construct_infrastructure
x = 0
y = 0
cost = 10
ai_will_do = {
factor = 12
}
completion_reward = {
custom_effect_tooltip = GER_autobahn_tt
hidden_effect = {
64 = {
if = {
limit = { is_controlled_by = ROOT }
add_building_construction = {
type = infrastructure
level = 10
instant_build = yes
}
}
}
59 = {
if = {
limit = { is_controlled_by = ROOT }
add_building_construction = {
type = infrastructure
level = 10
instant_build = yes
}
}
}
60 = {
if = {
limit = { is_controlled_by = ROOT }
add_building_construction = {
type = infrastructure
level = 10
instant_build = yes
}
}
}
54 = {
if = {
limit = { is_controlled_by = ROOT }
add_building_construction = {
type = infrastructure
level = 10
instant_build = yes
}
}
}
}
}
}
(It's from a game called "Hearts of Iron IV" and only a small part of the whole thing)
Could you guys give us a little help or a small hint to start up?
Thanks in advance, Stuffi