antlr4-c3-kotlin

ANTLR4-C3 provides autocompletion for ANTLR4 projects

License

License

Categories

Categories

Kotlin Languages Ant Build Tools ANTLR Compiler-compiler
GroupId

GroupId

me.tomassetti.antlr4c3
ArtifactId

ArtifactId

antlr4-c3-kotlin
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

antlr4-c3-kotlin
ANTLR4-C3 provides autocompletion for ANTLR4 projects
Project URL

Project URL

https://github.com/ftomassetti/antlr4-c3-kotlin
Source Code Management

Source Code Management

https://github.com/ftomassetti/antlr4-c3-kotlin.git

Download antlr4-c3-kotlin

How to add to project

<!-- https://jarcasting.com/artifacts/me.tomassetti.antlr4c3/antlr4-c3-kotlin/ -->
<dependency>
    <groupId>me.tomassetti.antlr4c3</groupId>
    <artifactId>antlr4-c3-kotlin</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/me.tomassetti.antlr4c3/antlr4-c3-kotlin/
implementation 'me.tomassetti.antlr4c3:antlr4-c3-kotlin:0.1.0'
// https://jarcasting.com/artifacts/me.tomassetti.antlr4c3/antlr4-c3-kotlin/
implementation ("me.tomassetti.antlr4c3:antlr4-c3-kotlin:0.1.0")
'me.tomassetti.antlr4c3:antlr4-c3-kotlin:jar:0.1.0'
<dependency org="me.tomassetti.antlr4c3" name="antlr4-c3-kotlin" rev="0.1.0">
  <artifact name="antlr4-c3-kotlin" type="jar" />
</dependency>
@Grapes(
@Grab(group='me.tomassetti.antlr4c3', module='antlr4-c3-kotlin', version='0.1.0')
)
libraryDependencies += "me.tomassetti.antlr4c3" % "antlr4-c3-kotlin" % "0.1.0"
[me.tomassetti.antlr4c3/antlr4-c3-kotlin "0.1.0"]

Dependencies

compile (7)

Group / Artifact Type Version
org.antlr : antlr4-runtime jar 4.5.1
org.jetbrains.kotlin : kotlin-stdlib jar 1.1.3
org.jetbrains.kotlin : kotlin-reflect jar 1.1.3
com.fifesoft : rsyntaxtextarea jar 2.5.8
com.fifesoft : autocomplete jar 2.5.8
me.tomassetti : kolasu jar 0.1.1
org.javassist : javassist jar 3.21.0-GA

test (3)

Group / Artifact Type Version
org.jetbrains.kotlin : kotlin-test jar 1.1.3
org.jetbrains.kotlin : kotlin-test-junit jar 1.1.3
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

ANTLR4-C3-Kotlin

Build Status Maven Central

The original version of this project has been created by translating to Kotlin antlr4-c3, a project by Mike Lischke.

This library provides a grammar agnostic code completion engine for ANTLR4 based parsers, written in Kotlin. The c3 engine is able to provide code completion candidates useful for editors with ANTLR generated parsers, independent of the actual language/grammar used for the generation.

Being written in Kotlin the idea is to be reuse the same Kotlin on the JVM and in the browser.

API

The high level API can be used very simply by specifying the lexer class, the parser class and the code to be completed. It will return the set of token types that are expected:

val expectedTokenTypes = tokenSuggested("var a = 1 +", SandyLexer::class.java, SandyParser::class.java)

In this case the result will be a list of token types representing:

  • a left parenthesis
  • the minus sign
  • an ID
  • an integer literal
  • a decimal literal

License

This code is released under the MIT License

Versions

Version
0.1.0