summaryrefslogtreecommitdiff
path: root/pygments/lexers/asm.py
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year to 2023.Matthäus G. Chajdas2023-03-291-1/+1
|
* Add the NASM file format supportsAshraf Ali S2022-11-191-1/+1
| | | | | | | | | | tianocore EDK2 have the NASM file format alternative to ASM based On which compiler user is using. https://github.com/tianocore/edk2 NASM are same as ASM file format Signed-off-by: Ashraf Ali S <ashraf.ali.s@intel.com>
* Add opaque pointer type to LLVM IR lexerVladimir Vuksanovic2022-10-311-1/+1
| | | | Reference: https://llvm.org/docs/OpaquePointers.html
* all: style fixesGeorg Brandl2022-10-271-1/+2
|
* Add { and } to punctuation for GNU Assembly lexer (#2230)Nils Husung2022-09-141-1/+1
| | | | | This allows lexing instructions like: vpscatterqd %ymm0, 0x404050(,%zmm2,4) {%k1}
* Improve NASM lexer (#2212)Fanael Linithien2022-08-191-3/+4
| | | | Adds support for SSE/AVX/AVX-512 registers and 'rel' and 'abs' address operators.
* Rework URL information in lexers.Matthäus G. Chajdas2022-03-201-6/+4
| | | | | | | | This commit adds a new url field to a lexer, which can be used to link to the language website, instead of relying on having the link in either languages.rst or the docstring of the lexer. Additionally, it changes the languages.rst file to auto-generate the list of lexers from the actual source code, using the provided URL.
* Happy new year.Georg Brandl2022-01-251-1/+1
|
* Fix typos (#2030)Kian-Meng Ang2022-01-181-1/+1
|
* Improve objdump-nasm lexer (#1981)Pwilke2021-12-281-1/+6
| | | | | | | * Update asm lexer for --no-show-raw-insn * Update asm lexer for #-style comments in Nasm Co-authored-by: Pierre Wilke <pierre.wilke@centralesupelec.fr>
* Asm lex bugfix #1895: register re check for boundary (#1961)Sebastian Engel2021-11-171-6/+6
|
* Whitespace token modernization - a* lexers - regarding #1905 (#1914)Sebastian Engel2021-10-231-43/+43
| | | | | | | | | | | | | | | * Whitespace token modernization - ambient lexer * Whitespace token modernization - ampl lexer * Whitespace token modernization - apdlexer lexer * Whitespace token modernization - apl lexer * Whitespace token modernization - adl lexer * Whitespace token modernization - arrow lexer * Whitespace token modernization - asm lexer
* Clean-up unused imports (#1887)Mickaël Schoentgen2021-08-231-1/+1
|
* Add numerical identifiers to LLVM label syntax (#1875)Bruce Collie2021-07-311-1/+2
|
* Update LLVM lexer to use keywords of LLVM 12.0. (#1824)Fraser Cormack2021-05-311-57/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The keywords are based on the extraction of keywords the LLVM 12.0 lexer source code. They were taken from the `KEYWORD` and `INSTKEYWORD` macros for the 'Keyword' tokens, and 'Type' tokens were from the `TYPEKEYWORD` macro. The keywords were then sorted against the current set. Due to formatting issues in the arrays, the actual Type diff is: ``` diff +x86_mmx +x86_amx ``` and the Keyword diff is: ``` diff +aarch64_sve_vector_pcs +aarch64_vector_pcs +alwaysInline +amdgpu_gfx +blockcount +byref +callbr +canAutoHide +cfguard_checkcc +dso_local_equivalent +fneg +mustprogress +nocallback +nofree +noInline +nomerge +noprofile +nosync +noundef +null_pointer_is_valid +param +params +partition +preallocated +sanitize_memtag +speculative_load_hardening +tailcc +typeidCompatibleVTable +varFlags +vcall_visibility +virtFunc +vscale +vTableFuncs +x ```
* Run pyupgrade across codebase to modernize syntax and patterns (#1622)Jon Dufresne2021-01-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | pyupgrade is a tool to automatically upgrade syntax for newer versions of the Python language. The project has been Python 3 only since 35544e2fc6eed0ce4a27ec7285aac71ff0ddc473, allowing for several cleanups: - Remove unnecessary "-*- coding: utf-8 -*-" cookie. Python 3 reads all source files as utf-8 by default. - Replace IOError/EnvironmentError with OSError. Python 3 unified these exceptions. The old names are aliases only. - Use the Python 3 shorter super() syntax. - Remove "utf8" argument form encode/decode. In Python 3, this value is the default. - Remove "r" from open() calls. In Python 3, this value is the default. - Remove u prefix from Unicode strings. In Python 3, all strings are Unicode. - Replace io.open() with builtin open(). In Python 3, these functions are functionally equivalent. Co-authored-by: Matthäus G. Chajdas <Anteru@users.noreply.github.com>
* Bump copyright year.Matthäus G. Chajdas2021-01-031-1/+1
|
* llvm lexer: add poison keyword (#1612)Nuno Lopes2020-11-281-1/+1
|
* llvm lexer: add freeze instruction and bfloat type (#1565)Nuno Lopes2020-10-061-11/+12
|
* 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
| | |