Ignore:
Timestamp:
Jun 22, 2012, 5:13:30 PM (7 years ago)
Author:
sam
Message:

easymesh: move the Mesh builder into the engine core.

Location:
trunk/src/easymesh
Files:
5 added
3 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/easymesh/easymesh-parser.y

    r1509 r1510  
    11%{
    22//
    3 // Orbital
     3// Lol Engine
    44//
    5 // Copyright: (c) 2009-2012 Cédric Lecacheur <jordx@free.fr>
     5// Copyright: (c) 2010-2012 Sam Hocevar <sam@hocevar.net>
     6//            (c) 2009-2012 Cédric Lecacheur <jordx@free.fr>
    67//            (c) 2009-2012 Benjamin Huet <huet.benjamin@gmail.com>
    7 //            (c) 2012 Sam Hocevar <sam@hocevar.net>
     8//   This program is free software; you can redistribute it and/or
     9//   modify it under the terms of the Do What The Fuck You Want To
     10//   Public License, Version 2, as published by Sam Hocevar. See
     11//   http://sam.zoy.org/projects/COPYING.WTFPL for more details.
    812//
    913
     
    1317
    1418#include "core.h"
    15 #include "loldebug.h"
    16 
    17 using namespace lol;
    18 
    19 #include "../mesh.h"
     19#include "easymesh/easymesh.h"
    2020
    2121#include <string>
     22
    2223%}
    2324
     
    2627%defines
    2728%skeleton "lalr1.cc"
    28 %name-prefix="orbital"
    29 %define parser_class_name "MeshParser"
     29%name-prefix="lol"
     30%define parser_class_name "EasyMeshParser"
    3031%locations
    31 %parse-param { class MeshCompiler& mc }
     32%parse-param { class EasyMeshCompiler& mc }
    3233%error-verbose
    3334
     
    6364
    6465%{
    65 #include "../mesh-compiler.h"
     66#include "easymesh/easymesh-compiler.h"
    6667
    6768#undef yylex
     
    174175%%
    175176
    176 void orbital::MeshParser::error(const MeshParser::location_type& l,
     177void lol::EasyMeshParser::error(const EasyMeshParser::location_type& l,
    177178                                const std::string& m)
    178179{
  • trunk/src/easymesh/easymesh-scanner.l

    r1509 r1510  
    11%{
    22//
    3 // Orbital
     3// Lol Engine
    44//
    5 // Copyright: (c) 2009-2012 Cédric Lecacheur <jordx@free.fr>
     5// Copyright: (c) 2010-2012 Sam Hocevar <sam@hocevar.net>
     6//            (c) 2009-2012 Cédric Lecacheur <jordx@free.fr>
    67//            (c) 2009-2012 Benjamin Huet <huet.benjamin@gmail.com>
    7 //            (c) 2012 Sam Hocevar <sam@hocevar.net>
     8//   This program is free software; you can redistribute it and/or
     9//   modify it under the terms of the Do What The Fuck You Want To
     10//   Public License, Version 2, as published by Sam Hocevar. See
     11//   http://sam.zoy.org/projects/COPYING.WTFPL for more details.
    812//
    913
     
    1317
    1418#include "core.h"
    15 #include "loldebug.h"
     19#include "easymesh/easymesh-compiler.h"
    1620
    17 using namespace lol;
    18 
    19 #include "../mesh-compiler.h"
    20 
    21 typedef orbital::MeshParser::token token;
    22 typedef orbital::MeshParser::token_type token_type;
     21typedef lol::EasyMeshParser::token token;
     22typedef lol::EasyMeshParser::token_type token_type;
    2323
    2424#ifndef YY_DECL
    25 #   define YY_DECL orbital::MeshParser::token_type \
    26         orbital::MeshScanner::lex(orbital::MeshParser::semantic_type* yylval, \
    27                                   orbital::MeshParser::location_type* yylloc)
     25#   define YY_DECL lol::EasyMeshParser::token_type \
     26        lol::EasyMeshScanner::lex(lol::EasyMeshParser::semantic_type* yylval, \
     27                                  lol::EasyMeshParser::location_type* yylloc)
    2828#endif
    2929
     
    3333%}
    3434
    35 %option c++ prefix="Mesh"
     35%option c++ prefix="EasyMesh"
    3636%option batch yywrap nounput stack
    3737
     
    109109%%
    110110
    111 orbital::MeshScanner::MeshScanner(char const *command)
    112     : MeshFlexLexer(0, 0),
     111lol::EasyMeshScanner::EasyMeshScanner(char const *command)
     112    : EasyMeshFlexLexer(0, 0),
    113113      m_input(command)
    114114{
    115115}
    116116
    117 orbital::MeshScanner::~MeshScanner()
     117lol::EasyMeshScanner::~EasyMeshScanner()
    118118{
    119119}
    120120
    121 int orbital::MeshScanner::LexerInput(char* buf, int max_size)
     121int lol::EasyMeshScanner::LexerInput(char* buf, int max_size)
    122122{
    123123    buf[0] = m_input[0];
     
    130130#undef yylex
    131131#endif
    132 int MeshFlexLexer::yylex()
     132int EasyMeshFlexLexer::yylex()
    133133{
    134     std::cerr << "in MeshFlexLexer::yylex() !" << std::endl;
     134    std::cerr << "in EasyMeshFlexLexer::yylex() !" << std::endl;
    135135    return 0;
    136136}
    137137
    138 int MeshFlexLexer::yywrap()
     138int EasyMeshFlexLexer::yywrap()
    139139{
    140140    return 1;
Note: See TracChangeset for help on using the changeset viewer.