Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » IMP » Problems with LPG parser
Problems with LPG parser [message #566369] Mon, 17 September 2007 17:53
Eclipse UserFriend
Originally posted by: olegm.gmail.com

Hello,

I am trying to follow the tutorial of IMP
http://eclipse-imp.sourceforge.net/documentation/users_guide .html
and get stuck on compiling LPG grammar (see the log below).

FAQ
http://eclipse-imp.sourceforge.net/documentation/faq.html
mentions project "lpg.runtime.java" that can be used for external
compilation of LPG, however, I didn't manage to find it anywhere.
Whas it meant to import plugin "org.eclipse.imp.lpg.runtime" as a project?

Finally, I have tried running LPG binary on the command-line,
but then it complained about the syntax of a template file (see the log
below).

Any suggestions, please? :)

I have archived my whole workspace at:
http://uuslepo.it.da.ut.ee/~olegm/temp/workspace.tar.gz

Thank You for Your help,
Oleg Mürk

----------------- Bash -----------------
[olegm@localhost ~]$ uname -a
Linux localhost.localdomain 2.6.22.5-76.fc7 #1 SMP Thu Aug 30 13:47:21
EDT 2007 i686 i686 i386 GNU/Linux
[olegm@localhost ~]$ tar xzf Desktop/eclipse-SDK-3.2.2-linux-gtk.tar.gz
[olegm@localhost ~]$ cat eclipse/eclipse.ini
-vm
/usr/java/jdk1.5.0_12/bin/java
-vmargs
-Xms40m
-Xmx1024m

----------------- Eclipse -----------------
Eclipse:Help->Software Updates->...
http://www.cs.cornell.edu/Projects/polyglot/eclipseUpdates/
http://lpg.sourceforge.net/updates/
http://eclipse-imp.sourceforge.net/updates/

Eclipse:Files->New->New Plugin Project
OM

Eclipse:Files->New->Programming Language Descriptor
OM

Eclipse:Files->New->New LPG Grammar with Parser Wrapper

java.io.IOException: java.io.IOException:
/home/olegm/eclipse/plugins/lpg.runtime_2.0.6/lpgexe/lpg-lin ux_x86:
cannot execute

----------------- Bash -----------------
[olegm@localhost ~]$ chmod u+x
/home/olegm/eclipse/plugins/lpg.runtime_2.0.6/lpgexe/lpg-lin ux_x86

----------------- Eclipse -----------------
"" -include-directory='/home/olegm/eclipse/plugins/org.eclipse. imp.lpg.metatooling_1.0.62/templates/;/home/olegm/eclipse/pl ugins/lpg.runtime_2.0.6/templates/' ""
is an invalid option OM/src/om/safari/parser OMParser.g line 1
1190048698873 43

----------------- Bash -----------------
[olegm@localhost ~]$ cat workspace/OM/src/om/safari/parser/OMParser.l
/home/olegm/workspace/OM/src/om/safari/parser/OMParser.g:0:0 :0:0:0:0:
Error: Option
"" -include-directory='/home/olegm/eclipse/plugins/org.eclipse. imp.lpg.metatooling_1.0.62/templates/;/home/olegm/eclipse/pl ugins/lpg.runtime_2.0.6/templates/' ""
is missing preceding '-'
/home/olegm/workspace/OM/src/om/safari/parser/OMParser.g:0:0 :0:0:0:0:
Error:
"" -include-directory='/home/olegm/eclipse/plugins/org.eclipse. imp.lpg.metatooling_1.0.62/templates/;/home/olegm/eclipse/pl ugins/lpg.runtime_2.0.6/templates/' ""
is an invalid option

[olegm@localhost ~]$
../eclipse/plugins/lpg.runtime_2.0.6/lpgexe/lpg-linux_x86
-include-directory='/home/olegm/eclipse/plugins/org.eclipse. imp.lpg.metatooling_1.0.62/templates/;/home/olegm/eclipse/pl ugins/lpg.runtime_2.0.6/templates/'
workspace/OM/src/om/safari/parser/OMParser.g

Options in effect for workspace/OM/src/om/safari/parser/OMKWLexer.gi:


ACTION-BLOCK=("workspace/OM/src/om/safari/parser/OMKWLexer.java ","/.","./")

AST-DIRECTORY="./Ast" AST-TYPE="Ast" NOATTRIBUTES NOAUTOMATIC-AST
NOBACKTRACK BYTE CONFLICTS
DAT-DIRECTORY="workspace/OM/src/om/safari/parser/"
DAT-FILE="workspace/OM/src/om/safari/parser/OMKWLexerdcl.data "
DCL-FILE="workspace/OM/src/om/safari/parser/OMKWLexerdcl.java "
NODEBUG
DEF-FILE="workspace/OM/src/om/safari/parser/OMKWLexerdef.java "
NOEDIT
NOERROR-MAPS ESCAPE='$'

EXPORT-TERMINALS=("workspace/OM/src/om/safari/parser/OMParsersym.java ","TK_","")
EXTENDS-PARSETABLE FACTORY="new " FILE-PREFIX="OMKWLexer" NOFIRST
NOFOLLOW NOGLR NOGOTO-DEFAULT
GRM-FILE="workspace/OM/src/om/safari/parser/OMKWLexer.gi"
IMP-FILE="workspace/OM/src/om/safari/parser/OMKWLexerimp.java "

INCLUDE-DIRECTORY=" /home/olegm/eclipse/plugins/org.eclipse.imp.lpg.metatooling_ 1.0.62/templates/;/home/olegm/eclipse/plugins/lpg.runtime_2. 0.6/templates/ "
IMP-FILE="workspace/OM/src/om/safari/parser/OMKWLexerimp.java "
LALR=1
NOLIST MARGIN=4 MAX-CASES=1024 NAMES=OPTIMIZED NONT-CHECK
OR_MARKER='|'
OUT-DIRECTORY="workspace/OM/src/om/safari/parser/"
PACKAGE="om.safari.parser" NOPARENT-SAVE
PARSETABLE-INTERFACES="lpg.runtime.ParseTable" PREFIX="Char_"
PRIORITY
PROGRAMMING_LANGUAGE=JAVA
PRS-FILE="workspace/OM/src/om/safari/parser/OMKWLexerprs.java "
NOQUIET
READ-REDUCE REMAP-TERMINALS NOSCOPES NOSERIALIZE NOSHIFT-DEFAULT
NOSINGLE-PRODUCTIONS NOSOFT-KEYWORDS NOSTATES SUFFIX=""
SYM-FILE="workspace/OM/src/om/safari/parser/OMKWLexersym.java "
TAB-FILE="OMKWLexer.t" TABLE TEMPLATE="KeywordTemplate.gi"
TRACE=CONFLICTS NOVARIABLES NOVERBOSE NOVISITOR
VISITOR-TYPE="Visitor"
WARNINGS NOXREF

/home/olegm/eclipse/plugins/org.eclipse.imp.lpg.metatooling_ 1.0.62/templates/KeywordTemplate.gi:25:1:25:4:775:778:
Error: Syntax error detected on this token
Previous Topic:Problems compiling .g file
Next Topic:Problems with LPG parser
Goto Forum:
  


Current Time: Fri Apr 26 12:04:30 GMT 2024

Powered by FUDForum. Page generated in 0.03148 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top