예제 #1
0
파일: Program.cs 프로젝트: lcnvdl/parallel
        private static void ComandoFor(string args)
        {
            string[]   arguments = args.Split(' ');
            ComandoFor comando   = new ComandoFor();

            foreach (string cmd in comando.Procesar(arguments))
            {
                EjecutarProceso(cmd);
            }
        }
예제 #2
0
        private Comando ParsearComandoFor()
        {
            Comando resultado;

            lexer.Aceptar(TokenType.FOR);
            lexer.Aceptar(TokenType.lParentesis);
            Id     id       = (Id)ParsearId();
            string variable = id.Valor;

            lexer.Aceptar(TokenType.dosPuntos);
            Expresion exp = ParsearExpresion();

            lexer.Aceptar(TokenType.rParentesis);

            Comando comandosDelFOR = ParsearComando();

            resultado = new ComandoFor(salida, tablaDeSimbolos, variable, exp, comandosDelFOR);
            return(resultado);
        }