Commit f64e3f55 authored by Marc's avatar Marc
Browse files

README

parent ffecfeff
It lexes our version of mixed C ans assembly.
Install it with
```bash
sudo ./install.sh
```
and the lexer will be available under the name `casm`. You can check
it was indeed correctly installed by looking for it in
```bash
pygmentize -L
```
or more automatically
```bash
pygmentize -L | grep casm -A1
```
I get:
```bash
* casm:
c-asm (filenames *.c_asm)
```
And is ready to use with minted, for instance!
Example:
```latex
\begin{minted}{casm}
int x = 5;
void f() {
asm {
mov EAX, x
}
}
\end{minted}
```
......@@ -64,7 +64,7 @@ class CWithAsmBlockLexer(RegexLexer):
(r'(__m(128i|128d|128|64))\b', Keyword.Reserved),
# Microsoft-isms
(words((
'asm', 'int8', 'based', 'except', 'int16', 'stdcall', 'cdecl',
'int8', 'based', 'except', 'int16', 'stdcall', 'cdecl',
'fastcall', 'int32', 'declspec', 'finally', 'int64', 'try',
'leave', 'wchar_t', 'w64', 'unaligned', 'raise', 'noop',
'identifier', 'forceinline', 'assume'),
......@@ -186,3 +186,4 @@ class CAsmLexer(DelegatingLexer):
filenames = ['*.c_asm']
def __init__(self, **options):
super(CAsmLexer, self).__init__(NasmLexer, CWithAsmBlockLexer, **options)
#!/bin/zsh
# Will probably need sudo
python3 setup.py develop
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment