source: trunk/orbital/gun.cpp @ 1416

Last change on this file since 1416 was 1416, checked in by sam, 8 years ago

orbital: parser for the gun commands... fails to link because of flex.

  • Property svn:keywords set to Id
File size: 548 bytes
Line 
1//
2// Orbital
3//
4// Copyright: (c) 2012 Various People
5//
6
7#if defined HAVE_CONFIG_H
8#   include "config.h"
9#endif
10
11#include "core.h"
12#include "loldebug.h"
13
14using namespace lol;
15
16#include "gun.h"
17
18/* Compile generated files */
19#include "generated/gun-parser.cpp"
20#include "generated/gun-scanner.cpp"
21
22void Gun::SendCommand(char const *command)
23{
24    yyscan_t scanner;
25    yylex_init(&scanner);
26    yyset_extra(&command, scanner);
27    yy::GunParser parser(*this, scanner);
28    int res = parser.parse();
29    (void)res;
30    yylex_destroy(scanner);
31}
32
Note: See TracBrowser for help on using the repository browser.