Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Rebuilding Lexer/Parser
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Tom Davies  
View profile  
 More options Oct 8 2007, 6:46 am
From: Tom Davies <tgdav...@gmail.com>
Date: Mon, 08 Oct 2007 03:46:09 -0700
Local: Mon, Oct 8 2007 6:46 am
Subject: Rebuilding Lexer/Parser
Is there a target in the ant files for rebuilding CALLexer.java and
CALParser.java from the .g files? I couldn't find one...

Thanks,
  Tom


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bo Ilic  
View profile  
 More options Oct 8 2007, 2:43 pm
From: Bo Ilic <bo.i...@businessobjects.com>
Date: Mon, 08 Oct 2007 18:43:59 -0000
Local: Mon, Oct 8 2007 2:43 pm
Subject: Re: Rebuilding Lexer/Parser
Hi Tom,

I think you're correct that there isn't one. For various reasons, the
build scripts don't generate all artifacts from original sources, just
those whose original sources are Java or CAL. For example, we use a
variety of document formats (MS Word, DocBook, LaTex) and these are
not converted to PDFs by the build.

To re-build the grammar files you need to run the antlr JAR on the 3
grammar files in order: CALDoc.g, CAL.g and CALTreeParser.g
redirecting output to the appropriate location (i.e. where
CALParser.java etc are currently located). I can send you the script I
use for this tomorrow when I'm back at work (it is a holiday here
today).

Cheers,
Bo

On Oct 8, 3:46 am, Tom Davies <tgdav...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tom Davies  
View profile  
 More options Oct 8 2007, 7:10 pm
From: Tom Davies <tgdav...@gmail.com>
Date: Mon, 08 Oct 2007 16:10:27 -0700
Local: Mon, Oct 8 2007 7:10 pm
Subject: Re: Rebuilding Lexer/Parser

On Oct 9, 4:43 am, Bo Ilic <bo.i...@businessobjects.com> wrote:

> I can send you the script I
> use for this tomorrow when I'm back at work (it is a holiday here
> today).

That would be handy, thanks!

Tom


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bo Ilic  
View profile  
 More options Oct 9 2007, 3:59 pm
From: Bo Ilic <bo.i...@businessobjects.com>
Date: Tue, 09 Oct 2007 12:59:29 -0700
Local: Tues, Oct 9 2007 3:59 pm
Subject: Re: Rebuilding Lexer/Parser
Here is the text of the .bat file I use on my machine to build the
antlr grammars. This should give the general idea, but need
modification depending on platform, jvm etc.

Bo

echo on

rem change to the antlr grammar directory so that
CALCommonTokenTypes.txt can be found
d:
cd /D "D:\dev\quark2\IW_AddOn\PI\Quark_Platform\CAL_Platform\antlr
grammar"
c:\j2sdk1.4.2_06\bin\java -cp d:\dev\quark2\IW_AddOn\PI\Quark_Platform
\export\import\IW_AddOn_Stable\win32_x86\release\bin\External\java
\antlr\antlr-2.7.6\antlr.jar antlr.Tool -o "D:\dev\quark2\IW_AddOn\PI
\Quark_Platform\CAL_Platform\src\org\openquark\cal\compiler" "D:\dev
\quark2\IW_AddOn\PI\Quark_Platform\CAL_Platform\antlr grammar\CAL.g"
c:\j2sdk1.4.2_06\bin\java -cp d:\dev\quark2\IW_AddOn\PI\Quark_Platform
\export\import\IW_AddOn_Stable\win32_x86\release\bin\External\java
\antlr\antlr-2.7.6\antlr.jar antlr.Tool -o "D:\dev\quark2\IW_AddOn\PI
\Quark_Platform\CAL_Platform\src\org\openquark\cal\compiler" "D:\dev
\quark2\IW_AddOn\PI\Quark_Platform\CAL_Platform\antlr grammar
\CALDoc.g"
c:\j2sdk1.4.2_06\bin\java -cp d:\dev\quark2\IW_AddOn\PI\Quark_Platform
\export\import\IW_AddOn_Stable\win32_x86\release\bin\External\java
\antlr\antlr-2.7.6\antlr.jar antlr.Tool -o "D:\dev\quark2\IW_AddOn\PI
\Quark_Platform\CAL_Platform\src\org\openquark\cal\compiler" "D:\dev
\quark2\IW_AddOn\PI\Quark_Platform\CAL_Platform\antlr grammar
\CALTreeParser.g"

pause

On Oct 8, 4:10 pm, Tom Davies <tgdav...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tom Davies  
View profile  
 More options Oct 15 2007, 1:15 am
From: Tom Davies <tgdav...@gmail.com>
Date: Sun, 14 Oct 2007 22:15:26 -0700
Local: Mon, Oct 15 2007 1:15 am
Subject: Re: Rebuilding Lexer/Parser
Thanks for that -- here's one which works for me on OS X:

#!/bin/sh
# assume this is being run from ..../Quark/src/export/OpenQuark_Build/
Build_Scripts
if [ -z QUARK_SRC ]
then
 QUARK_SRC=../../../..
fi
GRAMMAR_DIR="$QUARK_SRC/src/CAL_Platform/antlr grammar"
if [ ! -d "$GRAMMAR_DIR" ]
then
    echo "Expected to find grammars at $GRAMMAR_DIR";
    exit 1;
fi

ANTLRJAR=$QUARK_SRC/src/import/Titan_Research/win32_x86/release/bin/
External/java/antlr.jar

OUTPUT_DIR=$QUARK_SRC/src/CAL_Platform/src/org/openquark/cal/compiler

# change to the antlr grammar directory so that
CALCommonTokenTypes.txt can be found
cd "$GRAMMAR_DIR"

java -cp $ANTLRJAR antlr.Tool -o $OUTPUT_DIR "$GRAMMAR_DIR/CAL.g"

java -cp $ANTLRJAR antlr.Tool -o $OUTPUT_DIR "$GRAMMAR_DIR/CALDoc.g"

java -cp $ANTLRJAR antlr.Tool -o $OUTPUT_DIR "$GRAMMAR_DIR/
CALTreeParser.g"


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google