+/* count the number of lines+columns consumed by this token */
+static inline void l() {
+ int t;
+ for(t=0;t<yyleng;t++) {
+ if(yytext[t]=='\n') {
+ current_line++;
+ current_column=0;
+ } else {
+ current_column++;
+ }
+ }
+}
+/* count the number of columns consumed by this token */
+static inline void c() {
+ current_column+=yyleng;
+}
+
+static trie_t*namespaces = 0;
+void tokenizer_register_namespace(const char*id)
+{
+ trie_put(&namespaces, id);
+}
+static inline tokenizer_is_namespace(const char*id)
+{
+ return trie_lookup(namespaces, id);
+}
+
+static inline int handleIdentifier()
+{
+ char*s = malloc(yyleng+1);
+ memcpy(s, yytext, yyleng);
+ s[yyleng]=0;
+ a3_lval.id = s;
+ if(tokenizer_is_namespace(s))
+ return T_NAMESPACE;
+ else
+ return T_IDENTIFIER;
+}
+
+
+//Boolean {c();return m(KW_BOOLEAN);}
+//int {c();return m(KW_INT);}
+//uint {c();return m(KW_UINT);}
+//Number {c();return m(KW_NUMBER);}