summaryrefslogtreecommitdiff
path: root/pygments/lexers/asm.py
Commit message (Collapse)AuthorAgeFilesLines
* all: revert changes of [a-zA-Z0-9_] to \wGeorg Brandl2020-09-071-10/+10
| | | | ... which is not equivalent in Unicode mode
* all: use argumentless super()Georg Brandl2020-09-061-3/+3
|
* all: fixup remaining regexlint warningsGeorg Brandl2020-09-061-16/+27
|
* Add support for ARM constant notation in GAS lexerBrennan Ashton2020-09-021-1/+1
| | | | | | | | | | | | | | | GNU supports ARM syntax which uses notation like #1 for constants. Currently this is handled like a comment which is incorrect. Take the case of: ldr r0, [r1, #0] Right now the #0] would be treated like a comment and looks very poor. Was referenced in issue #627 Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
* Update copyright year (fixes #1514.)Matthäus G. Chajdas2020-08-221-1/+1
|
* Nasm: Update register syntax for 64-bit (#1465)Jonas Bushart2020-06-011-1/+1
| | | | | | | x86_64 has 8 registers r8-r15. The current syntax only accepts them with a trailing letter. The letter is used to indicate the register size. However, r8 is also a valid register, for a 64 bit wide register. For reference on the register names see https://www.cs.uaf.edu/2017/fall/cs301/reference/x86_64.html
* Improve some lexer docstringsAdam Johnson2020-03-221-8/+8
|
* Multiline flag does not work with re.matchAlan Hamlett2020-02-081-3/+3
|
* Add lexer for LLVM's MIR format (#1361)Daniel Sanders2020-01-241-5/+217
| | | | | | | | | | | | | | | | | | MIR is a human readable serialization format that's used to represent LLVM's machine specific intermediate representation. It allows LLVM's developers to see the state of the compilation process at various points, as well as test individual pieces of the compiler. Our documentation for the format can be found at https://llvm.org/docs/MIRLangRef.html. Adding a lexer for this format will allow the LLVM documentation to contain syntax highlighted examples of LLVM-MIR. Two lexers are included in this change. 'llvm-mir' lexes the overall document format and delegates to 'llvm' and 'llvm-mir-body' as appropriate. 'llvm-mir-body' lexes the contents of the 'body:' attribute and can be used directly to syntax highlight code examples without including the document boilerplate. Since the 'llvm-mir' lexer delegates to the 'llvm' lexer at times, this change also adds the 'immarg' and 'willreturn' keywords to the 'llvm' lexer as these were missing.
* GAS: Add test code.lrh20002019-11-301-8/+8
|
* GAS: Add support for C style comments.lrh20002019-11-271-3/+8
|
* GAS: accept registers in directive args (bitbucket PR #739)Georg Brandl2019-11-241-1/+3
|
* Make the NasmLexer the default for *.asm.Matth?us G. Chajdas2019-06-221-0/+14
| | | | | | | NASM is much more popular than TASM, but get_lexer_for_filename('.asm') would return TASM. Resolved by changing the NASM priority to 1, and adding an analyse_text implementation to both NasmLexer and TasmLexer to help resolve which one to use (PROC should be fairly common in TASM code.)
* Fixup all headers and some more minor problems.2.4.2Georg Brandl2019-05-281-1/+1
|
* Fix directive parsing in NasmLexer (fixes #1517.)Matth?us G. Chajdas2019-05-211-2/+4
| | | | | | | Directives were parsed independent of whitespace after them, which caused the cpuid instruction to be parsed as CPU & id, instead of cpuid. We now expect a whitespace character after a directive, which seems to match the Nasm documentation.
* Fix invalid string escape.Georg Brandl2019-05-071-1/+1
|
* Various fixes and cleanups to the last batch of new languages.Matth?us G. Chajdas2019-04-281-2/+4
| | | | | Add to CHANGES, languages, add versionadded, recreate mappings, fix DASM16 alias.
* Add lexers for DASM16, Augeas, TOML, and SlashFrederik ?Freso? S. Olesen2019-03-311-1/+105
| | | | | | | | | Lexers copied unmodified from https://github.com/liluo/pygments-github-lexers which is available under a 2-clause BSD license (same as pygments), copyright 2012 to GitHub, Inc. Fixes #1391 and #1150.
* Update LLVM lexer to use keywords of LLVM 7.0.Robin Eklind2018-12-311-48/+57
| | | | | | | | | | | | | | | | | | The keywords are based extracted from the source code of the LLVM lexer (llvm-7.0.0.src/lib/AsmParser) and is based on the first argument to the KEYWORD, TYPEKEYWORD and INSTKEYWORD macros. The list of keywords were then sorted in lexicographic order. A diff with added and removed keywords is made available at https://gist.github.com/mewmew/508e090a361095eeb60ffa88321e878a Specifically the following 10 keywords were removed: begin, dbg, end, free, getresult, linker_private, linker_private, malloc, singlethread and x86_64_win64cc And 96 new keywords were added.
* Merged in wentasah/pygments-main (pull request #784)Tim Hatch2018-12-051-0/+2
|\ | | | | | | Fix handling of end-of-line comments in asm lexer
| * Fix handling of end-of-line comments in asm lexermichal sojka2018-11-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | When there is a comment after an instruction, e.g. mov $1,%eax ; move 1 to eax ret the next instruction (ret above) is not properly highlighted. This patch fixes that. This was also reported in #1477.
* | Fix more instances of invalid string escapesGeorg Brandl2018-11-281-3/+3
|/ | | | Also, raise on warnings from Pygments only.
* Change instances of Comment.Singleline to Comment.SingleErkki Mattila2017-02-051-1/+1
|
* mergeGeorg Brandl2017-01-221-2/+3
|\
| * More housekeeping and missed additions to CHANGES.Georg Brandl2017-01-221-2/+3
| |
* | Merged in GorNishanov/pygments-main (pull request #630)Georg Brandl2017-01-221-2/+14
|\ \ | |/ |/| | | LLVMLexer: added 58 keywords and 'token' type to match LLVM 4.0 (Issue #1263)
| * LLVMLexer: added 58 keywords and 'token' type to match LLVM 4.0Gor Nishanov2016-07-261-2/+14
| |
| * Merge with birkenfeld/pygments-mainTim Hatch2016-05-311-65/+180
| |\
| | * regexlint fixes.Georg Brandl2016-02-171-1/+1
| | |
| | * LLVM lexer: use words()Georg Brandl2016-02-171-61/+40
| | |
| | * Hsail: fix two issues to lex examplefile.Georg Brandl2016-02-171-3/+2
| | |
| | * Merge in HSAIL lexer (PR#518).Georg Brandl2016-02-171-79/+83
| | |\
| | | * merge default into stableGeorg Brandl2016-01-171-0/+436
| | |
| | * HSAIL: Add more keywords, strings, numerical constantsgrollinger2015-11-071-10/+34
| | |
| | * Add HSAIL lexergrollinger2015-11-061-1/+110
| | |
| * | Lex comment as Comment when a newline gets escapedRuben De Smet2016-01-071-3/+4
| | |
| * | Add tasm lexer.Ruben De Smet2016-01-071-2/+80
| |/ | | | | | | I copied the nasm lexer and added or removed things that are different.
| * Closes #1124: Add 'addrspacecast' instruction to the LLVM asm lexerZvi Rackover2015-06-301-1/+2
| |
| * Copyright year update.Georg Brandl2015-01-211-1/+1
| |
| * Simplify charclasses in a few more modulesGeorg Brandl2014-11-061-3/+3
| |
| * Fix allowing whitespace before preprocessor commands in NASM.Georg Brandl2014-11-061-1/+1
| |
| * ca65: allow bracketsGeorg Brandl2014-10-071-1/+1
| |
| * Better name for ca65 assembler lexer.Georg Brandl2014-10-071-1/+1
| |
| * Remove the c_like subpackage.Georg Brandl2014-09-201-2/+2
| |
| * split up text lexersGeorg Brandl2014-09-191-11/+11
| |
| * Update ElixirLexer and example_elixir.exAlexei Sholik2014-06-051-0/+435
| | | | | | | | | Elixir syntax has evolved quite significantly since the initial lexer was written. In this update I have rewritten most of the code to support modern Elixir (as of v0.14.0-dev). The example file has also been updated to give an quick overview of most of the language constructs.
* Copyright update.Georg Brandl2017-01-221-1/+1
|
* Add support for partials and path segments for Handlebars.Christian Hammond2016-11-041-0/+628
This introduces support for some missing features to the Handlebars lexer: Partials and path segments. Partials mostly appeared to work before, but the `>` in `{{> ... }}` would appear as a syntax error, as could other components of the partial. This change introduces support for: * Standard partials: `{{> partialName}}` * Partials with parameters: `{{> partialName varname="value"}}` * Ddynamic partials: `{{> (partialFunc)}}` * Ddynamic partials with lookups: `{{> (lookup ../path "partialName")}}` * Partial blocks: `{{> @partial-block}}` * Inline partials: `{{#*inline}}..{{/inline}}` It also introduces support for path segments, which can reference content in the current context or in a parent context. For instance, `this.name`, `this/name`, `./name`, `../name`, `this/name`, etc. These are all now tracked as variables.