The example presented here shows how one would use groc
to create
an internationalized die-roll application:
$ roll
You rolled a one
$ roll
call plug#begin() | |
Plug 'tomasr/molokai' | |
Plug 'itchyny/lightline.vim' | |
call plug#end() | |
filetype plugin on | |
set mouse=a |
# .bashrc | |
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc | |
fi | |
# User specific environment | |
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:$HOME/code/tools/text-tools/bin" ]] | |
then |
#include <cheax.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main(void) | |
{ | |
int result; | |
CHEAX *c = cheax_init(); |
%code requires { | |
#include "types.h" | |
#include <stddef.h> | |
#include <stdio.h> | |
} | |
%code { | |
int yylex(); | |
void yyerror(ASTFileElement **f, const char *msg); | |
} |
use v6; | |
unit module CTokens; | |
grammar CTokens::Token is export { | |
token TOP { | |
[ | |
<preproc> | | |
<comment> | | |
<line-comment> | |
antonijn, 2017 | |
___ _ _ _ _ | |
|_ _|_ _| |_ _ _ ___ __| |_ _ __| |_(_)___ _ _ | |
| || ' \ _| '_/ _ \/ _` | || / _| _| / _ \ ' \ | |
|___|_||_\__|_| \___/\__,_|\_,_\__|\__|_\___/_||_| | |
Because all other text editors suck (although |
$ ./cheaky | |
> (let i 0) | |
> i | |
0 | |
> (let j 10) | |
> j | |
10 | |
> (let k j) | |
> k | |
10 |
#ifndef LINUX_LIST_H | |
#define LINUX_LIST_H | |
#include <stddef.h> | |
/** | |
* container_of - cast a member of a structure out to the containing structure | |
* @ptr: the pointer to the member. | |
* @type: the type of the container struct this is embedded in. | |
* @member: the name of the member within the struct. |