Examples of MnemonicsMap


Examples of br.com.gmartins.simbler.mnemonics.helpers.MnemonicsMap

            mnemonicList.add(builder.getBuiltInstruction(formattedLine, panel, position));
        }
    }

    public boolean isValid(String formattedLine) {
        MnemonicsMap map = MnemonicsMap.getInstance();
        // Pega a primeira palavra da linha e tenta recuperar com este nome um objeto do mapa.
        MnemonicDetails mnemonic = map.getMnemonicsMap().get(formattedLine.split(" ")[0]);
        // Se conseguir, faz a verificação com o Regex definido nessa instrução.
        if (mnemonic != null) {
            if (regexTest(mnemonic, formattedLine) == false) {
                return false;
            } else {
                return true;
            }
        }
        // Caso não consiga recuperar nenhum objeto, faz a verifição do mapa de regex todo.
        for (Map.Entry<String, MnemonicDetails> m : map.getMnemonicsMap().entrySet()) {
            if (regexTest(m.getValue(), formattedLine) == true) {
                return true;
            }
        }
        return false;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.