[r571]: cmajor++ / Cm / Cm.Debugger / DevEnvInput.soul Maximize Restore History

Download this file

DevEnvInput.soul    49 lines (40 with data), 2.3 kB

/*========================================================================
    Copyright (c) 2012-2014 Seppo Laakko
    http://sourceforge.net/projects/cmajor/
 
    Distributed under the GNU General Public License, version 3 (GPLv3).
    (See accompanying LICENSE.txt or http://www.gnu.org/licenses/gpl.html)

 ========================================================================*/

[hpp]#include <Cm.Debugger/DebugInfo.hpp>

namespace Cm.Debugger 
{
    grammar DevEnvInputGrammar
    {
        using stdlib.qualified_id;

        Command: DevEnvCommand
            ::= "<cmdb.request<[[start]]>"{ value = DevEnvCommand("start"); }
            |   "<cmdb.request<[[quit]]>"{ value = DevEnvCommand("quit"); }
            |   "<cmdb.request<[[continue]]>"{ value = DevEnvCommand("continue"); }
            |   "<cmdb.request<[[next]]>"{ value = DevEnvCommand("next"); }
            |   "<cmdb.request<[[step]]>"{ value = DevEnvCommand("step"); }
            |   "<cmdb.request<[[out]]>"{ value = DevEnvCommand("out"); }
            |   "<cmdb.request<[[break " Arg:brkarg "]]>"{ value = DevEnvCommand("break", brkarg); }
            |   "<cmdb.request<[[clear " Arg:clrarg "]]>"{ value = DevEnvCommand("clear", clrarg); }
            |   "<cmdb.request<[[callstack]]>"{ value = DevEnvCommand("callstack"); }
            |   "<cmdb.request<[[frame " Arg:frmarg "]]>"{ value = DevEnvCommand("frame", frmarg); }
            |   "<cmdb.request<[[show libraries]]>"{ value = DevEnvCommand("show libraries"); }
            |   "<cmdb.request<[[set debug library " LibraryName:lib " " OnOff:onoff "]]>"{ value = DevEnvCommand("set debug library", lib, onoff); }
            |   "<cmdb.request<[[set break on throw on]]>"{ value = DevEnvCommand("set break on throw on"); }
            |   "<cmdb.request<[[set break on throw off]]>"{ value = DevEnvCommand("set break on throw off"); }
            |   token(anychar*){ value = DevEnvCommand("input", match); }
            ;

        LibraryName: std::string
            ::= (qualified_id:libName){ value = libName; }
            ;

        OnOff: bool
            ::= ("on"{ value = true; }) | ("off"{ value = false; })
            ;

        Arg: std::string
            ::= token((anychar - "]]>")+){ value = match; }
            ;
    }
}