antlr-haskell-0.1.0.1: test/coreg4/Hello.hs
{-# LANGUAGE QuasiQuotes, DeriveAnyClass, DeriveGeneric, TypeFamilies
, DataKinds, ScopedTypeVariables, OverloadedStrings, TypeSynonymInstances
, FlexibleInstances, UndecidableInstances, DeriveDataTypeable #-}
module Hello where
import Language.ANTLR4
[g4|
// Hello World grammar
// https://github.com/antlr/grammars-v4/blob/master/antlr4/examples/Hello.g4
grammar Hello;
r : 'hello' WS ID;
ID : [a-zA-Z]+ -> String;
WS : [ \t\r\n]+ -> String;
|]