Skip to content

Instantly share code, notes, and snippets.

auto const r = qi::int_ % qi::lit( ',' );
#include <iostream>
#include <vector>
#ifndef BOOST_SPIRIT_USE_PHOENIX_V3
# define BOOST_SPIRIT_USE_PHOENIX_V3
#endif
#include <boost/spirit/include/qi.hpp>
#include <boost/fusion/include/adapt_struct.hpp>
In file included from /usr/local/boost-1.55.0/include/boost/spirit/home/support/string_traits.hpp:16:0,
from /usr/local/boost-1.55.0/include/boost/spirit/home/support/nonterminal/expand_arg.hpp:20,
from /usr/local/boost-1.55.0/include/boost/spirit/home/support/context.hpp:18,
from /usr/local/boost-1.55.0/include/boost/spirit/home/qi/domain.hpp:18,
from /usr/local/boost-1.55.0/include/boost/spirit/home/qi/meta_compiler.hpp:15,
from /usr/local/boost-1.55.0/include/boost/spirit/home/qi/action/action.hpp:14,
from /usr/local/boost-1.55.0/include/boost/spirit/home/qi/action.hpp:14,
from /usr/local/boost-1.55.0/include/boost/spirit/home/qi.hpp:14,
from /usr/local/boost-1.55.0/include/boost/spirit/include/qi.hpp:16,
from prog.cc:7:
In file included from /usr/local/boost-1.55.0/include/boost/spirit/home/support/string_traits.hpp:16:0,
from /usr/local/boost-1.55.0/include/boost/spirit/home/support/nonterminal/expand_arg.hpp:20,
from /usr/local/boost-1.55.0/include/boost/spirit/home/support/context.hpp:18,
from /usr/local/boost-1.55.0/include/boost/spirit/home/qi/domain.hpp:18,
from /usr/local/boost-1.55.0/include/boost/spirit/home/qi/meta_compiler.hpp:15,
from /usr/local/boost-1.55.0/include/boost/spirit/home/qi/action/action.hpp:14,
from /usr/local/boost-1.55.0/include/boost/spirit/home/qi/action.hpp:14,
from /usr/local/boost-1.55.0/include/boost/spirit/home/qi.hpp:14,
from /usr/local/boost-1.55.0/include/boost/spirit/include/qi.hpp:16,
from prog.cc:7:
In file included from prog.cc:7:
In file included from /usr/local/boost-1.55.0/include/boost/spirit/include/qi.hpp:16:
In file included from /usr/local/boost-1.55.0/include/boost/spirit/home/qi.hpp:14:
In file included from /usr/local/boost-1.55.0/include/boost/spirit/home/qi/action.hpp:14:
In file included from /usr/local/boost-1.55.0/include/boost/spirit/home/qi/action/action.hpp:14:
In file included from /usr/local/boost-1.55.0/include/boost/spirit/home/qi/meta_compiler.hpp:15:
In file included from /usr/local/boost-1.55.0/include/boost/spirit/home/qi/domain.hpp:18:
In file included from /usr/local/boost-1.55.0/include/boost/spirit/home/support/context.hpp:18:
In file included from /usr/local/boost-1.55.0/include/boost/spirit/home/support/nonterminal/expand_arg.hpp:20:
In file included from /usr/local/boost-1.55.0/include/boost/spirit/home/support/string_traits.hpp:16:
@yutopp
yutopp / gist:6666992
Last active December 23, 2015 17:09
bun
def main(): int
{
print( "hello, bunchou lang!!!" );
test();
return 0;
}
def test(): void
{
#include <stdlib.h>
#include <string.h>
#ifndef GUARD_USERNAME
/* !!input your username!!!
Ex.
# define GUARD_USERNAME "s1210999"
*/
# define GUARD_USERNAME "s0000000"
#endif
@yutopp
yutopp /
Created December 16, 2012 04:50
pe_gen
#ifndef LINKER_PE_SECTION_GENERATOR_BASE_HPP
#define LINKER_PE_SECTION_GENERATOR_BASE_HPP
#pragma once
#include <iostream>
#include <string>
#include <unordered_map>
#include <boost/range/adaptors.hpp>
@yutopp
yutopp / HSP反田える
Created October 30, 2012 15:18
何やってんじゃ・・・
#runtime "hsp3cl"
ERUTASO = "えい", "びー", "しー", "でぃー", "いー", "えふ", "じー", "えいち", "あい", "じぇー", "けー", "える", "えむ", "えぬ", "おー", "ぴー", "きゅー", "あーる", "えす", "てぃー", "ゆー", "ぶい", "だぶりゅう", "えっくす", "わい", "ぜっと"
kanji = "", "一", "ニ", "三", "四", "五", "六", "七", "八", "九"
unit_n = 1000, 100, 10, 1
unit = "千", "百", "十", ""
goto *@f
#defcfunc to_kanji int prm_num, local num
@yutopp
yutopp / yt_asm
Created May 24, 2012 17:29
こんなインターフェースにしたのは誰だ?
#include <vector>
#include <ytl/assembler.hpp>
int main() {
namespace x86 = ytl::assembler::ia_32;
std::vector<char> binary_buffer;
auto asm_gen = ytl::assembler::make_generator<x86::engine>( binary_buffer );
YTL_ASM_BEGIN( asm_gen )