Skip to content

image attribute added

Losicki Mariusz requested to merge image-attribute into master

Abstract tags

Some tags such as Operator appear in the ASTs as Strings (e.g. <operator>+</operator>). To respect the grammar, it should be <operator><PLUS_ASSIGN/></operator>. To solve this issue temporarily I added a image attribute to be able to map those strings to proper tags but, ideally, it should be generated as actual xml tags (unless there's a good reason why it isn't).

Abstract tags: do you need the image tag for the miner? If you really need it, I agree in adding this property and I will change the description of the grammar accordingly.

It's not exactly for the mining part: I needed to parse the ASTs using the given grammar and used this image tag as a temporary fix. In order for the ASTs to respect this grammar, the operators should be replaced by actual tags (e.g. <operator>+</operator> should be <operator><PLUS_ASSIGN/></operator>) because, for example, <InfixExpression>...<operator simplevalue="Operator"/>... expects an Operator not a String.

The 'clean' fix is to update the AST generator and output the actual tags like <PLUS_ASSIGN/>. The 'quick & dirty' fix is this image tag.

Merge request reports