Commit 1afaf270 authored by René Schöne's avatar René Schöne
Browse files

Fix parser for NTAToken with implicit (String) type.

parent 95d16c44
......@@ -70,11 +70,11 @@ Component component =
| ID COL s_type_use.u STAR {: return new ListComponent(ID, u); :}
| s_type_use.u STAR {: return new ListComponent(u.getID(), u); :}
// Opt
| LBRACKET ID COL s_type_use.u RBRACKET {: return new OptComponent(ID, u); :}
| LBRACKET s_type_use.u RBRACKET {: return new OptComponent(u.getID(), u); :}
| LBRACKET ID COL s_type_use.u RBRACKET {: return new OptComponent(ID, u); :}
| LBRACKET s_type_use.u RBRACKET {: return new OptComponent(u.getID(), u); :}
// NTA list
| SLASH ID COL s_type_use.u STAR SLASH {: return new NTAListComponent(ID, u); :}
| SLASH s_type_use.u STAR SLASH {: return new NTAListComponent(u.getID(), u); :}
| SLASH ID COL s_type_use.u STAR SLASH {: return new NTAListComponent(ID, u); :}
| SLASH s_type_use.u STAR SLASH {: return new NTAListComponent(u.getID(), u); :}
// NTA opt
| SLASH LBRACKET ID COL s_type_use.u RBRACKET SLASH {: return new NTAOptComponent(ID, u); :}
| SLASH LBRACKET s_type_use.u RBRACKET SLASH {: return new NTAOptComponent(u.getID(), u); :}
......@@ -83,7 +83,7 @@ Component component =
| SLASH s_type_use.u SLASH {: return new NTAComponent(u.getID(), u); :}
// NTA Token (same as NTA)
| SLASH LT ID COL s_type_use.u GT SLASH {: return new NTATokenComponent(ID, u); :}
| SLASH LT s_type_use.u GT SLASH {: return new NTATokenComponent(u.getID(), u); :}
| SLASH LT ID GT SLASH {: return new NTATokenComponent(ID, new SimpleTypeUse("String")); :}
// Token
| LT ID COL type_use.u GT {: return new TokenComponent(ID, u); :}
| LT ID GT {: return new TokenComponent(ID, new SimpleTypeUse("String")); :}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment