Giter Club home page Giter Club logo

antlrworks's Introduction

ANTLRWorks

Release check-list

  • make sure all the bugs are resolved in http://www.antlr.org/jira/browse/AW
  • make sure ANTLRWorks is compiled against the correct version of ANTLR and ST sources
  • update the ANTLR and ST jar files in main/lib
  • change version number (and date when it applies) into these files:
    • main/build.properties
    • main/resources/properties/strings.properties
    • main/plugin/src/org/antlr/works/plugin/properties/strings.properties
  • update history in:
    • main/History
  • update online files (ask Terence for the path):
    • index.html
    • update.xml and such files for new versions
    • push release notes and such to doc dir
  • build ANTLRWorks by running ant on the main build file: $ cd main $ ant
  • verify the following in main/dist folder:
    • file versions are correct
    • jar file is running fine
    • OS X application is launching fine
  • upload files online:
    • antlrworks-1.x.zip
    • antlrworks-1.x-src.zip
    • antlrworks-1.x.jar
  • branch the release in p4 (main -> release/1.x)

Tools

http://pmd.sourceforge.net/ http://findbugs.sourceforge.net/

Info

Enable project document: set prefs PREF_PROJET_DOCUMENT to true DOT: /Applications/Graphviz.app/Contents/MacOS/dot JavaC Windows Classpath example: C:\Program Files\Java\jdk1.5.0_03\bin\javac SD path width: modify constants in GPath and GPathGroup Windows Prefs: - Command "regedit.exe" - HKEY_CURRENT_USER\Software\JavaSoft\Prefs\org\antlr\works

Debugging

Problem with syntax diagram path? Look into:

  • GGraphGroup (where the path is created)
  • FAFactory (where the optimized FA is created)
  • GFactory (where everything is assembled before display)

Join the chat at https://gitter.im/antlr/antlrworks

antlrworks's People

Contributors

gitter-badger avatar jean-bovet avatar muhammadsawalhy avatar parrt avatar sharwell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

antlrworks's Issues

ANTLRWorks for MAC OS does not display characters | and ( in text fields.

screen shot 2013-06-21 at 10 44 56 am

this is how my simple grammar looks copied in text editor:

grammar TestExpr;

options {
output=AST;
    ASTLabelType=CommonTree; 
}

expr
    :   andExpr (('OR'|'|') andExpr)* EOF;
andExpr :   notExpr(('AND'|','|'+') notExpr)*;
notExpr :   ('NOT'|'-')? kpp;   
kpp :   keyword|phrase|proximity|'(' expr ')';
keyword
    :   CHAR;
phrase
    :   '"' keyword (PHRASE_SEPARATOR keyword)* '"';
proximity
    :   phrase '~' INT;
CHAR    :   ('A'..'Z') | ('a'..'z')+;
INT :   '0'..'9'+;
NEWLINE :   '\r'? '\n';
PHRASE_SEPARATOR    :   '\u2022';
WS  :   (' '|'\t'|'\n'|'\r')+ {skip();};

1.5.1 incomplete throws RecognitionException

I just downloaded antlworks 1.5.1 from http://www.antlr3.org/download/antlrworks-1.5.jar and tried to generate my grammar file. The good point of this version (compared to 1.5rc1), it generates the correct return type (as defined in the option ASTLabelType) for all sub-classes of ParserRuleReturnScope.

However, it generates an incomplete throws clause for the corresponding methods. The output in the console states:

[22:22:17] warning(24):  template error: context [/outputFile /parser /genericParser /region__/genericParser__members /region__/genericParser__members /_sub488] 8:27 no such property or can't access: null.hasSynPred

As an example of such a wrong method signature:

public final TSPHPParser.compilationUnit_return compilationUnit() throws  {

I could easily create a work around for this problem by adding the latest classes from the antlr-3.5.1-complete.jar to the antlrworks-1.5.jar

I suppose some classes are missing. I had a look into the src but couldn't really get along. Seems like the project is moving from ant to maven or something. Send me an email with some guiding and I would be glad to contribute to the project.

ANTLRworks fails to generate proper Java Code

I have a simple grammar (cf. https://gist.github.com/4499299)

If I compile it manually with antlr-3.5-complete.jar and set up a manual test rig, everything works as expected.

However, if I use ANTLRworks 1.5, I check the grammar.. OK, I generate code.. OK I click on debug and it starts compiling and complains abour errors in the parser (cf. gist above).

ANTLRworks does not recompile parser or lexer for debugging

An issue that I think is present also in versions before 1.5 is:

Usually if you made any changes to the grammar or if the Lexer/Parser classes or __Test___input file are missing, ANTLRworks would regenerate and recompile them when asked to Debug...

However sometimes it does not. E.g. if you delete classes, it still will assume they are there and run into timeout when trying to debug.

Also the test input seems to be stored by ANTLRworks internally because it suggests the previous test input even if you delete the __Test___input file.

Once you run into this behaviour you have to shut down ANTLRworks and restart it.

ANTLRWORKS No longer compatible with IDEA

com.intellij.openapi.fileEditor.FileDocumentManager.addFileDocumentManagerListener(Lcom/intellij/openapi/fileEditor/FileDocumentManagerListener;)V
java.lang.NoSuchMethodError: com.intellij.openapi.fileEditor.FileDocumentManager.addFileDocumentManagerListener(Lcom/intellij/openapi/fileEditor/FileDocumentManagerListener;)V
	at org.antlr.works.plugin.intellij.PIEditor.register(PIEditor.java:155)
	at org.antlr.works.plugin.intellij.PIEditor.<init>(PIEditor.java:104)
	at org.antlr.works.plugin.intellij.PIEditorProvider.createEditor(PIEditorProvider.java:49)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.a(FileEditorManagerImpl.java:860)
	at com.intellij.openapi.application.impl.ApplicationImpl.invokeAndWait(ApplicationImpl.java:653)
	at com.intellij.openapi.application.impl.ApplicationImpl.invokeAndWait(ApplicationImpl.java:666)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl4(FileEditorManagerImpl.java:959)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl3(FileEditorManagerImpl.java:786)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.a(FileEditorManagerImpl.java:768)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.a(CoreCommandProcessor.java:149)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:109)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:99)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:85)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl2(FileEditorManagerImpl.java:768)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileWithProviders(FileEditorManagerImpl.java:699)
	at com.intellij.openapi.fileEditor.ex.FileEditorManagerEx.openFile(FileEditorManagerEx.java:155)
	at com.intellij.codeInsight.navigation.NavigationUtil.a(NavigationUtil.java:213)
	at com.intellij.codeInsight.navigation.NavigationUtil.openFileWithPsiElement(NavigationUtil.java:189)
	at com.intellij.ide.projectView.impl.nodes.AbstractPsiBasedNode.navigate(AbstractPsiBasedNode.java:239)
	at com.intellij.ide.projectView.impl.nodes.AbstractPsiBasedNode.navigate(AbstractPsiBasedNode.java:249)
	at com.intellij.ide.projectView.impl.nodes.PsiFileNode.navigate(PsiFileNode.java:133)
	at com.intellij.util.OpenSourceUtil.navigate(OpenSourceUtil.java:53)
	at com.intellij.util.OpenSourceUtil.openSourcesFrom(OpenSourceUtil.java:31)
	at com.intellij.util.EditSourceOnDoubleClickHandler$TreeMouseListener.processDoubleClick(EditSourceOnDoubleClickHandler.java:128)
	at com.intellij.util.EditSourceOnDoubleClickHandler$TreeMouseListener.onDoubleClick(EditSourceOnDoubleClickHandler.java:120)
	at com.intellij.ui.DoubleClickListener.onClick(DoubleClickListener.java:30)
	at com.intellij.ui.ClickListener$1.mouseReleased(ClickListener.java:73)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
	at java.awt.Component.processMouseEvent(Component.java:6541)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
	at com.intellij.ui.treeStructure.Tree.processMouseEvent(Tree.java:423)
	at com.intellij.ide.dnd.aware.DnDAwareTree.processMouseEvent(DnDAwareTree.java:58)
	at java.awt.Component.processEvent(Component.java:6306)
	at java.awt.Container.processEvent(Container.java:2237)
	at java.awt.Component.dispatchEventImpl(Component.java:4897)
	at java.awt.Container.dispatchEventImpl(Container.java:2295)
	at java.awt.Component.dispatchEvent(Component.java:4719)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
	at java.awt.Container.dispatchEventImpl(Container.java:2281)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4719)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
	at java.awt.EventQueue.access$500(EventQueue.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:715)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:737)
	at java.awt.EventQueue$4.run(EventQueue.java:735)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
	at com.intellij.ide.IdeEventQueue.j(IdeEventQueue.java:822)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:646)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:366)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.