Skip to content

Instantly share code, notes, and snippets.

@rindPHI
rindPHI / LLVMLexer.g4
Created August 24, 2018 12:41
ANTLR4 parser for LLVM IR (human readable ASM representation), lexer part
// This ANTLR4 lexer grammar is based on the lexer part of an LLVM BNF grammar from
// https://gist.github.com/mewmew/a2487392d5519ef49658fd8f84d9eed5,
// which in turn has been based on the source code of the official LLVM project,
// as of 2018-02-19 (rev db070bbdacd303ae7da129f59beaf35024d94c53).
lexer grammar LLVMLexer;
LT : '<' ;
EQSIGN : '=' ;
GT : '>' ;