EnglishFrenchSpanish

OnWorks favicon

antlr4 - Online in the Cloud

Run antlr4 in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command antlr4 that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


ANTLR - ANother Tool for Language Recognition, version 4

SYNOPSIS


antlr4 [options] file.g4 [ file2.g4 file3.g4 ...]

DESCRIPTION


ANTLR (ANother Tool for Language Recognition) is a parser generator for reading,
processing, executing, or translating structured text or binary files. It's widely used to
build languages, tools, and frameworks. From a grammar, ANTLR generates a parser that can
build and walk parse trees.

OPTIONS


-o outdir
Specify output directory where all output is generated.

ANTLR generates output files in the current directory by default. This option
specifies the output directory where ANTLR should generate parsers, listeners,
visitors, and tokens files.

-lib dir
Specify location of grammars, tokens files.

When looking for tokens files and imported grammars, ANTLR normally looks in the
current directory. This option specifies which directory to look in instead. It is
only used for resolving grammar references for the import statement and the
tokenVocab option. The path to the primary grammar must always be fully specified.

-atn Generate rule augmented transition network diagrams.

This option generates DOT graph files that represent the internal ATN (augmented
transition network) data structures that ANTLR uses to represent grammars. The
files come out as Grammar.rule .dot. If the grammar is a combined grammar, the
lexer rules are named Grammar Lexer.rule .dot.

-encoding encodingname
Specify grammar file encoding; e.g., euc-jp.

By default ANTLR loads grammar files using the UTF-8 encoding, which is a very
common character file encoding that degenerates to ASCII for characters that fit in
one byte. If that grammar file is not the default encoding for your locale, you
need this option so that ANTLR can properly interpret grammar files. This does not
affect the input to the generated parsers, just the encoding of the grammars
themselves.

-message-format format
Specify output style for messages in antlr, gnu, vs2005.

ANTLR generates warning and error messages using templates from directory
tool/resources/org/antlr/v4/tool/templates/messages/formats. By default, ANTLR
uses the antlr.stg (StringTemplate group) file. You can change this to 'gnu' or
'vs2005' to have ANTLR generate messages appropriate for Emacs or Visual Studio. To
make your own called X, create resource
org/antlr/v4/tool/templates/messages/formats/X and place it in the CLASSPATH.

-long-messages
Show exception details when available for errors and warnings.

-listener
Generate parse tree listener (default).

-no-listener
Don't generate parse tree listener.

-visitor
Generate parse tree visitor.

ANTLR can generate both parse tree listeners and visitors; this option and
-listener aren’t mutually exclusive.

-no-visitor
Don't generate parse tree visitor (default).

-package packagename
Specify a package/namespace for the generated code.

Use this option to specify a package or namespace for ANTLR-generated files.
Alternatively, you can add a @header {...} action but that ties the grammar to a
specific language. If you use this option and @header, make sure that the header
action does not contain a package specification otherwise the generated code will
have two of them.

-depend
Generate file dependencies.

Instead of generating a parser and/or lexer, generate a list of file dependencies,
one per line. The output shows what each grammar depends on and what it generates.
This is useful for build tools that need to know ANTLR grammar dependencies.

If you use -lib libdir with -depend and grammar option tokenVocab=A, then the
dependencies include the library path as well.

-Xforce-atn use the ATN simulator for all predictions
-Xlog dump lots of logging info to antlr-timestamp.log

-D<option>=<value>
Set or override a grammar-level option.

This option is useful for generating parsers in different languages without
altering the grammar itself (with --Dlanguage=CSharp for example).

-Werror
Treat warnings as errors.

As part of a large build, ANTLR warning messages could go unnoticed. Turn on this
option to have warnings treated as errors, causing the ANTLR tool to report failure
back to the invoking commandline shell.

-XdbgST
Launch StringTemplate visualizer on generated code.

For those building a code generation target, this option brings up a window showing
the generated code and the templates used to generate that code. It invokes the
StringTemplate inspector window.

-XdbgSTWait
Wait for STViz to close before continuing.

-Xforce-atn
Use the ATN simulator for all predictions.

ANTLR normally builds traditional “switch on token type” decisions where possible
(one token of lookahead is sufficient to distinguish between all alternatives in a
decision). To force even these simple decisions into the adaptive LL(*) mechanism,
use this option.

-Xlog Dump lots of logging info to antlr-timestamp.log.

This option creates a log file containing lots of information messages from ANTLR
as it processes your grammar. If you would like to see how ANTLR translates your
left-recursive rules, turn on this option and look in the resulting log file.

Use antlr4 online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    archlabs_repo
    archlabs_repo
    Package repo for ArchLabs This is an
    application that can also be fetched
    from
    https://sourceforge.net/projects/archlabs-repo/.
    It has been hosted in OnWorks in...
    Download archlabs_repo
  • 2
    Zephyr Project
    Zephyr Project
    The Zephyr Project is a new generation
    real-time operating system (RTOS) that
    supports multiple hardware
    architectures. It is based on a
    small-footprint kernel...
    Download Zephyr Project
  • 3
    SCons
    SCons
    SCons is a software construction tool
    that is a superior alternative to the
    classic "Make" build tool that
    we all know and love. SCons is
    implemented a...
    Download SCons
  • 4
    PSeInt
    PSeInt
    PSeInt is a pseudo-code interpreter for
    spanish-speaking programming students.
    Its main purpose is to be a tool for
    learning and understanding the basic
    concep...
    Download PSeInt
  • 5
    oStorybook
    oStorybook
    oStorybook l'outil privil�gi� des
    �crivains. ATTENTION : voir sur
    http://ostorybook.tuxfamily.org/v5/
    --en_EN oStorybook the right tool for
    writers. WARNIN...
    Download oStorybook
  • 6
    Asuswrt-Merlin
    Asuswrt-Merlin
    Asuswrt-Merlin is a third party
    firmware for select Asus wireless
    routers. Based on the Asuswrt firmware
    developed by Asus, it brings tweaks, new
    features and ...
    Download Asuswrt-Merlin
  • More »

Linux commands

  • 1
    aafigure
    aafigure
    aafigure - convert ASCII art to an
    image ...
    Run aafigure
  • 2
    aafire
    aafire
    aafire, aainfo, aasavefont, aatest -
    aalib example programs ...
    Run aafire
  • 3
    coqtop.opt
    coqtop.opt
    coqtop.opt - The native-code Coq
    toplevel ...
    Run coqtop.opt
  • 4
    coqwc
    coqwc
    coqwc - print the number of
    specification, proof and comment lines
    in Coq files ...
    Run coqwc
  • 5
    g15composer
    g15composer
    g15composer - Scriptable command
    interface to libg15render(3) drawing
    functions DESCRIPTION: G15composer is a
    scriptable command interface to the
    libg15render ...
    Run g15composer
  • 6
    g15daemon
    g15daemon
    g15daemon - provides access to extra
    keys and the LCD available on the
    logitech G15 keyboard. DESCRIPTION:
    G15Daemon allows users access to all
    extra keys by d...
    Run g15daemon
  • More »

Ad