Exemplo n.º 1
0
Arquivo: vhdl.c Projeto: Fordi/geany
static void findTag (vString *const name)
{
	int c = '\0';
	vhdlKind kind;
    vStringCopyToLower (Keyword, name);
    kind = (vhdlKind)lookupKeyword (vStringValue (Keyword), Lang_vhdl);
    if (kind == K_UNDEFINED)
	{
		c = skipWhite (vGetc ());
		vStringCopyS(Lastname,vStringValue(name));
			if (c == ':')
			{
				c = skipWhite (vGetc ());
				if (isIdentifierCharacter (c))
				{
					readIdentifier (name, c);
					vStringCopyToLower (Keyword, name);
					lookupKeyword (vStringValue (Keyword), Lang_vhdl);
					kind = (vhdlKind)lookupKeyword (vStringValue (Keyword), Lang_vhdl);
					if (kind == K_PROCESS || kind == K_BLOCK || kind == K_PORT)
					{
						makeSimpleTag (Lastname, VhdlKinds, kind);
					}
				}
			} else {
				vUngetc (c);
			}
	}
	else
	{
		if (kind == K_SIGNAL) {
			while (c!=':') {
				c = skipWhite (vGetc ());
				if (c==',')
					c = vGetc ();
				if (isIdentifierCharacter (c))
					tagNameList (kind, c);
				else
					break;
				c = vGetc ();
			}
		}
		else if (kind == K_PROCESS || kind == K_BLOCK) {
			vStringCopyS(TagName,"unnamed");
			makeSimpleTag (TagName, VhdlKinds, kind);
		} else {
			c = skipWhite (vGetc ());
			if (c=='\"')
				c = vGetc ();
			if (isIdentifierCharacter (c))
				tagNameList (kind, c);
		}
	}
}
Exemplo n.º 2
0
static keywordId analyzeToken (vString *const name)
{
    static vString *keyword = NULL;
    if (keyword == NULL)
	keyword = vStringNew ();
    vStringCopyToLower (keyword, name);
    return (keywordId) lookupKeyword (vStringValue (keyword), Lang_sql);
}
Exemplo n.º 3
0
static keywordId analyzeToken (vString *const name)
{
	vString *keyword = vStringNew ();
	keywordId result;
	vStringCopyToLower (keyword, name);
	result = (keywordId) lookupKeyword (vStringValue (keyword), Lang_js);
	vStringDelete (keyword);
	return result;
}
Exemplo n.º 4
0
int Keywords::analyzeToken (vString *const name, Language language)
{
    vString *keyword = vStringNew ();
    int result;
    vStringCopyToLower (keyword, name);
    result = lookupKeyword (vStringValue (keyword), language);
    vStringDelete (keyword);
    return result;
}
Exemplo n.º 5
0
/*
*   FUNCTION DEFINITIONS
*/
static opKeyword analyzeOperator (const vString *const op)
{
    vString *keyword = vStringNew ();
    opKeyword result;

    vStringCopyToLower (keyword, op);
    result = (opKeyword) lookupKeyword (vStringValue (keyword), Lang_asm);
    vStringDelete (keyword);
    return result;
}