Skip to content
Snippets Groups Projects
Commit 209ded57 authored by Anders Nilsson's avatar Anders Nilsson
Browse files

Found the darn bug. Turns out you cannot write single-line comments inside...

Found the darn bug. Turns out you cannot write single-line comments inside JavaCC grammar productions, or the generated parser will freak out completely.
parent 1c55b40f
No related branches found
No related tags found
No related merge requests found
......@@ -6,9 +6,9 @@ options {
NODE_PREFIX = "";
JAVA_UNICODE_ESCAPE = true;
STATIC = false;
DEBUG_PARSER = true;
DEBUG_LOOKAHEAD = true;
DEBUG_TOKEN_MANAGER = true;
// DEBUG_PARSER = true;
// DEBUG_LOOKAHEAD = true;
// DEBUG_TOKEN_MANAGER = true;
} // options
......@@ -234,8 +234,8 @@ SPECIAL_TOKEN : /* COMMENTS */
<DEFAULT,BOUNDS> TOKEN : /* OPERATORS */
{
< ASSIGN : "=" >
// | < GT : ">" >
// | < LT : "<" >
| < GT : ">" >
| < LT : "<" >
// | < BANG : "!" >
// | < TILDE : "~" >
// | < HOOK : "?" >
......@@ -285,11 +285,11 @@ SPECIAL_TOKEN : /* COMMENTS */
Start Start() #Start : {}
{
// ("<?xml version=\"1.0\"?>")?
// ComplexElement()
"<" Identifier() ">" "</" Identifier() ">"
("<?xml version=\"1.0\"?>")?
ComplexElement()
{ return jjtThis; }
}
// "<" Identifier() ">" "</" Identifier() ">"
// void Specification() #Specification : {}
// {
......@@ -319,12 +319,12 @@ void AttributeList() #List : {}
(Attribute())*
}
void ComplexElement() #ComplexElement : {} //{Token t;}
void ComplexElement() #ComplexElement : {}
{
"<" Identifier() ">" "</" Identifier() ">"
}
// (">" ElementList() "</" <IDENTIFIER> ">" | ElementList() "/>")
// {jjtThis.setIDENTIFIER(t.image);}
}
void Identifier() #OwlIdentifier : {Token t;}
{
......
......@@ -9,7 +9,7 @@ public class SiarasPrettyPrinter extends Parser {
Start ast = parse(args);
// Dump the AST
// ast.dumpTree(" ", System.out);
ast.dumpTree(" ", System.out);
// File siarasDir = new File("siaras");
......
<VacuumGripper>
<VacuumGripper rdf:ID="Schmalz_FSGA_20_SI-55_M5-AG">
<hasSkill>
<AdjustVacuumToGrip rdf:ID="AdjustVacuumToGrip_16">
<isSkillOf>
<VacuumGripper rdf:ID="Schmalz_FSGPL_200_NBR-55_G1-2-IG">
<hasProperty>
<DiameterOfGripper rdf:ID="DiameterOfGripper_200">
<value rdf:datatype="http://www.w3.org/2001/XMLSchema#float"
>0.0</value>
<isPropertyOf rdf:resource="#Schmalz_FSGPL_200_NBR-55_G1-2-IG"/>
</DiameterOfGripper>
</hasProperty>
<hasSkill rdf:resource="#AdjustVacuumToGrip_16"/>
<hasProperty>
<Material rdf:ID="Material_Perbunan">
<isPropertyOf rdf:resource="#Schmalz_FSGPL_200_NBR-55_G1-2-IG"/>
<value rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Perbunan NBR 55+-5</value>
</Material>
</hasProperty>
<hasProperty>
<MaximumForce rdf:ID="MaximumForce_850">
<value rdf:datatype="http://www.w3.org/2001/XMLSchema#float"
>0.0</value>
<isPropertyOf rdf:resource="#Schmalz_FSGPL_200_NBR-55_G1-2-IG"/>
</MaximumForce>
</hasProperty>
<hasProperty>
<Worm rdf:ID="Worm_22">
<isPropertyOf rdf:resource="#Schmalz_FSGPL_200_NBR-55_G1-2-IG"/>
<value rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Inside</value>
</Worm>
</hasProperty>
<hasProperty>
<WormDiameter rdf:ID="WormDiameter_G1-2">
<isPropertyOf rdf:resource="#Schmalz_FSGPL_200_NBR-55_G1-2-IG"/>
<value rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>G1/2</value>
</WormDiameter>
</hasProperty>
<hasSkill>
<AdjustVacuumToRelease rdf:ID="AdjustVacuumToRelease_1">
<isSkillOf rdf:resource="#Schmalz_FSGA_20_SI-55_M5-AG"/>
<isSkillOf rdf:resource="#Schmalz_FSGPL_200_NBR-55_G1-2-IG"/>
</AdjustVacuumToRelease>
</hasSkill>
</VacuumGripper>
</isSkillOf>
<isSkillOf rdf:resource="#Schmalz_FSGA_20_SI-55_M5-AG"/>
</AdjustVacuumToGrip>
</hasSkill>
<hasProperty>
<WormDiameter rdf:ID="WormDiameter_M5">
<value rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>M5</value>
<isPropertyOf rdf:resource="#Schmalz_FSGA_20_SI-55_M5-AG"/>
</WormDiameter>
</hasProperty>
<hasProperty>
<DiameterOfGripper rdf:ID="DiameterOfGripper_20">
<value rdf:datatype="http://www.w3.org/2001/XMLSchema#float"
>0.0</value>
<isPropertyOf rdf:resource="#Schmalz_FSGA_20_SI-55_M5-AG"/>
</DiameterOfGripper>
</hasProperty>
<hasProperty>
<Material rdf:ID="Material_Silikon">
<isPropertyOf rdf:resource="#Schmalz_FSGA_20_SI-55_M5-AG"/>
<value rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Silikon SI 55+-5</value>
</Material>
</hasProperty>
<hasProperty>
<Worm rdf:ID="Worm_13">
<value rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Outside</value>
<isPropertyOf rdf:resource="#Schmalz_FSGA_20_SI-55_M5-AG"/>
</Worm>
</hasProperty>
<hasSkill rdf:resource="#AdjustVacuumToRelease_1"/>
<hasProperty>
<MaximumForce rdf:ID="MaximumForce_4.7">
<isPropertyOf rdf:resource="#Schmalz_FSGA_20_SI-55_M5-AG"/>
<value rdf:datatype="http://www.w3.org/2001/XMLSchema#float"
>0.0</value>
</MaximumForce>
</hasProperty>
</VacuumGripper>
<!-- <VacuumGripper rdf:ID="Schmalz_FSGA_20_SI-55_M5-AG"> -->
<!-- <hasSkill> -->
<!-- <AdjustVacuumToGrip rdf:ID="AdjustVacuumToGrip_16"> -->
<!-- <isSkillOf> -->
<!-- <VacuumGripper rdf:ID="Schmalz_FSGPL_200_NBR-55_G1-2-IG"> -->
<!-- <hasProperty> -->
<!-- <DiameterOfGripper rdf:ID="DiameterOfGripper_200"> -->
<!-- <value rdf:datatype="http://www.w3.org/2001/XMLSchema#float" -->
<!-- >0.0</value> -->
<!-- <isPropertyOf rdf:resource="#Schmalz_FSGPL_200_NBR-55_G1-2-IG"/> -->
<!-- </DiameterOfGripper> -->
<!-- </hasProperty> -->
<!-- <hasSkill rdf:resource="#AdjustVacuumToGrip_16"/> -->
<!-- <hasProperty> -->
<!-- <Material rdf:ID="Material_Perbunan"> -->
<!-- <isPropertyOf rdf:resource="#Schmalz_FSGPL_200_NBR-55_G1-2-IG"/> -->
<!-- <value rdf:datatype="http://www.w3.org/2001/XMLSchema#string" -->
<!-- >Perbunan NBR 55+-5</value> -->
<!-- </Material> -->
<!-- </hasProperty> -->
<!-- <hasProperty> -->
<!-- <MaximumForce rdf:ID="MaximumForce_850"> -->
<!-- <value rdf:datatype="http://www.w3.org/2001/XMLSchema#float" -->
<!-- >0.0</value> -->
<!-- <isPropertyOf rdf:resource="#Schmalz_FSGPL_200_NBR-55_G1-2-IG"/> -->
<!-- </MaximumForce> -->
<!-- </hasProperty> -->
<!-- <hasProperty> -->
<!-- <Worm rdf:ID="Worm_22"> -->
<!-- <isPropertyOf rdf:resource="#Schmalz_FSGPL_200_NBR-55_G1-2-IG"/> -->
<!-- <value rdf:datatype="http://www.w3.org/2001/XMLSchema#string" -->
<!-- >Inside</value> -->
<!-- </Worm> -->
<!-- </hasProperty> -->
<!-- <hasProperty> -->
<!-- <WormDiameter rdf:ID="WormDiameter_G1-2"> -->
<!-- <isPropertyOf rdf:resource="#Schmalz_FSGPL_200_NBR-55_G1-2-IG"/> -->
<!-- <value rdf:datatype="http://www.w3.org/2001/XMLSchema#string" -->
<!-- >G1/2</value> -->
<!-- </WormDiameter> -->
<!-- </hasProperty> -->
<!-- <hasSkill> -->
<!-- <AdjustVacuumToRelease rdf:ID="AdjustVacuumToRelease_1"> -->
<!-- <isSkillOf rdf:resource="#Schmalz_FSGA_20_SI-55_M5-AG"/> -->
<!-- <isSkillOf rdf:resource="#Schmalz_FSGPL_200_NBR-55_G1-2-IG"/> -->
<!-- </AdjustVacuumToRelease> -->
<!-- </hasSkill> -->
<!-- </VacuumGripper> -->
<!-- </isSkillOf> -->
<!-- <isSkillOf rdf:resource="#Schmalz_FSGA_20_SI-55_M5-AG"/> -->
<!-- </AdjustVacuumToGrip> -->
<!-- </hasSkill> -->
<!-- <hasProperty> -->
<!-- <WormDiameter rdf:ID="WormDiameter_M5"> -->
<!-- <value rdf:datatype="http://www.w3.org/2001/XMLSchema#string" -->
<!-- >M5</value> -->
<!-- <isPropertyOf rdf:resource="#Schmalz_FSGA_20_SI-55_M5-AG"/> -->
<!-- </WormDiameter> -->
<!-- </hasProperty> -->
<!-- <hasProperty> -->
<!-- <DiameterOfGripper rdf:ID="DiameterOfGripper_20"> -->
<!-- <value rdf:datatype="http://www.w3.org/2001/XMLSchema#float" -->
<!-- >0.0</value> -->
<!-- <isPropertyOf rdf:resource="#Schmalz_FSGA_20_SI-55_M5-AG"/> -->
<!-- </DiameterOfGripper> -->
<!-- </hasProperty> -->
<!-- <hasProperty> -->
<!-- <Material rdf:ID="Material_Silikon"> -->
<!-- <isPropertyOf rdf:resource="#Schmalz_FSGA_20_SI-55_M5-AG"/> -->
<!-- <value rdf:datatype="http://www.w3.org/2001/XMLSchema#string" -->
<!-- >Silikon SI 55+-5</value> -->
<!-- </Material> -->
<!-- </hasProperty> -->
<!-- <hasProperty> -->
<!-- <Worm rdf:ID="Worm_13"> -->
<!-- <value rdf:datatype="http://www.w3.org/2001/XMLSchema#string" -->
<!-- >Outside</value> -->
<!-- <isPropertyOf rdf:resource="#Schmalz_FSGA_20_SI-55_M5-AG"/> -->
<!-- </Worm> -->
<!-- </hasProperty> -->
<!-- <hasSkill rdf:resource="#AdjustVacuumToRelease_1"/> -->
<!-- <hasProperty> -->
<!-- <MaximumForce rdf:ID="MaximumForce_4.7"> -->
<!-- <isPropertyOf rdf:resource="#Schmalz_FSGA_20_SI-55_M5-AG"/> -->
<!-- <value rdf:datatype="http://www.w3.org/2001/XMLSchema#float" -->
<!-- >0.0</value> -->
<!-- </MaximumForce> -->
<!-- </hasProperty> -->
<!-- </VacuumGripper> -->
<VacuumGripper>
</VacuumGripper>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment