I have the following Xtext2 grammar:
Bibliography:
macros += Macro*
;
Macro:
"@string{" name = ID "=" value = LATEXSTRING "}"
;
terminal LATEXSTRING:
'"' (!('"'))* '"'
;
When parsing a the string
@string{ABBREV = "Some Long Text"}
and storing it in some object macro of type Macro it has the following values:
macro.name: ABBREV
macro.value: "Some Long Text"
both of type String (EString). I would like to have the value without quotes though. How can I achieve that?
You have to register a value convert for the rule LATEXSTRING. According to the docs, it should look like this:
with