[e-cvs] cvs commit: e/src/jsrc/org/quasiliteral/astro Functor.java
markm@eros.cs.jhu.edu
markm@eros.cs.jhu.edu
Sat, 27 Oct 2001 13:27:44 -0400
markm 01/10/27 13:27:43
Modified: src/bin/resources/org/erights/e/elang/syntax
ParserTables.data
src/build makerules.mk
src/csrc/setup eprops-template.txt
src/esrc/com/skyhunter/e/awt/dnd setupDropFuncAuthor.emaker
src/esrc/com/skyhunter/e/net sendValveMaker.emaker
src/esrc/com/skyhunter/e/security
powerboxControllerMakerAuthor.emaker
src/esrc/com/skyhunter/installer
agreedCapsPetsVowMakerAuthor.emaker
persistentInstallerAuthor.emaker
stringDataKit.emaker
src/esrc/scripts eBrowser.e elmer.e setup.e
src/jsrc Makefile
src/jsrc/org/erights/e/elang/interp Interp.java
ScopeSetup.java
src/jsrc/org/erights/e/elang/syntax EBuilder.java
EParser.java e.y
src/jsrc/org/erights/e/elib/prim StaticMaker.java
src/jsrc/org/erights/e/meta/java/io FileSugar.java
ReadOnlyFile.java
src/jsrc/org/quasiliteral/astro Functor.java
Log:
'pragma enable(..)' and 'pragma disable(..)' for syntax
experimentation
Revision Changes Path
1.23 +28 -25 e/src/bin/resources/org/erights/e/elang/syntax/ParserTables.data
Index: ParserTables.data
===================================================================
RCS file: /cvs/e/src/bin/resources/org/erights/e/elang/syntax/ParserTables.data,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
Binary files /tmp/cvsAaXrhb and /tmp/cvsqyBeKb differ
1.15 +2 -8 e/src/build/makerules.mk
Index: makerules.mk
===================================================================
RCS file: /cvs/e/src/build/makerules.mk,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- makerules.mk 2001/04/13 08:08:33 1.14
+++ makerules.mk 2001/10/27 17:27:41 1.15
@@ -212,13 +212,7 @@
PLATDIR=linux-386-glibc
endif
-ifdef CLASSPATH
- MORE_PATH=$(SEP)$(CLASSPATH)
-else
- MORE_PATH=
-endif
-
-COMMON_PATH=$(TOP)/classes$(SEP)$(TOP)/src/bin/jars/hydro.jar$(MORE_PATH)
+COMMON_PATH=$(TOP)/classes$(SEP)$(TOP)/src/bin/jars/hydro.jar
ifdef JAVA_HOME
JAVACMD=$(JAVA_HOME)/jre/bin/java
@@ -230,7 +224,7 @@
else
# not JAVA_HOME
JAVACMD=java
- COMP_PATH=$(MORE_PATH)
+ COMP_PATH=
ifndef JAVAC
JAVAC=javac
endif
1.22 +5 -5 e/src/csrc/setup/eprops-template.txt
Index: eprops-template.txt
===================================================================
RCS file: /cvs/e/src/csrc/setup/eprops-template.txt,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- eprops-template.txt 2001/10/01 08:31:04 1.21
+++ eprops-template.txt 2001/10/27 17:27:41 1.22
@@ -1,9 +1,9 @@
# E Configuration File (or E Configuration Template File)
#
-# If you are looking at eprops-template.txt, then
-# you are looking at a template to be used to construct eprops.txt.
-# In this case, for several property definitions, you should instead
-# see text of the form, for example,
+# If you are looking at eprops-template.txt, then you are looking at a
+# template to be used to construct eprops.txt. In this case, for
+# several property definitions, you should instead see text of the
+# form, for example,
#
# e.version=$<<e.version>>
#
@@ -21,7 +21,7 @@
# eprops.txt file, all property definitions should already have the
# above form. You may create an eprops.txt file manually by copying
# the eprops-template.txt file and replacing the
-# dollar-double-curly-bracket for with the Java propert definition.
+# dollar-double-curly-bracket form with the Java property definition.
#
# Notice that there are no quotes around the value. This is correct
# even if the property value contains spaces, since the Java property
1.2 +8 -5 e/src/esrc/com/skyhunter/e/awt/dnd/setupDropFuncAuthor.emaker
Index: setupDropFuncAuthor.emaker
===================================================================
RCS file: /cvs/e/src/esrc/com/skyhunter/e/awt/dnd/setupDropFuncAuthor.emaker,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- setupDropFuncAuthor.emaker 2001/09/14 22:52:50 1.1
+++ setupDropFuncAuthor.emaker 2001/10/27 17:27:42 1.2
@@ -27,19 +27,22 @@
def flavor := findFlavor()
if (flavor != null) {
def obj := dropTargetDropEvent getTransferable() getTransferData(flavor)
- traceln("got object: " + obj)
flavorReactorMap[flavor] run(obj)
completedDrop := true
}
} catch err {traceln ("getTransfer err: " + err)}
- dropTargetDropEvent dropComplete(completedDrop)
+ dropTargetDropEvent dropComplete(true)
}
to dragEnter(dropTargetDragEvent) {
- traceln("dragEnter started")
- #dropTargetDragEvent acceptDrag()
+ traceln("drop target sees dragEnter")
+ dropTargetDragEvent acceptDrag(dropTargetDragEvent getDropAction())
}
+ to dragOver(dropTargetDragEvent) {
+ #dropTargetDragEvent acceptDrag(dropTargetDragEvent getDropAction())
+
+ }
match [verb,args] {
- #if (verb != "dragOver") {traceln("got drop behavior: " + verb)}
+ #traceln("on match drop target sees: " + verb)
}
}
component setDropTarget(
1.3 +2 -3 e/src/esrc/com/skyhunter/e/net/sendValveMaker.emaker
Index: sendValveMaker.emaker
===================================================================
RCS file: /cvs/e/src/esrc/com/skyhunter/e/net/sendValveMaker.emaker,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sendValveMaker.emaker 2001/04/15 05:04:26 1.2
+++ sendValveMaker.emaker 2001/10/27 17:27:42 1.3
@@ -25,16 +25,15 @@
def vowCompletion := E send(actionTrio[0],actionTrio[1],actionTrio[2])
resolver resolve(vowCompletion)
when (vowCompletion) -> done(complete) {
- numRunning -= 1
- startNext()
} catch prob {
+ } finally {
numRunning -= 1
startNext()
}
}
}
def valve {
- to promiseAction(actionTrio) :any {
+ to makeActionVow(actionTrio) :any {
def [completionPromise, resolver] := PromiseMaker()
actionQueue add([actionTrio, resolver])
startNext()
1.4 +56 -27 e/src/esrc/com/skyhunter/e/security/powerboxControllerMakerAuthor.emaker
Index: powerboxControllerMakerAuthor.emaker
===================================================================
RCS file: /cvs/e/src/esrc/com/skyhunter/e/security/powerboxControllerMakerAuthor.emaker,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- powerboxControllerMakerAuthor.emaker 2001/09/14 20:54:04 1.3
+++ powerboxControllerMakerAuthor.emaker 2001/10/27 17:27:42 1.4
@@ -8,6 +8,14 @@
awt__uriGetter, swing__uriGetter)
def uiKit := <import:com.skyhunter.ex.swing.uiKitAuthor> (awt__uriGetter,swing__uriGetter)
def runSource := <import:com.skyhunter.e.lang.runConfinedSourceFuncAuthor> run(unsafe__uriGetter, interp, traceln, stdout)
+
+ class localURIGetterMaker(directoryCanonicalPath) :near {
+ def uriGetter {
+ to get(relativePath) :near {
+ <unsafe:java.net.URL> new("file:" + directoryCanonicalPath + relativePath)
+ }
+ }
+ }
def validFrameVerbs := ["show",
"pack", "addWindowListener",
"dispose", "hide",
@@ -27,9 +35,21 @@
def caplet
def powersMap := [] asKeys() diverge()
def clipboard := <awt:Toolkit> getDefaultToolkit() getSystemClipboard()
- //XXX document, when a caplet returns a copy or cut value, that
+ //XXX document, when a caplet returns a copy or cut value, that
//XXX value must implement both transferable and ClipboardOwner
//XXX as does StringSelection
+
+ def spinoffCapletSource(source) {
+ def caplet := runSource(source)
+ traceln("ran source made caplet: " + caplet)
+ def capsPetsVow := <import:com.skyhunter.installer.agreedCapsPetsVowMakerAuthor>(unsafe__uriGetter, file__uriGetter) new(caplet getRequestedCaps(), "")
+ when (capsPetsVow) -> done(capsPets) {
+ traceln("got capsxml for spinoff")
+ def pets := capsPets getPetMap()
+ powerboxControllerMaker new(pets get("Name", "Caplet"), pets get("Icon", null), capsPets getCapsXML())
+ } catch prob {traceln("incomplete installation of spinoff caplet" + prob)}
+ }
+
class powerbarControllerMaker(eFrame) :near {
def cutFunc() {
traceln("about to do cut reaction")
@@ -50,7 +70,7 @@
clipboard setContents(contents, contents)
} catch prob {
// No copy reaction
- }
+ }
}
def copyURL := <resource:com/skyhunter/e/icons/copy.gif>
def copyButton := uiKit newToolButton( <swing:ImageIcon> new(copyURL)getImage() , "Global Copy", copyFunc)
@@ -101,7 +121,7 @@
contentPane setLayout(<awt:BorderLayout> new())
traceln("setting outer content pane")
def frame {
- to setTitle(title) {myJFrame setTitle(`$capletName $title`)}
+ to setTitle(title) {myJFrame setTitle(`$capletName - $title`)}
to getContentPane() :near {
traceln("contentPane requested")
contentPane
@@ -113,10 +133,9 @@
}
}
def powerbarController := powerbarControllerMaker new(frame)
- //XXX why do dialogs made with this have shrunken contentPane layouts?
def outerContentPane :=
JPanel`$contentPane.X.Y
- ${powerbarController getPowerPanel()}`
+ ${powerbarController getPowerPanel()}`
myJFrame setContentPane(outerContentPane)
frame
}
@@ -127,6 +146,7 @@
def processCapsSml() {
powersMap[powerbox FRAME_MAKER()] := frameMaker
powersMap[powerbox TRACELN()] := traceln
+ powersMap[powerbox DROP_TARGET()] := <awt:dnd.DropTarget>
powersMap[powerbox INITIAL_DOC_RCVRS()] := []
powersMap[powerbox PET_NAME()] := capletName
powersMap[powerbox PET_ICON()] := optCapletIconImage
@@ -137,20 +157,20 @@
def tree := domFromText(agreedCapsXml)
traceln("made dom tree: " + tree)
def agreedUrlProtocols := [] asKeys() diverge()
- for each in tree {
- def capsVisitor {
- to visitUrlProtocols(subNodes) {
- for each in subNodes {each welcome (capsVisitor)}
- }
- to visitProtocol(subNodes) {
- traceln("getting Protocol in powerbox construction")
- agreedUrlProtocols[subNodes[0] getData()] := null
- }
- to visitCaps(subNodes) {
- for each in subNodes { each welcome(capsVisitor)}
- }
- match [verb, args] {traceln("capsVisitor unhandled: " + verb)}
+ def capsVisitor {
+ to visitUrlProtocols(subNodes) {
+ for each in subNodes {each welcome (capsVisitor)}
+ }
+ to visitProtocol(subNodes) {
+ traceln("getting Protocol in powerbox construction")
+ agreedUrlProtocols[subNodes[0] getData()] := null
+ }
+ to visitCaps(subNodes) {
+ for each in subNodes { each welcome(capsVisitor)}
}
+ match [verb, args] {traceln("capsVisitor unhandled: " + verb)}
+ }
+ for each in tree {
each welcome(capsVisitor)
}
traceln("agreedUrlProtocols: " + agreedUrlProtocols)
@@ -159,8 +179,10 @@
def bind powerbox {
to requestExit() {
#interp continueAtTop()
+ }
+ to subsetPowers(restrictedMap) :near {
+ throw("XXX not yet implemented")
}
- to subsetPowers(restrictedMap) :near {}
to requestFilesPromise(editable, title, justification, startPathText, filter) :any {
def answer := [] diverge()
def chooser := <swing:JFileChooser> new()
@@ -191,23 +213,26 @@
answer
}
to requestUrlPromise(urlString, title, justification) :any {}
- to requestCapPromise(title, justification) :any {}
+ to requestCapPromise(title, justification) :any {
+ throw("XXX requestCapPromise not yet implemented")
+ }
to optCap(capKey) :any {
- if (powersMap maps(capKey)) {
- powersMap[capKey]
- } else {null}
+ powersMap get(capKey, null)
}
+ #XXX remove runSource sometime, when capability-free runconfined source emaker available
to runSource(sourceText) :any {runSource(sourceText)}
+ to spinoffCapletSource(sourceText) {spinoffCapletSource(sourceText)}
to getGifImage(gifFile) :near {<swing:ImageIcon> new(gifFile) getImage()}
- to CAP_TIMER() :any {"capTimerGetter"}
+ to CAP_TIMER() :any {"capTimer"}
to FRAME_MAKER() :any {"frameMaker"}
to TRACELN() :any {"traceln"}
to URL_MAKER() :any {"urlMaker"}
to INITIAL_DOC_RCVRS() :any {"initialDocRcvrs"}
- to LOCAL_RESOURCES() :any {"localResources"}
+ to LOCAL__URIGETTER() :any {"local__uriGetter"}
to DOC_SUFFIX() :any {"docSuffix"}
to PET_NAME() :any {"petName"}
to PET_ICON() :any {"petIcon"}
+ to DROP_TARGET() :any {"dropTarget"}
}
processCapsSml()
def powerboxController {
@@ -221,8 +246,12 @@
}
to launchFile(capletFile) {
def capletAuthorSource := capletFile getText()
- def localResources := capletFile getParentFile() transReadOnly()
- powersMap[powerbox LOCAL_RESOURCES()] := localResources
+ #def localResources := capletFile getParentFile() transReadOnly()
+ #def localResources := <unsafe:java.net.URL> new(
+ # "file:" + capletFile getParentFile() getCanonicalPath())
+ def localResources := localURIGetterMaker new(
+ capletFile getParentFile() getCanonicalPath())
+ powersMap[powerbox LOCAL__URIGETTER()] := localResources
powerboxController launchSource(capletAuthorSource)
}
to startExternalCaplet(theCaplet) {
1.2 +200 -140 e/src/esrc/com/skyhunter/installer/agreedCapsPetsVowMakerAuthor.emaker
Index: agreedCapsPetsVowMakerAuthor.emaker
===================================================================
RCS file: /cvs/e/src/esrc/com/skyhunter/installer/agreedCapsPetsVowMakerAuthor.emaker,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- agreedCapsPetsVowMakerAuthor.emaker 2001/09/12 00:01:52 1.1
+++ agreedCapsPetsVowMakerAuthor.emaker 2001/10/27 17:27:42 1.2
@@ -2,145 +2,205 @@
//Copyright (C) 2001 Combex. All Rights Reserved.
def agreedCapsPetsVowMakerAuthor(unsafe__uriGetter, file__uriGetter) :any {
- def swing__uriGetter := <unsafe:javax.swing.*>
- def awt__uriGetter := <unsafe:java.awt.*>
- def stringDataKit := <import:com.skyhunter.installer.stringDataKit>
- def JPanel__quasiParser := <import:org.erights.ex.swing.JPanelQParserMaker> new(awt__uriGetter, swing__uriGetter)
- def uiKit := <import:com.skyhunter.ex.swing.uiToolsAuthor> run(awt__uriGetter, swing__uriGetter)
- def traceOut := <unsafe:java.lang.System> out()
- def trace(text) {E call(traceOut, "print(Object)", [text])}
- def traceln(text) {trace(text + "\n")}
-
- def mapDomText := <import:com.skyhunter.e.util.mapDomText>
-
- class capsPetsMaker(capsXML,petMap) :near {
- def capsPets {
- to getCapsXML() :String {capsXML}
- to getPetMap() :near {petMap}
- }
- }
- def validUrlProtocols := ["http","https", "ftp","mailto"] asKeys()
- class agreedCapsPetsPromiser(requestsXML) :any {
- def [capsPromise, capsSolver] := PromiseMaker()
- traceln("about to get requestsTree")
- def requestsTree := (sml__quasiParser valueMaker(requestsXML) substitute(ListMaker run()))
- traceln("got requestsTree")
- def agreedUrlProtocols := [] asKeys() diverge()
- def urlProtocolsListPanel := <swing:Box> new(1)
- def petFieldsMap := [] asKeys() diverge()
- def petListPanel := <swing:Box> new(1)
- def capTabsPane := <swing:JTabbedPane> new()
-
- def protocolsVisitor {
- to visitProtocol(subnodes) {
- def table := mapDomText(subnodes)
- traceln("table: " + table)
- if (validUrlProtocols maps(table["Name"])) {
- def protocolCheck := <swing:JCheckBox> new(table["Name"])
- def whyLabel := <swing:JLabel> new(table["Why"])
- def protocolPane := JPanel`$protocolCheck $whyLabel.X`
- def clickedRunner() {
- traceln("into clickedRunner")
- if (protocolCheck isEnabled()) {
- agreedUrlProtocols[table["Name"]] := null
- } else {
- agreedUrlProtocols removeKey(table["Name"])
- }
- traceln("did clickedRunner: " + agreedUrlProtocols)
- }
- uiKit attachAction(protocolCheck, clickedRunner)
- urlProtocolsListPanel add(protocolPane)
- } else {traceln("invalid protocol: " + table["Name"])}
- }
- to viewText(text) {}
- }
-
- def requestsVisitor {
- to visitUrlProtocols(subnodes) {
- for each in subnodes {each welcome(protocolsVisitor)}
- def helpLabel := <swing:JLabel> new(stringDataKit getUrlProtocolHelp())
- def urlProtocolsMainPanel :=
- JPanel`$urlProtocolsListPanel
+ def swing__uriGetter := <unsafe:javax.swing.*>
+ def awt__uriGetter := <unsafe:java.awt.*>
+ def stringDataKit := <import:com.skyhunter.installer.stringDataKit>
+ def JPanel__quasiParser := <import:org.erights.ex.swing.JPanelQParserMaker> new(awt__uriGetter, swing__uriGetter)
+ def uiKit := <import:com.skyhunter.ex.swing.uiToolsAuthor> run(awt__uriGetter, swing__uriGetter)
+ def traceOut := <unsafe:java.lang.System> out()
+ def trace(text) {E call(traceOut, "print(Object)", [text])}
+ def traceln(text) {trace(text + "\n")}
+ def winImage := <swing:ImageIcon> new(
+ <resource:com/skyhunter/eDesk/icons/super.gif>) getImage()
+ def lbl(contents) :near { <swing:JLabel> new(contents)}
+
+ def mapDomText := <import:com.skyhunter.e.util.mapDomText>
+
+ class capsPetsMaker(capsXML,petMap) :near {
+ def capsPets {
+ to getCapsXML() :String {capsXML}
+ to getPetMap() :near {petMap}
+ }
+ }
+ #def validUrlProtocols := ["http","https", "ftp","mailto"] asKeys()
+ class agreedCapsPetsVowMaker(requestsXML, baseDirPath) :any {
+ def [capsPromise, capsSolver] := PromiseMaker()
+ traceln("about to get requestsTree")
+ def requestsTree := (sml__quasiParser valueMaker(requestsXML) substitute(ListMaker run()))
+ traceln("got requestsTree")
+ def agreedUrlProtocols := [] asKeys() diverge()
+ def urlProtocolsListPanel := <swing:Box> new(1)
+ def petFieldsMap := [] asKeys() diverge()
+ var petNameLabel := lbl(" ")
+ var petNameField := lbl(" ")
+ var petSuffixLabel := lbl(" ")
+ var petSuffixField := lbl(" ")
+ var petIconLabel := lbl(" ")
+ var petIconField := lbl(" ")
+ #petListPanel setLayout(<awt:GridLayout> new(3,2))
+ def capTabsPane := <swing:JTabbedPane> new()
+
+ def buildPetIconSelectionPane(defaultsTable) :near {
+ def tempPath := baseDirPath + defaultsTable["Icon"]
+ var iconPath := <file: tempPath> getCanonicalPath()
+ traceln("iconPath: " + iconPath)
+ def pathLabel := <swing:JLabel> new(iconPath)
+ petFieldsMap["Icon"] := pathLabel
+ def icon := <swing:ImageIcon> new(
+ <unsafe:java.net.URL> new("file:" + iconPath))
+ def iconLabel := <swing:JLabel> new(icon)
+ def changeIconFunc() {
+ def dialog := <awt:FileDialog> new(<swing:JFrame> new(),
+ "Select Icon For This Caplet",
+ 0)
+ dialog show()
+ def fileName := dialog getFile()
+ if (fileName != null && fileName size() > 0 ) {
+ iconPath := dialog getDirectory() + fileName
+ pathLabel setText(iconPath)
+ def newIcon := <swing:ImageIcon> new(
+ <unsafe:java.net.URL> new("file:" + iconPath))
+ iconLabel setIcon(newIcon)
+ }
+
+ }
+ def newIconB := uiKit newButton("Change Icons",changeIconFunc)
+ traceln("about to build JPanel")
+ JPanel`$iconLabel $pathLabel >
+ V $newIconB ${lbl(" ")}.X `
+ }
+
+ def protocolsVisitor {
+ to visitProtocol(subnodes) {
+ def table := mapDomText(subnodes)
+ traceln("table: " + table)
+ #if (validUrlProtocols maps(table["Name"])) {
+ def protocolCheck := <swing:JCheckBox> new(table["Name"])
+ def whyLabel := <swing:JLabel> new(table["Why"])
+ def protocolPane := JPanel`$protocolCheck $whyLabel.X`
+ def clickedRunner() {
+ traceln("into clickedRunner")
+ if (protocolCheck isEnabled()) {
+ agreedUrlProtocols[table["Name"]] := null
+ } else {
+ agreedUrlProtocols removeKey(table["Name"])
+ }
+ traceln("did clickedRunner: " + agreedUrlProtocols)
+ }
+ uiKit attachAction(protocolCheck, clickedRunner)
+ urlProtocolsListPanel add(protocolPane)
+ #} else {traceln("invalid protocol: " + table["Name"])}
+ }
+ to viewText(text) {}
+ }
+
+ def requestsVisitor {
+ to visitUrlProtocols(subnodes) {
+ for each in subnodes {each welcome(protocolsVisitor)}
+ def helpLabel := <swing:JLabel> new(stringDataKit getUrlProtocolHelp())
+ def urlProtocolsMainPanel :=
+ JPanel`$urlProtocolsListPanel
$helpLabel.Y`
- urlProtocolsMainPanel setName("Web")
- capTabsPane add(urlProtocolsMainPanel)
- }
- to visitPet(subnodes) {
- def panels := [] diverge()
- def table := mapDomText(subnodes)
- traceln("table: " + table)
- def makeLabelField(label, defaultKey) :near {
- def field := <swing:JTextField> new(table[defaultKey])
- petFieldsMap[defaultKey] := field
- JPanel`${<swing:JLabel> new(label)} $field`
- }
- if (table maps("Name")) {
- panels push(makeLabelField("Pet Name:", "Name"))
- }
- if (table maps("Icon")) {
- panels push(makeLabelField("Icon Path:", "Icon"))
- }
- if (table maps("Suffix")) {
- panels push(makeLabelField("Default File Extension: ", "Suffix"))
- }
- if (panels size() > 0) {
- def helpLabel := <swing:JLabel> new(stringDataKit getPetHelp())
- for each in panels {
- petListPanel add(each)
- }
- def petMainPanel :=
- JPanel`$petListPanel
- $helpLabel.Y`
- petMainPanel setName("Pet Data")
- capTabsPane add(petMainPanel)
- }
- }
- to viewText(text) {}
- }
- def topVisitor {
- to visitRequests(subnodes) {
- for each in subnodes {each welcome (requestsVisitor)}
- }
- to visitPet(subnodes) {requestsVisitor visitPet(subnodes)}
- to visitUrlProtocols(subnodes) { requestsVisitor visitUrlProtocols(subnodes)}
- to viewText(blah) {}
- }
- for each in requestsTree {each welcome(topVisitor)}
- def frame := <swing:JFrame> new()
- def windowListener {
- to windowClosing(event) {
- capsSolver smash("Grants not made")
- frame dispose()
- }
- match [verb, args] {}
- }
- frame addWindowListener(windowListener)
- def grantRunner() {
- traceln("into grantrunner: " )
- frame dispose()
- var xmlOut := "<caps>"
- if (agreedUrlProtocols size() > 0) {
- xmlOut += "<urlProtocols>"
- for each => dummy in agreedUrlProtocols {
- xmlOut += `<protocol>$each</protocol>`
- }
- xmlOut += "</urlProtocols>"
- }
- xmlOut += "</caps>"
- def petData := [] asKeys() diverge()
- for key => value in petFieldsMap {
- petData[key] := value getText()
- }
- capsSolver resolve(capsPetsMaker new(xmlOut,petData snapshot() ) )
- }
- def grantButton := uiKit newButton("Grant All Checked Authorities", grantRunner)
- def realPane :=
- JPanel`$capTabsPane.Y
+ urlProtocolsMainPanel setName("Web")
+ capTabsPane add(urlProtocolsMainPanel)
+ }
+ to visitPet(subnodes) {
+ var petTabNeeded := false
+ def panels := [] diverge()
+ def table := mapDomText(subnodes)
+ traceln("table: " + table)
+ #def insertLabelFieldPair(label, defaultKey) {
+ # def field := <swing:JTextField> new(table[defaultKey])
+ # petFieldsMap[defaultKey] := field
+ # petListPanel add(<swing:JLabel> new(label))
+ # petListPanel add(field)
+ #}
+ if (table maps("Name")) {
+ #insertLabelFieldPair("Pet Name:", "Name")
+ petNameLabel := lbl("Pet Name: ")
+ petNameField := <swing:JTextField> new(table["Name"])
+ petFieldsMap["Name"] := petNameField
+ petTabNeeded := true
+ }
+ if (table maps("Suffix")) {
+ #insertLabelFieldPair("Default File Extension: ", "Suffix")
+ petSuffixLabel := lbl("Default File Extension: ")
+ petSuffixField := <swing:JTextField> new(table["Suffix"])
+ petFieldsMap["Suffix"] := petSuffixField
+ petTabNeeded := true
+ }
+ if (table maps("Icon")) {
+ #insertLabelFieldPair("Icon Path:", "Icon")
+ #def iconLabel :=
+ petIconLabel := <swing:JLabel> new("Pet Icon")
+ petIconField := buildPetIconSelectionPane(table)
+ traceln("addedIconpanel to pet list panel")
+ petTabNeeded := true
+ }
+ if (petTabNeeded) {
+ def helpLabel := <swing:JLabel> new(stringDataKit getPetHelp())
+ def petListPanel :=
+ JPanel`$petNameLabel $petNameField.X
+ ${lbl(" ")} ${lbl(" ")}
+ $petSuffixLabel $petSuffixField
+ ${lbl(" ")} ${lbl(" ")}
+ $petIconLabel $petIconField`
+ def petMainPanel :=
+ JPanel`$petListPanel
+ $helpLabel.Y`
+ petMainPanel setName("Pet Data")
+ capTabsPane add(petMainPanel)
+ }
+ }
+ to viewText(text) {}
+ }
+ def topVisitor {
+ to visitRequests(subnodes) {
+ for each in subnodes {each welcome (requestsVisitor)}
+ }
+ to visitPet(subnodes) {requestsVisitor visitPet(subnodes)}
+ to visitUrlProtocols(subnodes) { requestsVisitor visitUrlProtocols(subnodes)}
+ to viewText(blah) {}
+ }
+ for each in requestsTree {each welcome(topVisitor)}
+ def frame := <swing:JFrame> new()
+ frame setIconImage(winImage)
+ def windowListener {
+ to windowClosing(event) {
+ capsSolver smash("Grants not made")
+ frame dispose()
+ }
+ match [verb, args] {}
+ }
+ frame addWindowListener(windowListener)
+ def grantFunc() {
+ traceln("into grantfunc: " )
+ frame dispose()
+ var xmlOut := "<caps>"
+ if (agreedUrlProtocols size() > 0) {
+ xmlOut += "<urlProtocols>"
+ for each => dummy in agreedUrlProtocols {
+ xmlOut += `<protocol>$each</protocol>`
+ }
+ xmlOut += "</urlProtocols>"
+ }
+ xmlOut += "</caps>"
+ def petData := [] asKeys() diverge()
+ for key => value in petFieldsMap {
+ petData[key] := value getText()
+ }
+ capsSolver resolve(capsPetsMaker new(xmlOut,petData snapshot() ) )
+ }
+ def grantButton := uiKit newButton("Finish Installation", grantFunc)
+ def spacer := <swing:JLabel> new(" ")
+ def realPane :=
+ JPanel`$capTabsPane.Y
+ $spacer
$grantButton `
- frame getContentPane() add(realPane)
- frame pack()
- frame setSize(600,600)
- frame show()
- capsPromise
- }
-}
+ frame getContentPane() add(realPane)
+ frame pack()
+ frame setSize(600,600)
+ frame show()
+ capsPromise
+ }
+}
1.3 +68 -73 e/src/esrc/com/skyhunter/installer/persistentInstallerAuthor.emaker
Index: persistentInstallerAuthor.emaker
===================================================================
RCS file: /cvs/e/src/esrc/com/skyhunter/installer/persistentInstallerAuthor.emaker,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- persistentInstallerAuthor.emaker 2001/09/12 00:01:52 1.2
+++ persistentInstallerAuthor.emaker 2001/10/27 17:27:42 1.3
@@ -2,79 +2,74 @@
//Copyright (C) 2001 Combex. All Rights Reserved.
def persistentInstallerAuthor(unsafe__uriGetter, file__uriGetter, interp, introducer, eProps, traceln, stdout) :any {
- def INSTALLED_APPS_DIR_NAME := "/installedApps/"
- def swing__uriGetter := <unsafe:javax.swing.*>
- def awt__uriGetter := <unsafe:java.awt.*>
- def uiKit := <import:com.skyhunter.ex.swing.uiToolsAuthor> run(awt__uriGetter, swing__uriGetter)
-
- def frameMaker := <swing:JFrame>
- def dialogVowMaker := <import:com.skyhunter.ex.swing.dialogVowMakerAuthor> (
- awt__uriGetter, swing__uriGetter,
- <import:org.erights.ex.swing.JPanelQParserMaker> new(awt__uriGetter, swing__uriGetter),
- frameMaker)
- #def vatMaker := <import:com.skyhunter.e.lang.vatMakerAuthor> run(unsafe__uriGetter, introducer, traceln)
- #XXX run caplet in separate vat some day
- def runConfinedSource := <import:com.skyhunter.e.lang.runConfinedSourceFuncAuthor> (unsafe__uriGetter, interp, traceln, stdout)
- def ehome := eProps["e.home"]
- def installedAppsDirPath := ehome + INSTALLED_APPS_DIR_NAME
-
- def buildRunFileName(baseName) :String {
- def moment := <unsafe:java.util.GregorianCalendar> new()
- def Calendar := <unsafe:java.util.Calendar>
- `$installedAppsDirPath$baseName${moment get(Calendar YEAR())}_${moment get(Calendar MONTH())}_${moment get(Calendar DATE())}_${moment get(Calendar HOUR())}_${moment get(Calendar MINUTE())}.run`
- }
-
-//format for the InstalledApps.xml
-//This is probably out of date. For current version, see the xmlFormats
-// <installed>
-// <app>
-// <sourcePath>c:/abc.../name.caplet</sourcePath>
-// <runPath>c:/.../installedApps/name.run</runPath>
-// <petName>AppName</petName>
-// <petIconPath>c:/.../.../icon.gif</petIconPath>
-// <petExtension>html</petExtension>
-// </app>
-// <app>...duplicate...</app>
-// </installed>
-
- def persistentInstaller {
- to install(capletSourceFile, appsManager) {
- def sourcePath := capletSourceFile getCanonicalPath()
- def capletNameRoot := capletSourceFile getName()
- def sourceDir := capletSourceFile getParent()
- def outFile := <file: buildRunFileName(capletNameRoot)>
- #def capletVat := vatMaker new(capletSourceFile getText(), "", interp getProps(), "install" + capletNameRoot )
- #def farCapletAuthor := capletVat promisePrimordialObj()
- def capletAuthorRcvr := runConfinedSource(capletSourceFile getText())
- //XXX currently the Rcvr here is run immediately, but some day it will
- //XXX be in a separate vat
- //XXX emaker now named sourceRunnerAuthor should be renamed runSourceFuncAuthor
- when (capletAuthorRcvr <- getRequestedCaps() ) -> done(requestsXML) {
- //traceln("errors: " + capletVat readStderr())
- //traceln("output: " + capletVat readStdout())
- def agreedCapsVowMaker := <import:com.skyhunter.installer.agreedCapsPetsVowMakerAuthor> run(
- unsafe__uriGetter, file__uriGetter)
- def capsPetsVow := agreedCapsVowMaker new(requestsXML)
- when (capsPetsVow) -> done(capsPets) {
- traceln("outfile: " + outFile getCanonicalPath())
- traceln("xml: " + capsPets getCapsXML())
- outFile setText(capsPets getCapsXML() )
- def appMap := capsPets getPetMap() diverge()
- traceln("new appMap in persistentInstaller: " + appMap)
- appMap["SourcePath"] := capletSourceFile getCanonicalPath()
- appMap["RunPath"] := outFile getCanonicalPath()
- appsManager addApp(appMap )
- dialogVowMaker new("Installation Complete",
- `<html><center>Installation of <p>$capletNameRoot <p> succeeded</center>`, null, ["OK"])
- } catch prob {
- traceln("capsPets lost: " + prob)
- dialogVowMaker new("Installation Aborted",
- "Caplet not installed", null, ["OK"])
- }
- } catch requestsProb {traceln("requests retrieval failed: " + requestsProb)}
- }
- to uninstall(capletSourceFile) {}
- }
+ def INSTALLED_APPS_DIR_NAME := "installedApps/"
+ def swing__uriGetter := <unsafe:javax.swing.*>
+ def awt__uriGetter := <unsafe:java.awt.*>
+ def uiKit := <import:com.skyhunter.ex.swing.uiToolsAuthor> run(awt__uriGetter, swing__uriGetter)
+
+ def frameMaker := <swing:JFrame>
+ def dialogVowMaker := <import:com.skyhunter.ex.swing.dialogVowMakerAuthor> (
+ awt__uriGetter, swing__uriGetter,
+ <import:org.erights.ex.swing.JPanelQParserMaker> new(awt__uriGetter, swing__uriGetter),
+ frameMaker)
+ #def vatMaker := <import:com.skyhunter.e.lang.vatMakerAuthor> run(unsafe__uriGetter, introducer, traceln)
+ #XXX run caplet in separate vat some day
+ def runConfinedSource := <import:com.skyhunter.e.lang.runConfinedSourceFuncAuthor> (unsafe__uriGetter, interp, traceln, stdout)
+ def ehome := "~/eDeskPrivate/"
+ def installedAppsDirPath := ehome + INSTALLED_APPS_DIR_NAME
+
+ def buildRunFileName(baseName) :String {
+ def moment := <unsafe:java.util.GregorianCalendar> new()
+ def Calendar := <unsafe:java.util.Calendar>
+ `$installedAppsDirPath$baseName${moment get(Calendar YEAR())}_${
+ moment get(Calendar MONTH())}_${moment get(Calendar DATE())}_${
+ moment get(Calendar HOUR())}_${moment get(Calendar MINUTE())}.run`
+ }
+
+ //format for the InstalledApps.xml
+ //This is probably out of date. For current version, see the xmlFormats
+ // <installed>
+ // <app>
+ // <sourcePath>c:/abc.../name.caplet</sourcePath>
+ // <runPath>c:/.../installedApps/name.run</runPath>
+ // <petName>AppName</petName>
+ // <petIconPath>c:/.../.../icon.gif</petIconPath>
+ // <petExtension>html</petExtension>
+ // </app>
+ // <app>...duplicate...</app>
+ // </installed>
+
+ def persistentInstaller {
+ to install(capletSourceFile, appsManager) {
+ def sourcePath := capletSourceFile getCanonicalPath()
+ def capletNameRoot := capletSourceFile getName()
+ def sourceDir := capletSourceFile getParent()
+ def outFile := <file: buildRunFileName(capletNameRoot)>
+ def capletAuthorRcvr := runConfinedSource(capletSourceFile getText())
+ when (capletAuthorRcvr <- getRequestedCaps() ) -> done(requestsXML) {
+ def agreedCapsVowMaker := <import:com.skyhunter.installer.agreedCapsPetsVowMakerAuthor> run(
+ unsafe__uriGetter, file__uriGetter)
+ def capsPetsVow := agreedCapsVowMaker new(requestsXML, sourceDir)
+ when (capsPetsVow) -> done(capsPets) {
+ traceln("outfile: " + outFile getCanonicalPath())
+ traceln("xml: " + capsPets getCapsXML())
+ outFile setText(capsPets getCapsXML() )
+ def appMap := capsPets getPetMap() diverge()
+ traceln("new appMap in persistentInstaller: " + appMap)
+ appMap["SourcePath"] := capletSourceFile getCanonicalPath()
+ appMap["RunPath"] := outFile getCanonicalPath()
+ appsManager addApp(appMap )
+ dialogVowMaker new("Installation Complete",
+ `<html><center>Installation of <p>$capletNameRoot <p> succeeded</center>`, null, ["OK"])
+ } catch prob {
+ traceln("capsPets lost: " + prob)
+ dialogVowMaker new("Installation Aborted",
+ "Caplet not installed", null, ["OK"])
+ }
+ } catch requestsProb {traceln("requests retrieval failed: " + requestsProb)}
+ }
+ to uninstall(capletSourceFile) {}
+ }
}
1.2 +18 -7 e/src/esrc/com/skyhunter/installer/stringDataKit.emaker
Index: stringDataKit.emaker
===================================================================
RCS file: /cvs/e/src/esrc/com/skyhunter/installer/stringDataKit.emaker,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- stringDataKit.emaker 2001/09/12 00:01:52 1.1
+++ stringDataKit.emaker 2001/10/27 17:27:42 1.2
@@ -3,19 +3,30 @@
def stringDataKit {
to getUrlProtocolHelp() :String {
-"<html><b>Rating: </b>Medium-high power <br>
+"<html><b><i>Warning! </i></b>The <b>file</b> protocol is very powerful,
+it can read every file on your disk. It cannot enable a cracker to take control
+of your computer, but it does put all your confidential data at risk if combined with
+any of the other protocols in this tab.
+<p><b>General Rating: </b>Medium-high power <br>
<b>Legitimate applications: </b> Web browsers, FTP servers, some chat programs
<br><b>Risks: </b>
-A program granted URL protocols can transmit any data you supply the program to anyone on the network. So be careful about granting both read authority on your confidential files and URL protocols to the same program<br>
-The program can also receive orders from others through these protocols.
-<br>The program can be used in denial of service attacks on other people.
-<br> URL protocols cannot be directly used to gain control of your computer. However, any attempt to gain control of your system is likely to include a request for these protocols so that the attacker can communicate with the suborned system.
+A program granted URL protocols can transmit any data you supply the program to
+anyone on the network. So be careful about granting both read authority on your
+confidential files and URL protocols to the same program.<br>
+The program can also receive orders from other people through these protocols.
+<br>These protocols can be used in denial of service attacks on other people by
+the program.
+<br> URL protocols cannot be directly used to gain control of your computer. However,
+any attempt to gain control of your system is likely to include a request for these
+protocols so that the attacker can communicate with the suborned system.
</html>"
}
to getPetHelp() :String {
"<html>The Pet Name is your personal name for this program.
-<p> The File Extension is the last part of the names of documents which will be opened with this caplet by default
-<p> The Pet Icon is the image that will be placed in the top left corner of all windows opened by this caplet
+<p> The File Extension is the last part of the names of documents
+which will be opened with this caplet by default
+<p> The Pet Icon is the image that will be placed in the top left
+corner of all windows opened by this caplet
</html>"
}
}
1.44 +1 -1 e/src/esrc/scripts/eBrowser.e
Index: eBrowser.e
===================================================================
RCS file: /cvs/e/src/esrc/scripts/eBrowser.e,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- eBrowser.e 2001/09/14 20:54:04 1.43
+++ eBrowser.e 2001/10/27 17:27:42 1.44
@@ -496,7 +496,7 @@
to (isDirty) {
# XXX true case is not yet used
def marker := if (isDirty) { "*" } else { "" }
- mainFrame setTitle("eBrowser - " + textModel getFilePath())
+ mainFrame setTitle("eBrowser - " + textModel getFileName() + " @ " + textModel getFilePath())
}
to () {setTitle(false)}
}
1.12 +2 -11 e/src/esrc/scripts/elmer.e
Index: elmer.e
===================================================================
RCS file: /cvs/e/src/esrc/scripts/elmer.e,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- elmer.e 2001/10/03 15:18:29 1.11
+++ elmer.e 2001/10/27 17:27:42 1.12
@@ -7,17 +7,8 @@
def group := EditGroupMaker new(true)
def first := ElmerMainMaker new(group, EInterpAdapterMaker)
-def args := interp getArgs()
-if (args == []) {
- first textArea() setText("\
-Elmer is a simple text editor that also executes embedded
-command line examples. Try hitting enter below
-
- ? 2 + 3")
-} else {
- for arg in args {
- first menuOpen(<file: arg>)
- }
+for arg in interp getArgs() {
+ first menuOpen(<file: arg>)
}
first setVisible(true)
1.18 +12 -12 e/src/esrc/scripts/setup.e
Index: setup.e
===================================================================
RCS file: /cvs/e/src/esrc/scripts/setup.e,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- setup.e 2001/10/01 08:31:04 1.17
+++ setup.e 2001/10/27 17:27:42 1.18
@@ -19,20 +19,20 @@
"e.interp.expand" => "false",
"e.interp.verbose" => "false",
"e.interp.runner" => "fe",
- "e.enable.anon-lambda" => "false",
- "e.enable.auditors" => "false",
- "e.enable.define" => "false",
- "e.enable.dot-props" => "false",
+ "e.enable.anon-lambda" => "allow",
+ "e.enable.auditors" => "allow",
+ "e.enable.define" => "allow",
+ "e.enable.dot-props" => "allow",
"e.enable.meta-object" => "false",
"e.enable.meta-scope" => "false",
- "e.enable.no-paren-call" => "false",
- "e.enable.no-paren-method" => "false",
- "e.enable.one-method-object" => "false",
- "e.enable.plumbing" => "false",
- "e.enable.typedef" => "false",
- "e.enable.when-clauses" => "false",
- "e.enable.notabs" => "false",
- "e.enable.lambda-args" => "false"
+ "e.enable.no-paren-call" => "allow",
+ "e.enable.no-paren-method" => "allow",
+ "e.enable.one-method-object" => "allow",
+ "e.enable.plumbing" => "allow",
+ "e.enable.typedef" => "allow",
+ "e.enable.when-clauses" => "allow",
+ "e.enable.notabs" => "allow",
+ "e.enable.lambda-args" => "allow"
] diverge()
# 'false' means overwrite rather than complain
1.55 +1 -4 e/src/jsrc/Makefile
Index: Makefile
===================================================================
RCS file: /cvs/e/src/jsrc/Makefile,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- Makefile 2001/09/14 04:55:01 1.54
+++ Makefile 2001/10/27 17:27:42 1.55
@@ -35,7 +35,7 @@
stl_elib:
find $(ER)/elib -name '*.java' > files.tmp
find $(ER)/meta/java -name '*.java' >> files.tmp
- find $(ER)/meta/javax -name '*.java' >> files.tmp
+ # find $(ER)/meta/javax -name '*.java' >> files.tmp
find $(ER)/meta/$(ER)/elib -name '*.java' >> files.tmp
$(JCOMPILE) @files.tmp
@@ -63,7 +63,6 @@
# expected to depend on _capml
stl_elang:
find $(ER)/elang -name '*.java' > files.tmp
- find $(ER)/meta/$(ER)/elang -name '*.java' >> files.tmp
$(JCOMPILE) @files.tmp
# elmer
@@ -76,14 +75,12 @@
# depends on stl_elib
_extern:
find $(ER)/extern -name '*.java' > files.tmp
- find $(ER)/meta/$(ER)/extern -name '*.java' >> files.tmp
$(JCOMPILE) @files.tmp
# distributed persistent E
# depends on stl_elib & extern
_vattp:
find net/vattp -name '*.java' > files.tmp
- find $(ER)/meta/net/vattp -name '*.java' >> files.tmp
$(JCOMPILE) @files.tmp
# distributed persistent E
1.74 +9 -7 e/src/jsrc/org/erights/e/elang/interp/Interp.java
Index: Interp.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/interp/Interp.java,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- Interp.java 2001/10/03 18:05:28 1.73
+++ Interp.java 2001/10/27 17:27:42 1.74
@@ -207,20 +207,22 @@
/**
* Test the setting of a boolean property. A boolean property is true if
- * its (String) value is "true", and false if it's absent or if its
- * string value is "false".
+ * its (String) value is "true", and false if it's absent, or if its
+ * string value is "false" or "allow".
*
* @param props A ConstMap representing the Properties
* @param propName The name of the property to test
* @return the value of the property as a boolean.
- * @exception IllegalArgumentException if propValue is neither "true" nor
- * "false"
+ * @exception IllegalArgumentException if propValue is neither "true", nor
+ * "false", nor "allow"
*/
static public boolean testProp(ConstMap props, String propName) {
- String propValue = (String)props.get(propName, "false");
- if ("true".equals(propValue)) {
+ String propValue = ((String)props.get(propName, "false")).intern();
+ if ("true" == propValue) {
return true;
- } else if ("false".equals(propValue)) {
+ } else if ("false" == propValue) {
+ return false;
+ } else if ("allow" == propValue) {
return false;
} else {
throw new IllegalArgumentException(propValue +
1.66 +0 -4 e/src/jsrc/org/erights/e/elang/interp/ScopeSetup.java
Index: ScopeSetup.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/interp/ScopeSetup.java,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- ScopeSetup.java 2001/09/07 05:49:21 1.65
+++ ScopeSetup.java 2001/10/27 17:27:42 1.66
@@ -157,10 +157,6 @@
{ "defineSlot", SlotDefiner.THE_ONE },
{ "any", SimpleSlotMaker.THE_ONE },
{ "void", VoidMaker.THE_ONE },
- { "lamport", univ,
- "<import:org.erights.e.elib.slot.lamport>" },
- { "ever", univ,
- "<import:org.erights.e.elib.slot.ever>" },
{ "promiseAllFulfilled", univ,
"<import:org.erights.e.elang.interp.promiseAllFulfilled>" },
1.77 +99 -34 e/src/jsrc/org/erights/e/elang/syntax/EBuilder.java
Index: EBuilder.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/EBuilder.java,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -r1.76 -r1.77
--- EBuilder.java 2001/10/03 04:41:02 1.76
+++ EBuilder.java 2001/10/27 17:27:42 1.77
@@ -104,13 +104,38 @@
private HilbertHotel myHilbert = new HilbertHotel();
+ /**
+ * The top of stack
+ */
private ConstMap myProps;
/**
+ * All but the top of stack
+ */
+ private FlexList myPropsStack;
+
+ /**
*
*/
public EBuilder(ConstMap props) {
myProps = props;
+ myPropsStack = FlexList.fromType(ConstMap.class);
+ }
+
+ /**
+ * Called when starting a nested scope box
+ */
+ /*package*/ void begin() {
+ myPropsStack.push(myProps);
+ }
+
+ /**
+ * Called when leaving a nested scope box.
+ * XXX Bug: This mechanism doesn't seem to actually work for scoping
+ * 'pragma enable(..)'.
+ */
+ /*package*/ void end() {
+ myProps = (ConstMap)myPropsStack.pop();
}
/**
@@ -291,42 +316,93 @@
/**
*
*/
- /*package*/ EExpr doMeta(Object verb, Object args) {
+ /*package*/ EExpr doMeta(Object keyword, Object verb, Object args) {
+ String kword = ((Token)keyword).token().intern();
String vrb = ((String)verb).intern();
EExpr[] exprs = exprs(args);
- if (0 == exprs.length) {
- if ("scope" == vrb) {
- pocket("meta-scope");
- return new ScopeExpr();
- }
- } else if (1 == exprs.length) {
- if ("run" == vrb) {
- pocket("meta-object");
- //XXX Security Bug!: We must statically ensure that noun
- //names an *enclosing* object expression
- return new MetaExpr((NounExpr)exprs[0]);
+ if ("meta" == kword) {
+ if (0 == exprs.length) {
+ if ("scope" == vrb) {
+ pocket("meta-scope");
+ return new ScopeExpr();
+ }
+ } else if (1 == exprs.length) {
+ if ("run" == vrb) {
+ pocket("meta-object");
+ //XXX Security Bug!: We must statically ensure that noun
+ //names an *enclosing* object expression
+ return new MetaExpr((NounExpr)exprs[0]);
+ }
+ } else if (2 == exprs.length) {
+ if ("eval" == vrb) {
+ reserved("reified evaluation");
+ }
}
- } else if (2 == exprs.length) {
- if ("eval" == vrb) {
- reserved("reified evaluation");
+ syntaxError("unrecognized meta " + vrb + "/" + exprs.length);
+ } else if ("pragma" == kword) {
+ if (1 == exprs.length) {
+ if ("enable" == vrb) {
+ LiteralExpr lit = (LiteralExpr)exprs[0];
+ String propName = "e.enable." + (String)lit.value();
+ String propVal = (String)myProps.get(propName, "false");
+ propVal = propVal.intern();
+ if (propVal == "true") {
+ //already enabled. ignore.
+ return NULL;
+ } else if (propVal == "false") {
+ syntaxError("The optional " + propName +
+ " feature in eprops.txt is currently" +
+ "not 'allow'ed.");
+ } else if (propVal == "allow") {
+ myProps = myProps.with(propName, "true");
+ return NULL;
+ }
+ } else if ("disable" == vrb) {
+ LiteralExpr lit = (LiteralExpr)exprs[0];
+ String propName = "e.enable." + (String)lit.value();
+ String propVal = (String)myProps.get(propName, "false");
+ propVal = propVal.intern();
+ if (propVal == "true") {
+ //If it was enables, it can still be re-enabled
+ myProps = myProps.with(propName, "allow");
+ return NULL;
+ } else if (propVal == "false") {
+ //already disabled. Ignore.
+ return NULL;
+ } else if (propVal == "allow") {
+ //Already disabled but allowed. Ignore.
+ return NULL;
+ }
+ }
}
+ syntaxError("unrecognized pragma " + vrb + "/" + exprs.length);
+ } else {
+ syntaxError("internal: unrecognized " + kword);
}
- syntaxError("unrecognized meta " + vrb + "/" + exprs.length);
return null; //keep compiler happy
}
/**
*
*/
- /*package*/ EExpr doMetaSend(Object verb, Object args) {
+ /*package*/ EExpr doMetaSend(Object keyword, Object verb, Object args) {
+ String kword = ((Token)keyword).token().intern();
String vrb = ((String)verb).intern();
EExpr[] exprs = exprs(args);
- if (2 == exprs.length) {
- if ("eval" == vrb) {
- reserved("remote evaluation");
+ if ("meta" == kword) {
+ if (2 == exprs.length) {
+ if ("eval" == vrb) {
+ reserved("remote evaluation");
+ }
}
+ syntaxError("unrecognized meta-send " +
+ vrb + "/" + exprs.length);
+ } else if ("pragma" == kword) {
+ syntaxError("unrecognized pragma-send " +
+ vrb + "/" + exprs.length);
+ } else {
+ syntaxError("internal: unrecognized " + kword);
}
- syntaxError("unrecognized meta-send " + vrb + "/" + exprs.length);
return null; //keep compiler happy
}
@@ -832,19 +908,8 @@
Object optMacroArg,
Object macroBody,
Object optNextMacro) {
- throw new Error("XXX macro/4 not yet implemented");
- }
-
- /**
- *
- */
- /*package*/ EExpr macro(Object macroName,
- Object optMacroArg,
- Object macroBody,
- Object optNextMacro,
- Object sameMacroName) {
- throw new Error("XXX macro/5 not yet implemented");
- //return macro(macroName, optMacroArg, macroBody, optNextMacro);
+ reserved("Macros");
+ return null; //make compiler happy
}
/**
1.92 +738 -716 e/src/jsrc/org/erights/e/elang/syntax/EParser.java
Index: EParser.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/EParser.java,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -r1.91 -r1.92
--- EParser.java 2001/10/03 04:41:02 1.91
+++ EParser.java 2001/10/27 17:27:42 1.92
@@ -186,70 +186,70 @@
public final static short IN=282;
public final static short MATCH=283;
public final static short META=284;
-public final static short SWITCH=285;
-public final static short THUNK=286;
-public final static short TO=287;
-public final static short TRY=288;
-public final static short VAR=289;
-public final static short WHEN=290;
-public final static short WHILE=291;
-public final static short DEFINE=292;
-public final static short ON=293;
-public final static short SELECT=294;
-public final static short TYPEDEF=295;
-public final static short ABSTRACT=296;
-public final static short AN=297;
-public final static short AS=298;
-public final static short ATTRIBUTE=299;
-public final static short BE=300;
-public final static short BEGIN=301;
-public final static short BEHALF=302;
-public final static short BELIEF=303;
-public final static short BELIEVE=304;
-public final static short BELIEVES=305;
-public final static short CASE=306;
-public final static short CONST=307;
-public final static short CONSTRUCTOR=308;
-public final static short CONTEXT=309;
-public final static short DECLARE=310;
-public final static short DEFAULT=311;
-public final static short DEFMACRO=312;
-public final static short DEPRECATED=313;
-public final static short DISPATCH=314;
-public final static short DO=315;
-public final static short ENCAPSULATE=316;
-public final static short ENCAPSULATED=317;
-public final static short ENCAPSULATES=318;
-public final static short END=319;
-public final static short ENSURE=320;
-public final static short ENUM=321;
-public final static short EVENTUAL=322;
-public final static short EVENTUALLY=323;
-public final static short EXPORT=324;
-public final static short EXTENDS=325;
-public final static short FACET=326;
-public final static short FORALL=327;
-public final static short FUNCTION=328;
-public final static short GIVEN=329;
-public final static short HIDDEN=330;
-public final static short HIDES=331;
-public final static short IMPLEMENTS=332;
-public final static short INTERFACE=333;
-public final static short IS=334;
-public final static short KNOW=335;
-public final static short KNOWS=336;
-public final static short LAMBDA=337;
-public final static short LET=338;
-public final static short METHOD=339;
-public final static short METHODS=340;
-public final static short MODULE=341;
-public final static short NAMESPACE=342;
-public final static short NATIVE=343;
-public final static short OBEYS=344;
-public final static short OCTET=345;
-public final static short ONEWAY=346;
-public final static short PACKAGE=347;
-public final static short PRAGMA=348;
+public final static short PRAGMA=285;
+public final static short SWITCH=286;
+public final static short THUNK=287;
+public final static short TO=288;
+public final static short TRY=289;
+public final static short VAR=290;
+public final static short WHEN=291;
+public final static short WHILE=292;
+public final static short DEFINE=293;
+public final static short ON=294;
+public final static short SELECT=295;
+public final static short TYPEDEF=296;
+public final static short ABSTRACT=297;
+public final static short AN=298;
+public final static short AS=299;
+public final static short ATTRIBUTE=300;
+public final static short BE=301;
+public final static short BEGIN=302;
+public final static short BEHALF=303;
+public final static short BELIEF=304;
+public final static short BELIEVE=305;
+public final static short BELIEVES=306;
+public final static short CASE=307;
+public final static short CONST=308;
+public final static short CONSTRUCTOR=309;
+public final static short CONTEXT=310;
+public final static short DECLARE=311;
+public final static short DEFAULT=312;
+public final static short DEFMACRO=313;
+public final static short DEPRECATED=314;
+public final static short DISPATCH=315;
+public final static short DO=316;
+public final static short ENCAPSULATE=317;
+public final static short ENCAPSULATED=318;
+public final static short ENCAPSULATES=319;
+public final static short END=320;
+public final static short ENSURE=321;
+public final static short ENUM=322;
+public final static short EVENTUAL=323;
+public final static short EVENTUALLY=324;
+public final static short EXPORT=325;
+public final static short EXTENDS=326;
+public final static short FACET=327;
+public final static short FORALL=328;
+public final static short FUNCTION=329;
+public final static short GIVEN=330;
+public final static short HIDDEN=331;
+public final static short HIDES=332;
+public final static short IMPLEMENTS=333;
+public final static short INTERFACE=334;
+public final static short IS=335;
+public final static short KNOW=336;
+public final static short KNOWS=337;
+public final static short LAMBDA=338;
+public final static short LET=339;
+public final static short METHOD=340;
+public final static short METHODS=341;
+public final static short MODULE=342;
+public final static short NAMESPACE=343;
+public final static short NATIVE=344;
+public final static short OBEYS=345;
+public final static short OCTET=346;
+public final static short ONEWAY=347;
+public final static short PACKAGE=348;
public final static short PRIVATE=349;
public final static short PROTECTED=350;
public final static short PUBLIC=351;
@@ -332,34 +332,34 @@
38, 38, 38, 37, 37, 37, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 56, 56, 56, 56, 56,
- 56, 41, 44, 53, 53, 53, 54, 54, 61, 61,
- 61, 63, 62, 62, 42, 42, 42, 43, 43, 64,
- 64, 65, 65, 66, 67, 67, 69, 69, 70, 71,
- 71, 47, 47, 72, 72, 3, 3, 3, 74, 74,
- 74, 74, 74, 75, 75, 76, 76, 77, 77, 78,
- 78, 79, 79, 80, 80, 80, 73, 73, 73, 73,
- 73, 73, 73, 73, 19, 19, 20, 20, 81, 81,
- 81, 81, 81, 81, 81, 83, 83, 83, 84, 84,
- 57, 57, 85, 85, 15, 15, 82, 82, 87, 87,
- 87, 87, 87, 88, 88, 88, 59, 59, 59, 60,
- 90, 91, 89, 89, 92, 51, 51, 93, 93, 94,
- 1, 1, 9, 9, 95, 68, 18, 18, 39, 39,
- 86, 86, 45, 45, 96, 96, 40, 13, 13, 17,
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 46, 46, 48, 58, 58, 58, 99, 99, 100,
- 100, 98, 98, 49, 49, 52, 101, 50, 50, 55,
- 55, 102, 102, 102, 102, 104, 104, 104, 104, 103,
- 103, 103, 106, 106, 107, 107, 108, 108, 105, 105,
- 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
- 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
- 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
- 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
- 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
- 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
- 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
- 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
- 97, 97, 97, 97, 97,
+ 36, 36, 36, 36, 36, 58, 58, 58, 58, 58,
+ 58, 42, 45, 55, 55, 55, 53, 54, 56, 56,
+ 68, 67, 67, 66, 66, 66, 43, 43, 43, 44,
+ 44, 69, 69, 70, 70, 71, 72, 72, 74, 74,
+ 75, 76, 76, 63, 63, 77, 77, 3, 3, 3,
+ 79, 79, 79, 79, 79, 80, 80, 81, 81, 82,
+ 82, 83, 83, 84, 84, 85, 85, 85, 78, 78,
+ 78, 78, 78, 78, 78, 78, 19, 19, 20, 20,
+ 86, 86, 86, 86, 86, 86, 86, 88, 88, 88,
+ 89, 89, 59, 59, 90, 90, 15, 15, 87, 87,
+ 92, 92, 92, 92, 92, 93, 93, 93, 61, 61,
+ 61, 62, 95, 96, 94, 94, 97, 64, 64, 98,
+ 98, 99, 1, 1, 9, 9, 100, 73, 18, 18,
+ 39, 39, 91, 91, 46, 46, 101, 101, 40, 13,
+ 13, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 48, 48, 49, 60, 60, 60, 104,
+ 104, 105, 105, 103, 103, 51, 51, 65, 106, 52,
+ 52, 57, 57, 107, 107, 107, 107, 109, 109, 109,
+ 109, 108, 108, 108, 111, 111, 112, 112, 113, 113,
+ 110, 110, 41, 41, 47, 50, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
};
final static short yylen[] = { 2,
1, 1, 2, 1, 1, 3, 3, 1, 3, 1,
@@ -372,27 +372,28 @@
3, 1, 1, 1, 2, 2, 2, 2, 1, 1,
4, 4, 3, 3, 2, 3, 4, 2, 3, 3,
4, 2, 3, 1, 2, 3, 1, 1, 1, 1,
- 1, 1, 1, 3, 2, 1, 3, 3, 1, 3,
- 3, 5, 3, 4, 5, 1, 1, 4, 2, 2,
- 4, 2, 3, 2, 1, 2, 3, 2, 3, 3,
- 2, 1, 3, 3, 5, 5, 4, 4, 0, 1,
- 1, 0, 5, 4, 0, 1, 3, 1, 2, 2,
- 3, 3, 5, 0, 1, 2, 1, 4, 2, 1,
- 4, 1, 1, 3, 2, 1, 3, 4, 1, 3,
- 5, 3, 5, 1, 2, 1, 2, 1, 2, 2,
- 3, 1, 1, 3, 3, 5, 3, 1, 2, 1,
- 1, 1, 4, 4, 4, 2, 4, 2, 1, 1,
- 2, 2, 4, 4, 1, 2, 2, 2, 1, 3,
- 1, 3, 1, 4, 2, 5, 1, 1, 3, 4,
- 3, 4, 3, 4, 5, 2, 4, 5, 2, 5,
- 3, 2, 0, 2, 3, 7, 5, 1, 3, 3,
- 0, 1, 1, 2, 0, 1, 3, 2, 1, 1,
- 1, 3, 1, 3, 3, 2, 1, 1, 1, 1,
+ 1, 1, 1, 3, 2, 1, 3, 3, 2, 4,
+ 4, 5, 5, 1, 1, 1, 1, 4, 2, 2,
+ 4, 2, 3, 2, 1, 2, 4, 3, 3, 4,
+ 3, 1, 3, 4, 6, 7, 8, 5, 5, 6,
+ 0, 6, 6, 0, 1, 1, 0, 1, 3, 1,
+ 2, 2, 3, 3, 5, 0, 1, 2, 1, 4,
+ 2, 1, 4, 1, 1, 3, 2, 1, 3, 4,
+ 1, 3, 5, 3, 5, 1, 2, 1, 2, 1,
+ 2, 2, 3, 1, 1, 3, 3, 5, 3, 1,
+ 2, 1, 1, 1, 4, 4, 4, 2, 4, 2,
+ 1, 1, 2, 2, 4, 4, 1, 2, 2, 2,
+ 1, 3, 1, 3, 1, 4, 2, 5, 1, 1,
+ 4, 6, 4, 6, 4, 4, 5, 2, 4, 5,
+ 2, 6, 4, 3, 0, 2, 3, 8, 6, 1,
+ 3, 3, 0, 1, 1, 2, 0, 1, 3, 2,
+ 1, 1, 1, 3, 1, 3, 3, 2, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 3, 5, 4, 5, 1, 1, 1, 3, 1,
- 3, 1, 3, 1, 1, 2, 3, 0, 2, 5,
- 3, 1, 2, 2, 4, 2, 4, 2, 4, 2,
- 5, 4, 2, 3, 1, 4, 2, 2, 0, 2,
+ 1, 1, 1, 4, 6, 4, 5, 1, 1, 1,
+ 3, 1, 3, 1, 3, 1, 1, 2, 4, 0,
+ 3, 5, 3, 1, 2, 2, 4, 2, 4, 2,
+ 4, 2, 5, 4, 2, 3, 1, 4, 2, 2,
+ 0, 2, 1, 1, 0, 0, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -401,95 +402,98 @@
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1,
};
final static short yydefred[] = { 0,
- 243, 0, 0, 0, 2, 0, 258, 0, 0, 0,
- 311, 312, 313, 314, 315, 316, 317, 318, 319, 320,
- 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
- 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
- 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
- 351, 352, 353, 354, 355, 356, 357, 358, 359, 360,
- 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
- 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
- 381, 382, 383, 384, 385, 386, 387, 388, 389, 390,
- 391, 392, 393, 394, 395, 0, 0, 0, 0, 0,
- 190, 0, 3, 0, 191, 192, 0, 176, 0, 169,
- 174, 259, 97, 98, 99, 100, 101, 103, 0, 0,
- 0, 0, 0, 4, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 5, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,
- 12, 0, 15, 0, 0, 0, 0, 0, 30, 0,
- 0, 0, 0, 0, 62, 0, 0, 94, 0, 80,
- 102, 0, 106, 109, 116, 117, 125, 0, 0, 244,
- 0, 0, 0, 0, 0, 0, 0, 175, 189, 0,
- 246, 0, 0, 155, 0, 0, 0, 160, 0, 0,
- 0, 0, 0, 0, 178, 177, 0, 0, 0, 141,
- 140, 0, 0, 0, 217, 218, 0, 0, 0, 0,
- 200, 199, 0, 0, 205, 0, 0, 0, 0, 163,
- 0, 0, 0, 257, 0, 0, 0, 128, 245, 0,
- 0, 0, 0, 0, 0, 0, 124, 0, 78, 77,
- 75, 76, 0, 0, 0, 0, 0, 249, 0, 253,
- 119, 120, 0, 0, 122, 0, 0, 0, 131, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 206, 6,
- 0, 0, 0, 0, 0, 260, 261, 262, 263, 264,
- 0, 265, 266, 267, 268, 269, 270, 271, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 148, 105, 0, 0, 0, 0, 126,
- 0, 276, 277, 0, 0, 0, 0, 0, 207, 208,
- 0, 165, 0, 0, 0, 156, 0, 0, 159, 0,
- 0, 0, 10, 147, 187, 0, 0, 182, 180, 183,
- 0, 179, 167, 104, 0, 0, 201, 202, 0, 0,
- 129, 0, 0, 110, 0, 0, 0, 0, 251, 0,
- 248, 0, 0, 113, 0, 285, 284, 0, 245, 0,
- 0, 111, 123, 0, 0, 0, 0, 132, 256, 0,
- 107, 108, 0, 0, 0, 272, 0, 0, 157, 0,
- 0, 0, 229, 130, 0, 0, 0, 0, 0, 0,
- 9, 0, 16, 0, 0, 21, 23, 0, 18, 22,
- 19, 26, 27, 31, 33, 34, 42, 41, 38, 39,
- 40, 35, 36, 37, 45, 46, 47, 44, 48, 0,
- 0, 56, 0, 53, 0, 61, 0, 58, 59, 69,
- 68, 65, 67, 63, 64, 66, 73, 72, 71, 0,
- 0, 0, 0, 0, 150, 0, 149, 232, 0, 245,
- 127, 213, 0, 195, 133, 168, 197, 164, 0, 0,
- 0, 0, 193, 194, 7, 0, 0, 0, 0, 0,
- 181, 0, 137, 0, 138, 0, 0, 0, 0, 0,
- 0, 0, 247, 245, 0, 0, 114, 286, 235, 0,
- 0, 0, 0, 238, 0, 0, 0, 0, 0, 0,
- 300, 291, 255, 0, 254, 252, 118, 0, 121, 0,
- 0, 234, 0, 0, 25, 0, 215, 0, 0, 81,
- 0, 151, 231, 278, 0, 0, 171, 158, 173, 0,
- 161, 11, 154, 152, 154, 185, 184, 0, 0, 203,
- 204, 0, 112, 136, 135, 282, 0, 0, 289, 115,
- 0, 0, 0, 0, 0, 0, 0, 292, 0, 0,
- 0, 0, 303, 0, 305, 0, 0, 310, 273, 227,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 230, 274, 0, 287, 240,
- 237, 239, 0, 293, 296, 298, 290, 294, 0, 308,
- 307, 0, 304, 302, 0, 228, 0, 0, 0, 0,
- 0, 0, 0, 279, 0, 275, 214, 153, 186, 144,
- 0, 283, 0, 0, 0, 0, 0, 301, 216, 0,
- 223, 0, 0, 0, 226, 219, 221, 281, 143, 236,
- 295, 297, 299, 306, 222, 0, 220, 0, 224, 0,
- 225,
+ 245, 0, 0, 0, 2, 0, 260, 0, 313, 314,
+ 0, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 0, 0, 0, 0, 0,
+ 192, 0, 3, 0, 193, 194, 0, 0, 178, 0,
+ 171, 176, 261, 97, 98, 99, 100, 101, 103, 0,
+ 315, 315, 0, 0, 4, 0, 0, 5, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 8, 12, 0, 15, 0, 0, 0, 0, 0, 30,
+ 0, 0, 0, 0, 0, 62, 0, 0, 94, 0,
+ 80, 0, 102, 0, 106, 0, 114, 115, 116, 117,
+ 125, 0, 0, 246, 0, 0, 0, 0, 0, 177,
+ 191, 0, 248, 0, 0, 157, 0, 0, 0, 162,
+ 0, 0, 0, 0, 0, 0, 0, 0, 180, 179,
+ 0, 0, 0, 0, 0, 0, 219, 220, 0, 0,
+ 0, 0, 202, 201, 0, 0, 207, 315, 0, 0,
+ 0, 315, 0, 0, 124, 0, 78, 77, 75, 76,
+ 0, 0, 0, 0, 0, 251, 0, 255, 119, 120,
+ 0, 122, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 208, 6, 0, 0, 0, 0, 0, 262, 263,
+ 264, 265, 266, 0, 267, 268, 269, 270, 271, 272,
+ 273, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 259, 0, 0, 0, 0, 0, 0,
+ 0, 150, 105, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 109, 0, 0, 126, 278, 279, 0,
+ 0, 0, 209, 210, 0, 167, 0, 0, 0, 158,
+ 0, 0, 161, 0, 0, 0, 10, 149, 189, 0,
+ 0, 0, 0, 184, 182, 185, 0, 181, 169, 104,
+ 146, 145, 0, 0, 203, 204, 0, 0, 129, 0,
+ 0, 253, 0, 247, 0, 0, 0, 123, 0, 0,
+ 0, 0, 132, 258, 0, 107, 108, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 9, 0, 16,
+ 0, 0, 21, 23, 0, 18, 22, 19, 26, 27,
+ 31, 33, 34, 42, 41, 38, 39, 40, 35, 36,
+ 37, 45, 46, 47, 44, 48, 0, 0, 56, 0,
+ 53, 0, 61, 0, 58, 59, 69, 68, 65, 67,
+ 63, 64, 66, 73, 72, 71, 0, 0, 0, 0,
+ 0, 0, 0, 250, 0, 0, 0, 152, 0, 151,
+ 0, 0, 0, 165, 0, 0, 128, 247, 0, 0,
+ 0, 0, 131, 0, 247, 0, 0, 0, 215, 0,
+ 197, 199, 166, 0, 0, 0, 0, 195, 196, 7,
+ 0, 133, 170, 0, 0, 0, 0, 183, 0, 0,
+ 316, 0, 0, 0, 0, 237, 315, 0, 286, 0,
+ 315, 247, 0, 0, 0, 0, 0, 302, 293, 257,
+ 0, 256, 254, 118, 121, 0, 0, 25, 0, 217,
+ 0, 0, 81, 0, 249, 0, 153, 110, 0, 0,
+ 316, 0, 287, 111, 316, 0, 159, 0, 0, 0,
+ 231, 130, 280, 0, 234, 0, 127, 0, 173, 160,
+ 175, 0, 163, 11, 156, 154, 156, 187, 186, 315,
+ 139, 0, 0, 205, 206, 0, 0, 288, 0, 138,
+ 0, 0, 240, 0, 284, 0, 0, 0, 0, 294,
+ 0, 0, 0, 0, 305, 0, 307, 0, 0, 312,
+ 0, 0, 0, 315, 315, 112, 0, 113, 274, 0,
+ 0, 0, 236, 0, 0, 0, 0, 233, 0, 0,
+ 0, 0, 315, 140, 0, 0, 0, 0, 0, 0,
+ 0, 276, 0, 0, 295, 298, 300, 292, 296, 0,
+ 310, 309, 0, 306, 304, 0, 0, 0, 0, 135,
+ 316, 229, 0, 0, 0, 0, 281, 0, 277, 216,
+ 155, 188, 0, 0, 232, 0, 291, 242, 239, 241,
+ 0, 285, 0, 0, 0, 0, 303, 218, 316, 136,
+ 275, 230, 0, 0, 0, 0, 0, 0, 283, 316,
+ 0, 289, 0, 297, 299, 301, 308, 137, 0, 225,
+ 0, 0, 0, 228, 221, 223, 0, 0, 238, 316,
+ 0, 316, 0, 143, 142, 224, 226, 222, 0, 227,
};
final static short yydgoto[] = { 3,
- 201, 5, 419, 187, 149, 389, 362, 150, 6, 363,
- 152, 153, 154, 440, 470, 155, 299, 235, 105, 106,
- 158, 159, 160, 449, 161, 162, 163, 464, 164, 468,
- 165, 472, 166, 479, 167, 168, 169, 170, 256, 406,
- 171, 172, 335, 173, 257, 174, 229, 394, 395, 527,
- 242, 396, 175, 176, 247, 177, 178, 340, 270, 223,
- 212, 513, 514, 336, 368, 508, 193, 194, 195, 196,
- 197, 198, 108, 109, 110, 111, 206, 207, 369, 370,
- 224, 225, 179, 226, 493, 259, 618, 651, 675, 342,
- 343, 244, 533, 534, 397, 260, 112, 587, 565, 620,
- 528, 599, 407, 600, 541, 538, 604, 605,
+ 193, 5, 547, 179, 140, 372, 346, 141, 6, 347,
+ 143, 144, 145, 407, 437, 146, 272, 307, 105, 106,
+ 149, 150, 151, 416, 152, 153, 154, 431, 155, 435,
+ 156, 439, 157, 446, 158, 159, 160, 161, 234, 381,
+ 162, 163, 164, 313, 165, 235, 166, 324, 378, 573,
+ 507, 580, 167, 168, 169, 170, 225, 171, 172, 327,
+ 474, 215, 463, 221, 508, 363, 571, 572, 314, 354,
+ 495, 185, 186, 187, 188, 189, 190, 109, 110, 111,
+ 112, 200, 201, 355, 356, 216, 217, 173, 218, 480,
+ 237, 615, 686, 704, 328, 329, 223, 582, 583, 509,
+ 238, 113, 586, 554, 617, 578, 591, 382, 592, 518,
+ 515, 596, 597,
};
-final static short yysindex[] = { -305,
- 0,13122, 0,15003, 0, -349, 0,19479, 56,19479,
+final static short yysindex[] = { -302,
+ 0,13340, 0,15221, 0, -301, 0,17299, 0, 0,
+17299, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -497,71 +501,72 @@
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,15947,19479, 9637, 6, 25,
- 0, -298, 0, 48, 0, 0, -173, 0, 90, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,15351,13467,
-13467,19479,16413, 0,13122, 9757, 56,11731, 56, 72,
- 72,19479,16292, 56, 0, 56,16413,19479,15947,15947,
-15947, -315, 44, -298, -85,17678, -298,12536, -298, 0,
- 0, 58, 0, 0, 878, -190, -181, -159, 0, -17,
- 98, 77, 231, 20, 0, -140,12066, 0, 229, 0,
- 0, -33, 0, 0, 0, 0, 0,16877, -129, 0,
- 179, -298, -104, 267,19479,19479,16413, 0, 0,16758,
- 0, -84, 253, 0, 8, 255, 19, 0, 87, 95,
-15003, 319,15351, 39, 0, 0, -1,15351, 269, 0,
- 0, 72, -99, 179, 0, 0,19479,19479, 239, 241,
- 0, 0, 72, -44, 0, 338, 72, -84, 104, 0,
- 72,18376, -298, 0, 287, 229, 272, 0, 0, 267,
- -298, 72, 361, 7, 72, 272, 0,17797, 0, 0,
- 0, 0,19479,15003, -10, 324, 38, 0, 377, 0,
- 0, 0, 172,14879, 0, 175,13002, 81, 0, 72,
- 408,19479,19479, 330, 334, 0, 63, 48, 0, 0,
-12190,15003, 229,15351,15003, 0, 0, 0, 0, 0,
-15003, 0, 0, 0, 0, 0, 0, 0,15475,15003,
-15003,15351,15351,15351,15823,13122,13122,15823,15823,15823,
-15351,15351,15351,15351,15351,15351,15351,15823,15351,15823,
-15823,15823,15823,15823,15823,15823,15823,18376, -298,19479,
- 229, 287, 429, 0, 0, 17, 72,13122, -298, 0,
- 72, 0, 0,19479,15351, 431,13122,15351, 0, 0,
- 48, 0,13122, 433, -298, 0, 355, -298, 0, 363,
- 368, -298, 0, 0, 0, 357, 371, 0, 0, 0,
- 39, 0, 0, 0, 230, 230, 0, 0, 248, 250,
- 0,19479,13002, 0,15003, 233, 287, 229, 0, 467,
- 0, 287, -298, 0, -127, 0, 0, 197, 0, -298,
-16413, 0, 0, -298, -298, 116, 157, 0, 0, -298,
- 0, 0, -315, -298, 399, 0, -298, 401, 0, 498,
-13002,15351, 0, 0, 0, 179, 267, 284, 290,15003,
- 0,12536, 0, 287, -159, 0, 0, -24, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, -55,
- -55, 0, 231, 0, 231, 0, 20, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 287,
- 229, 453, 229, 287, 0, 429, 0, 0, 72, 0,
- 0, 0, 504, 0, 0, 0, 0, 0,13586,13122,
-13586, 9757, 0, 0, 0,12190, -298,19479,13122,18782,
- 0,13467, 0, 281, 0, 432, 438, 504, 513, 72,
- -42, 287, 0, 0,13122, 72, 0, 0, 0, 291,
- 286, 162, 210, 0, 529, 202,19073, 530, -298,19479,
- 0, 0, 0, -10, 0, 0, 0, 450, 0, 520,
- 540, 0, 457, 459, 0, 48, 0, 251, 287, 0,
- 287, 0, 0, 0, -101, -298, 0, 0, 0, -84,
- 0, 0, 0, 0, 0, 0, 0, -99,13467, 0,
- 0, 520, 0, 0, 0, 0, -41, 72, 0, 0,
-13122, 520, -298,13122, -298,18495,18495, 0, 460, -298,
- 528, 528, 0, 21, 0, 528, 546, 0, 0, 0,
- 520, 0, 0, -298, 56,18614,18614, -298, -134, 463,
-19479, 466, 469, 230, 72, 0, 0, -298, 0, 0,
- 0, 0, 276, 0, 0, 0, 0, 0, -179, 0,
- 0, -298, 0, 0, 528, 0, 278, -107,13002, -27,
- 72, 121, 72, 0, -298, 0, 0, 0, 0, 0,
- 230, 0, 520, -298,18495,18495,19073, 0, 0, 56,
- 0, 556,15003,13002, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 520, 0, 557, 0, 520,
- 0,
+ 0, 0, 0, 0, 0,16165,17299, 9865, -30, -7,
+ 0, -260, 0, 77, 0, 0, 87, -71, 0, 83,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,15569,
+ 0, 0,17299,16631, 0,17299,16510, 0, 87,16631,
+17299,16165,16165,16165, -289, 2, -68, -260,12754, -260,
+ 0, 0, 81, 0, 0, 1136, -235, -210, -172, 0,
+ 14, 24, 133, 261, -19, 0, -178,12284, 0, 223,
+ 0,11949, 0, -18, 0, 785, 0, 0, 0, 0,
+ 0, 172, -133, 0, 253, 257,17299,17299,16631, 0,
+ 0,16976, 0, -96, 226, 0, -11, 228, 3, 0,
+ 71, 79,15221, 284,15569, -260, -79, 37, 0, 0,
+ 12,15569, 152,13685,13685, 253, 0, 0,17299,17299,
+ 232, 240, 0, 0, 242, -44, 0, 0, 257, -260,
+ 242, 0, -24, 259, 0,18015, 0, 0, 0, 0,
+17299,15221, -34, 297, 27, 0, 353, 0, 0, 0,
+ 144, 0, 157, 362,17299,17299, 286, 296, 0, 30,
+ 77, 0, 0,12408,15221, 223,15569,15221, 0, 0,
+ 0, 0, 0,15221, 0, 0, 0, 0, 0, 0,
+ 0,15693,15221,15221,15569,15569,15569,16041,13340,13340,
+16041,16041,16041,15569,15569,15569,15569,15569,15569,15569,
+16041,15569,16041,16041,16041,16041,16041,16041,16041,16041,
+18713, -260,17299, 0, 223, -260, -127,18713, -127, 223,
+ 388, 0, 0, 66,13340, 9985, 87, 87, 242, 242,
+ 87, -260,18134, 0, -260,17555, 0, 0, 0,17299,
+15569,15569, 0, 0, 77, 0,13340, 383, -260, 0,
+ 308, -260, 0, 330, 338, -260, 0, 0, 0, 423,
+13340, 343, 347, 0, 0, 0, 37, 0, 0, 0,
+ 0, 0, 242, 172, 0, 0, 214, 217, 0,17299,
+ 436, 0, 53, 0, 437,16631, -260, 0, -260, -260,
+ 143, 97, 0, 0, -260, 0, 0, -289, -260, 357,
+ 358, 0, 253, 257, 229, 230,15221, 0,12754, 0,
+ -127, -172, 0, 0, -29, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, -84, -84, 0, 261,
+ 0, 261, 0, -19, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, -127, 223, 399, 223,
+ -127, 452, -54, 0, -127, 223, -127, 0, 388, 0,
+ 242, -96, 227, 0, 242, 259, 0, 0, 242,15097,
+13220, 146, 0, 242, 0, 242,13340, 242, 0, 470,
+ 0, 0, 0,13804,13340,13804, 9985, 0, 0, 0,
+12408, 0, 0, -260,17299,13340,19119, 0, 244, -150,
+ 0, 415, 416, 470,13220, 0, 0, 0, 0, -260,
+ 0, 0, 68,19410, 501, -260,17299, 0, 0, 0,
+ -34, 0, 0, 0, 0, 419, 420, 0, 77, 0,
+ 138, -127, 0, -127, 0, -127, 0, 0,15221, 269,
+ 0, 0, 0, 0, 0, -260, 0, 508,13220,15569,
+ 0, 0, 0, 0, 0, 242, 0, -260, 0, 0,
+ 0, -96, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 287, 244, 0, 0, 516, 288, 0, 281, 0,
+ 150, 207, 0, 527, 0, 444, -260,18832,18832, 0,
+ 447, -260, 517, 517, 0, 15, 0, 517, 533, 0,
+ 0, 0, -260, 0, 0, 0, -197, 0, 0, 451,
+ 519, 540, 0, -10, -260, 0, 457, 0,17299, 461,
+ 462,13685, 0, 0, 519,13340, 242,13340, 519, -260,
+13340, 0, 307, -260, 0, 0, 0, 0, 0, -213,
+ 0, 0, -260, 0, 0, 517, 241, 242, -62, 0,
+ 0, 0, 519, 87,18951,18951, 0, -260, 0, 0,
+ 0, 0, 172,13685, 0, 242, 0, 0, 0, 0,
+ 246, 0, -260,18832,18832,19410, 0, 0, 0, 0,
+ 0, 0, -103,13220, -36, 242, 159, 242, 0, 0,
+ 242, 0, 519, 0, 0, 0, 0, 0, 87, 0,
+ 550,15221,13220, 0, 0, 0, 244, 244, 0, 0,
+ 519, 0, 553, 0, 0, 0, 0, 0, 519, 0,
};
-final static short yyrindex[] = { 9163,
- 0, 143, 0, 159, 0, 8064, 0, 0, 0, 0,
+final static short yyrindex[] = { 9400,
+ 0, 74, 0, 484, 0, 8366, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -570,82 +575,85 @@
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 143, 0, -56, 0, 0,
- 0,14531, 0, 7880, 0, 0, 0, 0, 8711, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 143, -77,
- -59, 0, 0, 0, 143, 143, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 143, 143,
- 143,13935, 0,14059, 0, 0,14531, 143, 602, 0,
- 0, 30, 0, 704, 404, 0, 0, 8779, 0, 8744,
- 7843, 7425, 7030, 6822, 0, 6783, 6404, 0, 2830, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,17218, 0,
- 8445,14531, 0, 8478, 0, 0, 0, 0, 0, 0,
- 0, 12, 0, 0, 29, 0, 511, 0, 0, 0,
- 143, 0, 143, 0, 0, 0, 0, 143, 0, 0,
- 0, 0, 0,11487, 0, 0, 0, 0, 0, 0,
- 0, 0, 0,18138, 0, 0, 0, 325, 0, 0,
- 0, 0,14407, 0, 2984, 3400, 0, 0, 0,11609,
-14531, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, -6, 42, 0, 0, 0, 37, 0,
- 0, 0, 0, 143, 0, 0, 13, 487, 0, 0,
- 0, 0, 0, 0, 0,10220, 0, 549, 0, 0,
- 190, 69, 0, 143, 143, 0, 0, 0, 0, 0,
- 143, 0, 0, 0, 0, 0, 0, 0, 143, 143,
- 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
- 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
- 143, 143, 143, 143, 143, 143, 143, 0,13935, 0,
- 3554, 1690, 0, 0, 0, 0, 0, 143, 316, 0,
- 0, 0, 0, 0, 143, 0, 143, 143, 0, 0,
- -34, 0, 143, 8513,12657, 0, 8548, 9292, 0, 0,
- 0, -21, 0, 0, 0,19598,19241, 0, 0, 0,
- 0, 0, 0, 0, 342, 342, 0, 0, 0, 0,
- 0, 0, 13, 0, 143, 1844, 3970, 4124, 0, 0,
- 0, 4540, -37, 0, 2260, 0, 0, 0, 0,14531,
- 0, 0, 0, -40,18954, -76, 0, 0, 0,14531,
- 0, 0,14531,14531, 0, 0, 488, 0, 0, 0,
- 13, 143, 0, 0, 1120,10561,10683, 0, 0, 143,
- 0, 143, 0, 7885, 8942, 0, 0,14531, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 7464,
- 7672, 0, 7238, 0, 7277, 0, 6858, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 4694,
- 5110, 0, 5264, 2414, 0, 0, 0, 0, 0, 0,
- 0, 0,17337, 0, 0, 0, 0, 0, 143, 143,
- 143, 143, 0, 0, 0, 110,14531, 0, 143, 0,
- 0, -59, 0, 0, 0, 0, 0,18257, 0, 0,
- 0, 5680, 0, 0, 143, 0, 0, 0, 0, 0,
- 1274, 0, 0, 0, 0, 489, 574, 0,18954, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 487,
- 0, 0, 0, 0, 0,10098, 0, 0, 5834, 0,
- 6250, 0, 0, 0, -98,19717, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, -77, 0,
- 0, 487, 0, 0, 0, 0, 0, 0, 0, 0,
- 143, 487,14531, 143, 488, 0, 0, 0, 0, 488,
- -5, -5, 0, 575, 0, -76, 0, 0, 0, 0,
- 487,11024,11146,14531, 0, 0, 0, 316, 500, 0,
- 0, 0, 0, 342, 0, 0, 0, -57, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 502, 0,
- 0,19360, 0, 0, -76, 0, 0, 0, 13, 487,
- 0, 487, 0, 0, 488, 0, 0, 0, 0, 0,
- 342, 0, 487, 488, 0, 0, 0, 0, 0, 0,
- 0, 0, 143, 13, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 487, 0, 0, 0, 487,
- 0,
+ 0, 0, 0, 0, 0, 1339, 0, -37, 0, 0,
+ 0,14749, 0, 8186, 0, 0, 0, 0, 0, 8967,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1339,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1339, 1339, 1339,14153, 0, 0,14749, 74, 595,
+ 0, 0, 44, 0, 982, 670, 0, 0, 9167, 0,
+ 9013, 8138, 7722, 7306, 7108, 0, 7069, 6690, 0, 4980,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,17674,17095, 0, 8514, 8747, 0, 0, 0, 0,
+ 0, 0, 0, -15, 0, 0, 29, 0, 503, 0,
+ 0, 0, 1339, 0, 1339,14749, 0, 0, 0, 0,
+ 0, 1339, 0, -56, 182,11709, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0,18475, 0, 0,11829,14749,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 719, 46, 0, 0, 0, 36, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,10446, 0,
+ 862, 0, 0, 538, 580, 0, 1339, 1339, 0, 0,
+ 0, 0, 0, 1339, 0, 0, 0, 0, 0, 0,
+ 0, 1339, 1339, 1339, 1339, 1339, 1339, 1339, 74, 74,
+ 1339, 1339, 1339, 1339, 1339, 1339, 1339, 1339, 1339, 1339,
+ 1339, 1339, 1339, 1339, 1339, 1339, 1339, 1339, 1339, 1339,
+ 0,14153, 0, 0, 5396,14277, 1398, 0, 2700, 5550,
+ 0, 0, 0, 0, 74, 74, 0, 0, 0, 0,
+ 0,14625, 0, 0, 197, 0, 0, 0, 0, 0,
+ 1339, 1339, 0, 0, -33, 0, 74, 8780,12875, 0,
+ 8815, 9520, 0, 0, 0, 9, 0, 0, 0, 0,
+ 74,19816,19578, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, -109, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, -63, 0, -21,19291,
+ -112, 0, 0, 0,14749, 0, 0,14749,14749, 0,
+ 0, 1552,10787,10907, 0, 0, 1339, 0, 74, 0,
+ 5, 9200, 0, 0,14749, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 7940, 7976, 0, 7524,
+ 0, 7560, 0, 7144, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 3116, 5966, 0, 6120,
+ 1968, 0, 0, 0, 3270, 6536, 3686, 0, 0, 0,
+ 0, 318, 0, 0, 0, 0, 0, 0, 0, 1339,
+ -41, 478, 0, 0, 0, 0, 74, 0, 0,17436,
+ 0, 0, 0, 74, 74, 74, 74, 0, 0, 0,
+ 855, 0, 0,14749, 0, 74, 0, 0, 334, 0,
+ 0, 0, 0,18594, -41, 0, 0, 2122, 0,14749,
+ 0, 0, 480, 570, 0,19291, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,10326, 0,
+ 0, 3840, 0, 4256, 0, 4410, 0, 0, 1339, 4826,
+ 0, 2538, 0, 0, 0, 487, 0, 0, -41, 1339,
+ 0, 0, 0, 440, 0, 0, 0,19935, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 334, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 331, 487, 0, 0, 0,
+ 0, 487, -14, -14, 0, 576, 0, -112, 0, 0,
+11248,11368,14749, 0, 0, 0, 0, 0, 0, 0,
+ 478, 0, 0, 0, 197, -42, 0, 0, 0, 0,
+ 0, 182, 0, 0, 478, 74, 0, 74, 478,14749,
+ 74, 0, 0, -22, 0, 0, 0, 0, 0, 500,
+ 0, 0,19697, 0, 0, -112, 0, 0, 0, 0,
+ 0, 0, 478, 0, 0, 0, 0, 487, 0, 0,
+ 0, 0, -109, -56, 0, 0, 0, 0, 0, 0,
+ 0, 0, 487, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, -41, 478, 0, 478, 0, 0, 0,
+ 0, 0, 478, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1339, -41, 0, 0, 0, 334, 334, 0, 0,
+ 478, 0, 0, 0, 0, 0, 0, 0, 478, 0,
};
final static short yygindex[] = { 0,
- 1, 0, 124, -2, 0, -87, 364, 349, -144, 5,
- 0, -257, 43, 0, 413, 0, 0, 289, 3, 54,
- 347, 333, 918, 227, 201, 130, -105, 0, 117, 311,
- 208, 194, 314, 0, 0, -3, 0, 0, -185, -117,
- -212, 145, 0, -9, 0, -30, 0, 392, 249, 120,
- 0, 254, 131, 0, 0, 6444, 0, -201, 477, 0,
- -113, -303, 0, 0, -286, -348, -264, -109, 64, 0,
- 0, -122, 472, -158, 0, 0, 0, 0, 292, 0,
- -108, 0, 0, -111, 285, -235, 0, 49, -250, -485,
- 50, 0, 0, 75, -63, 260, 0, 113, 0, 0,
- 0, 0, -231, 0, -512, 140, 0, 14,
+ 1, 0, 255, -2, 0, -87, 162, 373, -131, 4,
+ 0, -248, 34, 0, 337, 0, 0, 19, 119, 176,
+ 372, 359, -106, 160, 151, 69, -55, 0, 112, 342,
+ 201, 256, 340, 0, 0, 18, 0, 0, -211, -123,
+ 248, -217, 17, 0, -86, 0, 386, 465, 175, -200,
+ 170, 100, 0, 0, 45, 0, 0, 522, 0, -347,
+ 323, 0, 0, 0, 183, -202, -501, 0, 0, -254,
+ -299, -439, -104, 21, 0, 0, -258, 473, -244, 0,
+ 0, 0, 0, 300, 0, -105, 0, 0, -90, 293,
+ -214, 0, 8, -27, -499, 52, 0, 0, 39, -370,
+ 283, 0, 118, 0, 0, 0, 0, -520, 0, -487,
+ 161, 0, 6,
};
-final static int YYTABLESIZE=20097;
+final static int YYTABLESIZE=20315;
//These two tables are not statically initialized, but rather
//initialized on first use, so that a failure to initialize them
@@ -667,7 +675,7 @@
yytable = (short[])obInp.readObject();
yycheck = (short[])obInp.readObject();
long hash = EYaccFixer.checkhash(yytable, yycheck);
- if (hash != -6767087121733791306L) {
+ if (hash != -1945603369588693761L) {
throw new RuntimeException(rName + " bad checkhash: " +
hash);
}
@@ -699,23 +707,23 @@
"LiteralChar","LiteralString","LiteralTwine","Identifier","VerbAss","QuasiOpen",
"QuasiClose","URI","URIStart","BodyStartWord","BodyNextWord","VTableStartWord",
"VTableNextWord","BIND","CATCH","CLASS","DEF","DELEGATE","ELSE","ESCAPE",
-"FINALLY","FOR","IF","IN","MATCH","META","SWITCH","THUNK","TO","TRY","VAR",
-"WHEN","WHILE","DEFINE","ON","SELECT","TYPEDEF","ABSTRACT","AN","AS",
+"FINALLY","FOR","IF","IN","MATCH","META","PRAGMA","SWITCH","THUNK","TO","TRY",
+"VAR","WHEN","WHILE","DEFINE","ON","SELECT","TYPEDEF","ABSTRACT","AN","AS",
"ATTRIBUTE","BE","BEGIN","BEHALF","BELIEF","BELIEVE","BELIEVES","CASE","CONST",
"CONSTRUCTOR","CONTEXT","DECLARE","DEFAULT","DEFMACRO","DEPRECATED","DISPATCH",
"DO","ENCAPSULATE","ENCAPSULATED","ENCAPSULATES","END","ENSURE","ENUM",
"EVENTUAL","EVENTUALLY","EXPORT","EXTENDS","FACET","FORALL","FUNCTION","GIVEN",
"HIDDEN","HIDES","IMPLEMENTS","INTERFACE","IS","KNOW","KNOWS","LAMBDA","LET",
"METHOD","METHODS","MODULE","NAMESPACE","NATIVE","OBEYS","OCTET","ONEWAY",
-"PACKAGE","PRAGMA","PRIVATE","PROTECTED","PUBLIC","RAISES","RELIANCE","RELIANT",
-"RELIES","RELY","REVEAL","SAKE","SIGNED","STATIC","STRUCT","SUCHTHAT",
-"SUPPORTS","SUSPECT","SUSPECTS","SYNCHRONIZED","THIS","THROWS","TRANSIENT",
-"TRUNCATABLE","UNSIGNED","UNUM","USES","USING","UTF8","UTF16","VALUETYPE",
-"VIRTUAL","VOLATILE","WSTRING","EOL","OpLAnd","OpLOr","OpSame","OpNSame",
-"OpButNot","OpLeq","OpABA","OpGeq","OpThru","OpTill","OpAsl","OpAsr","OpFlrDiv",
-"OpMod","OpPow","OpAss","OpAssAdd","OpAssAnd","OpAssAprxDiv","OpAssFlrDiv",
-"OpAssAsl","OpAssAsr","OpAssRemdr","OpAssMod","OpAssMul","OpAssOr","OpAssPow",
-"OpAssSub","OpAssXor","Send","OpWhen","MapsTo","MatchBind","MisMatch","Audit",
+"PACKAGE","PRIVATE","PROTECTED","PUBLIC","RAISES","RELIANCE","RELIANT","RELIES",
+"RELY","REVEAL","SAKE","SIGNED","STATIC","STRUCT","SUCHTHAT","SUPPORTS",
+"SUSPECT","SUSPECTS","SYNCHRONIZED","THIS","THROWS","TRANSIENT","TRUNCATABLE",
+"UNSIGNED","UNUM","USES","USING","UTF8","UTF16","VALUETYPE","VIRTUAL",
+"VOLATILE","WSTRING","EOL","OpLAnd","OpLOr","OpSame","OpNSame","OpButNot",
+"OpLeq","OpABA","OpGeq","OpThru","OpTill","OpAsl","OpAsr","OpFlrDiv","OpMod",
+"OpPow","OpAss","OpAssAdd","OpAssAnd","OpAssAprxDiv","OpAssFlrDiv","OpAssAsl",
+"OpAssAsr","OpAssRemdr","OpAssMod","OpAssMul","OpAssOr","OpAssPow","OpAssSub",
+"OpAssXor","Send","OpWhen","MapsTo","MatchBind","MisMatch","Audit",
};
final static String yyrule[] = {
"$accept : start",
@@ -806,12 +814,12 @@
"postfix : postfix verb",
"postfix : postfix '.' ident",
"postfix : postfix '.' ident parenArgs",
-"metaExpr : META parenArgs",
-"metaExpr : META verb parenArgs",
-"metaExpr : META Send parenArgs",
-"metaExpr : META Send verb parenArgs",
-"metaExpr : META verb",
-"metaExpr : META Send verb",
+"metaExpr : metaoid parenArgs",
+"metaExpr : metaoid verb parenArgs",
+"metaExpr : metaoid Send parenArgs",
+"metaExpr : metaoid Send verb parenArgs",
+"metaExpr : metaoid verb",
+"metaExpr : metaoid Send verb",
"call : prim",
"call : call parenArgs",
"call : postfix verb parenArgs",
@@ -827,13 +835,13 @@
"prim : parenExpr",
"prim : '[' argList ']'",
"prim : '[' maps ']'",
-"prim : body",
-"prim : ESCAPE pattern body",
-"prim : WHILE parenExpr body",
-"prim : FOR iterPattern IN assign body",
-"prim : SWITCH parenExpr caseList",
-"prim : TRY body catchList finallyClause",
-"prim : WHEN whenHead body catches finallyClause",
+"prim : begin body",
+"prim : begin ESCAPE pattern body",
+"prim : begin WHILE parenExpr body",
+"prim : begin SWITCH parenExpr caseList end",
+"prim : begin TRY body catchList finallyClause",
+"prim : forExpr",
+"prim : whenExpr",
"prim : ifExpr",
"prim : macro",
"prim : '$' '{' LiteralInteger '}'",
@@ -845,24 +853,26 @@
"prim : TYPEDEF oType",
"prim : object",
"object : defAudits vTable",
-"object : defAudits funcHead body",
-"object : THUNK body",
+"object : defAudits begin funcHead body",
+"object : begin THUNK body",
"object : CLASS classHead body",
-"object : '_' funcHead body",
-"object : '_' body",
+"object : begin '_' funcHead body",
+"object : begin '_' body",
"noun : ident",
"parenExpr : '(' eExpr ')'",
-"ifExpr : IF parenExpr body",
-"ifExpr : IF parenExpr body ELSE ifExpr",
-"ifExpr : IF parenExpr body ELSE body",
-"macro : BodyStartWord macroArg body restMacro",
-"macro : VTableStartWord macroArg vTable restMacro",
+"ifExpr : begin IF parenExpr body",
+"ifExpr : begin IF parenExpr body ELSE ifExpr",
+"ifExpr : begin IF parenExpr body ELSE begin body",
+"forExpr : begin FOR iterPattern IN assign begin body end",
+"whenExpr : WHEN whenHead body catches finallyClause",
+"macro : BodyStartWord begin macroArg body restMacro",
+"macro : VTableStartWord begin macroArg vTable end restMacro",
+"$$1 :",
+"restMacro : $$1 BodyNextWord begin macroArg body restMacro",
+"restMacro : VTableNextWord begin macroArg vTable end restMacro",
"macroArg :",
"macroArg : parenExpr",
"macroArg : pattern",
-"$$1 :",
-"restMacro : $$1 BodyNextWord macroArg body restMacro",
-"restMacro : VTableNextWord macroArg vTable restMacro",
"quasiParser :",
"quasiParser : ident",
"quasiParser : '(' eExpr ')'",
@@ -886,7 +896,7 @@
"mapPattern : MapsTo namer",
"pattern : listPatt",
"pattern : listPatt '?' order",
-"pattern : META parenExpr MapsTo pattern",
+"pattern : metaoid parenExpr MapsTo pattern",
"listPatt : eqPatt",
"listPatt : '[' patternList ']'",
"listPatt : '[' patternList ']' '+' listPatt",
@@ -937,25 +947,25 @@
"plural : '(' eExpr ',' args ')'",
"litString : LiteralString",
"litString : LiteralTwine",
-"method : TO methHead body",
-"method : TO verb OpAss assign",
-"method : ON methHead body",
-"method : META parenExpr MapsTo parenExpr",
-"method : META parenExpr body",
+"method : begin TO methHead body",
+"method : begin TO verb OpAss assign end",
+"method : begin ON methHead body",
+"method : begin META parenExpr MapsTo parenExpr end",
+"method : begin META parenExpr body",
"methHead : '(' patternList ')' resultGuard",
"methHead : verb '(' patternList ')' resultGuard",
"methHead : verb resultGuard",
"funcHead : '(' patternList ')' resultGuard",
"funcHead : verb '(' patternList ')' resultGuard",
"funcHead : verb resultGuard",
-"classHead : audits '(' patternList ')' resultGuard",
-"matcher : MATCH pattern body",
-"delegator : DELEGATE body",
+"classHead : audits begin '(' patternList ')' resultGuard",
+"matcher : begin MATCH pattern body",
+"delegator : begin DELEGATE body",
"resultGuard :",
"resultGuard : ':' order",
"whenArgs : '(' args ')'",
-"whenHead : whenArgs OpWhen audits '(' patterns ')' resultGuard",
-"whenHead : audits '(' whenClauses ')' resultGuard",
+"whenHead : whenArgs OpWhen audits begin '(' patterns ')' resultGuard",
+"whenHead : audits begin '(' whenClauses ')' resultGuard",
"whenClauses : whenClause",
"whenClauses : whenClauses ',' whenClause",
"whenClause : eExpr OpWhen pattern",
@@ -990,8 +1000,8 @@
"assignop : OpAssPow",
"assignop : OpAssSub",
"assignop : OpAssXor",
-"body : '{' br '}'",
-"body : '{' br seqs br '}'",
+"body : '{' br '}' end",
+"body : '{' br seqs br '}' end",
"caseList : '{' br matchList '}'",
"vTable : '{' br methodList vMatchList '}'",
"vTable : matcher",
@@ -1005,9 +1015,9 @@
"catchList : emptyList",
"catchList : catches",
"catches : catchList catchClause",
-"catchClause : CATCH pattern body",
+"catchClause : begin CATCH pattern body",
"finallyClause :",
-"finallyClause : FINALLY body",
+"finallyClause : begin FINALLY body",
"oType : audits '{' br messageList '}'",
"oType : audits mType EOL",
"messageList : emptyList",
@@ -1029,6 +1039,10 @@
"pType : '_' optType",
"optType :",
"optType : ':' noun",
+"metaoid : META",
+"metaoid : PRAGMA",
+"begin :",
+"end :",
"reserved : ABSTRACT",
"reserved : AN",
"reserved : AS",
@@ -1081,7 +1095,6 @@
"reserved : OCTET",
"reserved : ONEWAY",
"reserved : PACKAGE",
-"reserved : PRAGMA",
"reserved : PRIVATE",
"reserved : PROTECTED",
"reserved : PUBLIC",
@@ -1116,7 +1129,7 @@
"reserved : WSTRING",
};
-//#line 1122 "e.y"
+//#line 1171 "e.y"
/**
*
@@ -1383,6 +1396,7 @@
TheTokens[IN] = "in";
TheTokens[MATCH] = "match";
TheTokens[META] = "meta";
+ TheTokens[PRAGMA] = "pragma";
TheTokens[SWITCH] = "switch";
TheTokens[THUNK] = "thunk";
TheTokens[TO] = "to";
@@ -1450,7 +1464,6 @@
TheTokens[OCTET] = "octet";
TheTokens[ONEWAY] = "oneway";
TheTokens[PACKAGE] = "package";
- TheTokens[PRAGMA] = "pragma";
TheTokens[PRIVATE] = "private";
TheTokens[PROTECTED] = "protected";
TheTokens[PUBLIC] = "public";
@@ -1634,7 +1647,7 @@
static public boolean isContinuer(int tokenType) {
return TheContinuers[tokenType];
}
-//#line 5579 "EParser.java"
+//#line 5636 "EParser.java"
//###############################################################
// method: yylexdebug : check lexer state
//###############################################################
@@ -2036,29 +2049,29 @@
break;
case 88:
//#line 409 "e.y"
-{ yyval = doMeta("run", val_peek(0)); }
+{ yyval = doMeta(val_peek(1), "run", val_peek(0)); }
break;
case 89:
//#line 410 "e.y"
-{ yyval = doMeta(val_peek(1), val_peek(0)); }
+{ yyval = doMeta(val_peek(2), val_peek(1), val_peek(0)); }
break;
case 90:
//#line 411 "e.y"
-{ yyval = doMetaSend("run", val_peek(0)); }
+{ yyval = doMetaSend(val_peek(2), "run", val_peek(0)); }
break;
case 91:
//#line 412 "e.y"
-{ yyval = doMetaSend(val_peek(1), val_peek(0)); }
+{ yyval = doMetaSend(val_peek(3), val_peek(1), val_peek(0)); }
break;
case 92:
//#line 414 "e.y"
{ pocket("no-paren-call");
- yyval = doMeta(val_peek(0), list()); }
+ yyval = doMeta(val_peek(1), val_peek(0), list()); }
break;
case 93:
//#line 416 "e.y"
{ pocket("no-paren-call");
- yyval = doMetaSend(val_peek(0), list()); }
+ yyval = doMetaSend(val_peek(2), val_peek(0), list()); }
break;
case 95:
//#line 430 "e.y"
@@ -2122,677 +2135,686 @@
break;
case 112:
//#line 462 "e.y"
-{ yyval = forx(val_peek(3),val_peek(1),val_peek(0)); }
+{ yyval = switchx(val_peek(2),val_peek(1)); }
break;
case 113:
//#line 464 "e.y"
-{ yyval = switchx(val_peek(1),val_peek(0)); }
-break;
-case 114:
-//#line 466 "e.y"
{ yyval = tryx(val_peek(2),val_peek(1),val_peek(0)); }
break;
-case 115:
-//#line 468 "e.y"
-{ yyval = when(val_peek(3),val_peek(2),val_peek(1),val_peek(0)); }
-break;
case 118:
-//#line 474 "e.y"
+//#line 472 "e.y"
{ yyval = quasiLiteralExpr(val_peek(1)); }
break;
case 119:
-//#line 475 "e.y"
+//#line 473 "e.y"
{ yyval = quasiLiteralExpr(val_peek(0)); }
break;
case 120:
-//#line 476 "e.y"
+//#line 474 "e.y"
{ yyval = quasiLiteralExpr(); }
break;
case 121:
-//#line 477 "e.y"
+//#line 475 "e.y"
{ yyval = quasiPatternExpr(val_peek(1)); }
break;
case 122:
-//#line 478 "e.y"
+//#line 476 "e.y"
{ yyval = quasiPatternExpr(val_peek(0)); }
break;
case 123:
-//#line 481 "e.y"
+//#line 479 "e.y"
{ reserved("select"); }
break;
case 124:
-//#line 482 "e.y"
+//#line 480 "e.y"
{ pocket("typedef");
yyval = val_peek(0); }
break;
case 126:
-//#line 491 "e.y"
+//#line 489 "e.y"
{ yyval = object(val_peek(1), val_peek(0)); }
break;
case 127:
-//#line 492 "e.y"
-{ yyval = methObject(val_peek(2),val_peek(1),val_peek(0)); }
+//#line 490 "e.y"
+{ yyval = methObject(val_peek(3),val_peek(1),val_peek(0)); }
break;
case 128:
-//#line 493 "e.y"
+//#line 491 "e.y"
{ yyval = thunk(val_peek(0)); }
break;
case 129:
-//#line 495 "e.y"
+//#line 493 "e.y"
{ yyval = classExpr(val_peek(1),val_peek(0)); }
break;
case 130:
-//#line 497 "e.y"
+//#line 495 "e.y"
{ pocket("anon-lambda");
- yyval = methObject(audits(ignore(), list()),
- val_peek(1),
- val_peek(0)); }
+ yyval = methObject(audits(ignore(),
+ list()),
+ val_peek(1),
+ val_peek(0)); }
break;
case 131:
-//#line 501 "e.y"
+//#line 500 "e.y"
{ pocket("anon-lambda");
- yyval = thunk(val_peek(0)); }
+ yyval = thunk(val_peek(0)); }
break;
case 132:
-//#line 509 "e.y"
+//#line 508 "e.y"
{ yyval = noun(val_peek(0)); }
break;
case 133:
-//#line 518 "e.y"
+//#line 517 "e.y"
{ yyval = val_peek(1); }
break;
case 134:
-//#line 527 "e.y"
+//#line 526 "e.y"
{ yyval = ifx(val_peek(1), val_peek(0)); }
break;
case 135:
-//#line 528 "e.y"
+//#line 527 "e.y"
{ yyval = ifx(val_peek(3), val_peek(2), val_peek(0)); }
break;
case 136:
-//#line 529 "e.y"
-{ yyval = ifx(val_peek(3), val_peek(2), val_peek(0)); }
+//#line 528 "e.y"
+{ yyval = ifx(val_peek(4), val_peek(3), val_peek(0)); }
break;
case 137:
-//#line 534 "e.y"
-{ yyval = macro(val_peek(3), val_peek(2), val_peek(1), val_peek(0)); }
+//#line 536 "e.y"
+{ yyval = forx(val_peek(5),val_peek(3),val_peek(1)); }
break;
case 138:
-//#line 536 "e.y"
-{ yyval = macro(val_peek(3), val_peek(2), val_peek(1), val_peek(0)); }
+//#line 544 "e.y"
+{ yyval = when(val_peek(3),val_peek(2),val_peek(1),val_peek(0)); }
break;
case 139:
-//#line 540 "e.y"
+//#line 554 "e.y"
+{ yyval = macro(val_peek(4), val_peek(2), val_peek(1), val_peek(0)); }
+break;
+case 140:
+//#line 556 "e.y"
+{ yyval = macro(val_peek(5), val_peek(3), val_peek(2), val_peek(0)); }
+break;
+case 141:
+//#line 560 "e.y"
{ yyval = null; }
break;
case 142:
-//#line 546 "e.y"
-{ yyval = null; }
+//#line 562 "e.y"
+{ yyval = macro(val_peek(5), val_peek(3), val_peek(2), val_peek(1)); }
break;
case 143:
-//#line 548 "e.y"
-{ yyval = macro(val_peek(4), val_peek(3), val_peek(2), val_peek(1)); }
+//#line 564 "e.y"
+{ yyval = macro(val_peek(5), val_peek(3), val_peek(2), val_peek(0)); }
break;
case 144:
-//#line 550 "e.y"
-{ yyval = macro(val_peek(3), val_peek(2), val_peek(1), val_peek(0)); }
+//#line 572 "e.y"
+{ yyval = null; }
break;
-case 145:
-//#line 555 "e.y"
+case 147:
+//#line 579 "e.y"
{ yyval = noun("simple__quasiParser"); }
break;
-case 146:
-//#line 556 "e.y"
+case 148:
+//#line 580 "e.y"
{ yyval = noun(val_peek(0) + "__quasiParser"); }
break;
-case 147:
-//#line 557 "e.y"
+case 149:
+//#line 581 "e.y"
{ yyval = val_peek(1); }
break;
-case 148:
-//#line 561 "e.y"
+case 150:
+//#line 585 "e.y"
{ yyval = list(val_peek(0)); }
break;
-case 149:
-//#line 562 "e.y"
+case 151:
+//#line 586 "e.y"
{ yyval = with(val_peek(1), val_peek(0)); }
break;
-case 150:
-//#line 566 "e.y"
+case 152:
+//#line 590 "e.y"
{ yyval = list(val_peek(1), val_peek(0)); }
break;
-case 151:
-//#line 567 "e.y"
+case 153:
+//#line 591 "e.y"
{ yyval = with(with(val_peek(2), val_peek(1)), val_peek(0)); }
break;
-case 152:
-//#line 571 "e.y"
+case 154:
+//#line 595 "e.y"
{ yyval = noun(val_peek(0)); }
break;
-case 153:
-//#line 572 "e.y"
+case 155:
+//#line 596 "e.y"
{ yyval = val_peek(2); }
break;
-case 154:
-//#line 576 "e.y"
+case 156:
+//#line 600 "e.y"
{ myLexer.quasiAgain(); }
break;
-case 157:
-//#line 593 "e.y"
+case 159:
+//#line 617 "e.y"
{ yyval = list(val_peek(0)); }
break;
-case 158:
-//#line 594 "e.y"
+case 160:
+//#line 618 "e.y"
{ yyval = with(val_peek(3), val_peek(0)); }
break;
-case 160:
-//#line 604 "e.y"
+case 162:
+//#line 628 "e.y"
{ yyval = list(val_peek(0)); }
break;
-case 161:
-//#line 605 "e.y"
+case 163:
+//#line 629 "e.y"
{ yyval = with(val_peek(3), val_peek(0)); }
break;
-case 162:
-//#line 612 "e.y"
+case 164:
+//#line 636 "e.y"
{ yyval = new Assoc(ignore(), val_peek(0)); }
break;
-case 164:
-//#line 617 "e.y"
+case 166:
+//#line 641 "e.y"
{ yyval = new Assoc(val_peek(2), val_peek(0)); }
break;
-case 165:
-//#line 618 "e.y"
+case 167:
+//#line 642 "e.y"
{ reserved("var-extract-pattern"); }
break;
-case 167:
-//#line 623 "e.y"
+case 169:
+//#line 647 "e.y"
{ yyval = suchThat(val_peek(2), val_peek(0)); }
break;
-case 168:
-//#line 625 "e.y"
+case 170:
+//#line 649 "e.y"
{ reserved("meta pattern"); }
break;
-case 170:
-//#line 630 "e.y"
+case 172:
+//#line 654 "e.y"
{ yyval = listPattern(val_peek(1)); }
break;
-case 171:
-//#line 631 "e.y"
+case 173:
+//#line 655 "e.y"
{ yyval = cdrPattern(val_peek(3), val_peek(0)); }
break;
-case 172:
-//#line 633 "e.y"
+case 174:
+//#line 657 "e.y"
{ reserved("map pattern"); }
break;
-case 173:
-//#line 634 "e.y"
+case 175:
+//#line 658 "e.y"
{ reserved("map pattern"); }
break;
-case 175:
-//#line 639 "e.y"
+case 177:
+//#line 663 "e.y"
{ yyval = patternEquals(val_peek(0)); }
break;
-case 177:
-//#line 644 "e.y"
+case 179:
+//#line 668 "e.y"
{ yyval = quasiPattern(val_peek(1), val_peek(0)); }
break;
-case 178:
-//#line 648 "e.y"
+case 180:
+//#line 672 "e.y"
{ yyval = list(val_peek(0)); }
break;
-case 179:
-//#line 649 "e.y"
+case 181:
+//#line 673 "e.y"
{ yyval = with(val_peek(1), val_peek(0)); }
break;
-case 180:
-//#line 653 "e.y"
+case 182:
+//#line 677 "e.y"
{ yyval = list(val_peek(1), val_peek(0)); }
break;
-case 181:
-//#line 654 "e.y"
+case 183:
+//#line 678 "e.y"
{ yyval = with(with(val_peek(2), val_peek(1)), val_peek(0)); }
break;
-case 184:
-//#line 663 "e.y"
+case 186:
+//#line 687 "e.y"
{ yyval = finalPattern(val_peek(0)); }
break;
-case 185:
-//#line 664 "e.y"
+case 187:
+//#line 688 "e.y"
{ yyval = ignore(); }
break;
-case 186:
-//#line 665 "e.y"
+case 188:
+//#line 689 "e.y"
{ yyval = val_peek(2); }
break;
-case 187:
-//#line 678 "e.y"
+case 189:
+//#line 702 "e.y"
{ yyval = finalPattern(val_peek(2), val_peek(0)); }
break;
-case 188:
-//#line 679 "e.y"
+case 190:
+//#line 703 "e.y"
{ yyval = finalPattern(val_peek(0)); }
break;
-case 189:
-//#line 680 "e.y"
+case 191:
+//#line 704 "e.y"
{ yyval = slotDefiner(val_peek(0)); }
break;
-case 190:
-//#line 681 "e.y"
+case 192:
+//#line 705 "e.y"
{ yyval = ignore(); }
break;
-case 193:
-//#line 685 "e.y"
+case 195:
+//#line 709 "e.y"
{ yyval = quasiLiteralPatt(val_peek(1)); }
break;
-case 194:
-//#line 686 "e.y"
+case 196:
+//#line 710 "e.y"
{ yyval = quasiPatternPatt(val_peek(1)); }
break;
-case 195:
-//#line 690 "e.y"
+case 197:
+//#line 714 "e.y"
{ yyval = bindDefiner(val_peek(2), val_peek(0)); }
break;
-case 196:
-//#line 691 "e.y"
+case 198:
+//#line 715 "e.y"
{ yyval = bindDefiner(val_peek(0)); }
break;
-case 197:
-//#line 695 "e.y"
+case 199:
+//#line 719 "e.y"
{ yyval = varPattern(val_peek(2), val_peek(0)); }
break;
-case 198:
-//#line 696 "e.y"
+case 200:
+//#line 720 "e.y"
{ yyval = varPattern(val_peek(0)); }
break;
-case 199:
-//#line 705 "e.y"
+case 201:
+//#line 729 "e.y"
{ yyval = finalPattern(val_peek(0)); }
break;
-case 200:
-//#line 706 "e.y"
+case 202:
+//#line 730 "e.y"
{ yyval = ignore(); }
break;
-case 201:
-//#line 707 "e.y"
+case 203:
+//#line 731 "e.y"
{ yyval = bindDefiner(val_peek(0)); }
break;
-case 202:
-//#line 708 "e.y"
+case 204:
+//#line 732 "e.y"
{ yyval = varPattern(val_peek(0)); }
break;
-case 203:
-//#line 709 "e.y"
+case 205:
+//#line 733 "e.y"
{ yyval = quasiLiteralPatt(val_peek(1)); }
break;
-case 204:
-//#line 710 "e.y"
+case 206:
+//#line 734 "e.y"
{ yyval = quasiPatternPatt(val_peek(1)); }
break;
-case 206:
-//#line 727 "e.y"
+case 208:
+//#line 751 "e.y"
{ yyval = val_peek(0); }
break;
-case 207:
-//#line 728 "e.y"
+case 209:
+//#line 752 "e.y"
{ yyval = bindDefiner(val_peek(0)); }
break;
-case 208:
-//#line 729 "e.y"
+case 210:
+//#line 753 "e.y"
{ yyval = varPattern(val_peek(0)); }
break;
-case 209:
-//#line 736 "e.y"
+case 211:
+//#line 760 "e.y"
{ yyval = audits(val_peek(0), list()); }
break;
-case 210:
-//#line 737 "e.y"
+case 212:
+//#line 761 "e.y"
{ pocket("auditors");
yyval = audits(val_peek(2), val_peek(0)); }
break;
-case 211:
-//#line 745 "e.y"
+case 213:
+//#line 769 "e.y"
{ yyval = audits(val_peek(0), list()); }
break;
-case 212:
-//#line 746 "e.y"
+case 214:
+//#line 770 "e.y"
{ pocket("auditors");
yyval = audits(val_peek(2), val_peek(0)); }
break;
-case 213:
-//#line 751 "e.y"
+case 215:
+//#line 775 "e.y"
{ yyval = list(val_peek(0)); }
break;
-case 214:
-//#line 752 "e.y"
+case 216:
+//#line 776 "e.y"
{ yyval = with(val_peek(3), val_peek(0)); }
break;
-case 215:
-//#line 764 "e.y"
+case 217:
+//#line 788 "e.y"
{ yyval = list(); }
break;
-case 216:
-//#line 765 "e.y"
+case 218:
+//#line 789 "e.y"
{ yyval = append(list(val_peek(3)),val_peek(1)); }
break;
-case 219:
-//#line 779 "e.y"
+case 221:
+//#line 803 "e.y"
{ yyval = method(val_peek(1), val_peek(0)); }
break;
-case 220:
-//#line 781 "e.y"
+case 222:
+//#line 805 "e.y"
{ reserved("fields"); }
break;
-case 221:
-//#line 782 "e.y"
+case 223:
+//#line 806 "e.y"
{ reserved("on event"); }
break;
-case 222:
-//#line 783 "e.y"
+case 224:
+//#line 807 "e.y"
{ reserved("sealed meta"); }
break;
-case 223:
-//#line 784 "e.y"
+case 225:
+//#line 808 "e.y"
{ reserved("sealed meta"); }
break;
-case 224:
-//#line 792 "e.y"
+case 226:
+//#line 816 "e.y"
{ yyval = methHead("run", val_peek(2), val_peek(0)); }
break;
-case 225:
-//#line 793 "e.y"
+case 227:
+//#line 817 "e.y"
{ yyval = methHead(val_peek(4), val_peek(2), val_peek(0)); }
break;
-case 226:
-//#line 795 "e.y"
+case 228:
+//#line 819 "e.y"
{ pocket("no-paren-method");
yyval = methHead(val_peek(1), list(), val_peek(0)); }
break;
-case 227:
-//#line 804 "e.y"
+case 229:
+//#line 828 "e.y"
{ yyval = methHead("run", val_peek(2), val_peek(0)); }
break;
-case 228:
-//#line 806 "e.y"
+case 230:
+//#line 830 "e.y"
{ pocket("one-method-object");
yyval = methHead(val_peek(4), val_peek(2), val_peek(0)); }
break;
-case 229:
-//#line 808 "e.y"
+case 231:
+//#line 832 "e.y"
{ pocket("no-paren-method");
yyval = methHead(val_peek(1), list(), val_peek(0)); }
break;
-case 230:
-//#line 817 "e.y"
-{ yyval = list(val_peek(4), val_peek(2), val_peek(0)); }
+case 232:
+//#line 841 "e.y"
+{ yyval = list(val_peek(5), val_peek(2), val_peek(0)); }
break;
-case 231:
-//#line 827 "e.y"
+case 233:
+//#line 851 "e.y"
{ yyval = matcher(val_peek(1), val_peek(0)); }
break;
-case 232:
-//#line 836 "e.y"
+case 234:
+//#line 860 "e.y"
{ yyval = delegatex(val_peek(0)); }
break;
-case 233:
-//#line 843 "e.y"
+case 235:
+//#line 867 "e.y"
{ yyval = VOID; }
break;
-case 234:
-//#line 844 "e.y"
+case 236:
+//#line 868 "e.y"
{ yyval = val_peek(0); }
break;
-case 235:
-//#line 848 "e.y"
+case 237:
+//#line 872 "e.y"
{ yyval = val_peek(1); }
break;
-case 236:
-//#line 853 "e.y"
-{ yyval = list(val_peek(6), val_peek(4), val_peek(2), val_peek(0)); }
+case 238:
+//#line 881 "e.y"
+{ yyval = list(val_peek(7), val_peek(5), val_peek(2), val_peek(0)); }
break;
-case 237:
-//#line 855 "e.y"
+case 239:
+//#line 884 "e.y"
{ pocket("when-clauses");
- yyval = list(val_peek(4), val_peek(2), val_peek(0)); }
+ yyval = list(val_peek(5), val_peek(2), val_peek(0)); }
break;
-case 238:
-//#line 860 "e.y"
+case 240:
+//#line 889 "e.y"
{ yyval = list(val_peek(0)); }
break;
-case 239:
-//#line 861 "e.y"
+case 241:
+//#line 890 "e.y"
{ yyval = with(val_peek(2), val_peek(0)); }
break;
-case 240:
-//#line 865 "e.y"
+case 242:
+//#line 894 "e.y"
{ list(val_peek(2), val_peek(0)); }
break;
-case 245:
-//#line 883 "e.y"
+case 247:
+//#line 912 "e.y"
{ yyval = list(); }
break;
-case 246:
-//#line 887 "e.y"
+case 248:
+//#line 916 "e.y"
{ yyval = list(); }
break;
-case 247:
-//#line 892 "e.y"
+case 249:
+//#line 921 "e.y"
{ yyval = val_peek(1); }
break;
-case 248:
-//#line 897 "e.y"
+case 250:
+//#line 926 "e.y"
{ pocket("lambda-args");
yyval = with(val_peek(1), val_peek(0)); }
break;
-case 251:
-//#line 907 "e.y"
+case 253:
+//#line 936 "e.y"
{ yyval = list(val_peek(0)); }
break;
-case 252:
-//#line 908 "e.y"
+case 254:
+//#line 937 "e.y"
{ yyval = with(val_peek(2), val_peek(0)); }
break;
-case 253:
-//#line 913 "e.y"
+case 255:
+//#line 942 "e.y"
{ yyval = list(val_peek(0)); }
break;
-case 254:
-//#line 914 "e.y"
+case 256:
+//#line 943 "e.y"
{ yyval = with(val_peek(2), val_peek(0)); }
break;
-case 255:
-//#line 918 "e.y"
+case 257:
+//#line 947 "e.y"
{ yyval = new Assoc(val_peek(2), val_peek(0)); }
break;
-case 256:
-//#line 919 "e.y"
+case 258:
+//#line 948 "e.y"
{ reserved("export binding"); }
break;
-case 258:
-//#line 932 "e.y"
+case 260:
+//#line 961 "e.y"
{ yyval = hilbert(val_peek(0)); }
break;
-case 259:
-//#line 933 "e.y"
+case 261:
+//#line 962 "e.y"
{ reserved("keyword \"" +
((Token)val_peek(0)).token() +
"\""); }
break;
-case 260:
-//#line 949 "e.y"
+case 262:
+//#line 978 "e.y"
{ yyval = "add"; }
break;
-case 261:
-//#line 950 "e.y"
+case 263:
+//#line 979 "e.y"
{ yyval = "and"; }
break;
-case 262:
-//#line 951 "e.y"
+case 264:
+//#line 980 "e.y"
{ yyval = "approxDivide"; }
break;
-case 263:
-//#line 952 "e.y"
+case 265:
+//#line 981 "e.y"
{ yyval = "floorDivide"; }
break;
-case 264:
-//#line 953 "e.y"
+case 266:
+//#line 982 "e.y"
{ yyval = "shiftLeft"; }
break;
-case 265:
-//#line 954 "e.y"
+case 267:
+//#line 983 "e.y"
{ yyval = "remainder"; }
break;
-case 266:
-//#line 955 "e.y"
+case 268:
+//#line 984 "e.y"
{ yyval = "mod"; }
break;
-case 267:
-//#line 956 "e.y"
+case 269:
+//#line 985 "e.y"
{ yyval = "multiply"; }
break;
-case 268:
-//#line 957 "e.y"
+case 270:
+//#line 986 "e.y"
{ yyval = "or"; }
break;
-case 269:
-//#line 958 "e.y"
+case 271:
+//#line 987 "e.y"
{ yyval = "pow"; }
break;
-case 270:
-//#line 959 "e.y"
+case 272:
+//#line 988 "e.y"
{ yyval = "subtract"; }
break;
-case 271:
-//#line 960 "e.y"
+case 273:
+//#line 989 "e.y"
{ yyval = "xor"; }
break;
-case 272:
-//#line 969 "e.y"
+case 274:
+//#line 998 "e.y"
{ yyval = NULL; }
break;
-case 273:
-//#line 970 "e.y"
-{ yyval = val_peek(2); }
+case 275:
+//#line 999 "e.y"
+{ yyval = val_peek(3); }
break;
-case 274:
-//#line 974 "e.y"
+case 276:
+//#line 1003 "e.y"
{ yyval = val_peek(1); }
break;
-case 275:
-//#line 979 "e.y"
+case 277:
+//#line 1008 "e.y"
{ yyval = eScript(val_peek(2), optMatcher(val_peek(1))); }
break;
-case 276:
-//#line 981 "e.y"
+case 278:
+//#line 1010 "e.y"
{ pocket("plumbing");
yyval = eScript(null, val_peek(0)); }
break;
-case 277:
-//#line 983 "e.y"
+case 279:
+//#line 1012 "e.y"
{ pocket("plumbing");
yyval = eScript(null, val_peek(0)); }
break;
-case 279:
-//#line 993 "e.y"
-{ yyval = with(val_peek(2), val_peek(1)); }
-break;
case 281:
-//#line 998 "e.y"
+//#line 1022 "e.y"
{ yyval = with(val_peek(2), val_peek(1)); }
break;
case 283:
-//#line 1003 "e.y"
+//#line 1027 "e.y"
{ yyval = with(val_peek(2), val_peek(1)); }
break;
-case 286:
-//#line 1020 "e.y"
+case 285:
+//#line 1032 "e.y"
+{ yyval = with(val_peek(2), val_peek(1)); }
+break;
+case 288:
+//#line 1049 "e.y"
{ yyval = with(val_peek(1), val_peek(0)); }
break;
-case 287:
-//#line 1024 "e.y"
+case 289:
+//#line 1053 "e.y"
{ yyval = matcher(val_peek(1), val_peek(0)); }
break;
-case 288:
-//#line 1031 "e.y"
+case 290:
+//#line 1060 "e.y"
{ yyval = null; }
break;
-case 289:
-//#line 1032 "e.y"
+case 291:
+//#line 1061 "e.y"
{ yyval = val_peek(0); }
break;
-case 290:
-//#line 1043 "e.y"
+case 292:
+//#line 1072 "e.y"
{ yyval = oType(val_peek(4), val_peek(1)); }
break;
-case 291:
-//#line 1044 "e.y"
+case 293:
+//#line 1073 "e.y"
{ yyval = oType(val_peek(2), list(val_peek(1))); }
break;
-case 295:
-//#line 1051 "e.y"
+case 297:
+//#line 1080 "e.y"
{ yyval = with(val_peek(3),val_peek(1)); }
break;
-case 296:
-//#line 1055 "e.y"
+case 298:
+//#line 1084 "e.y"
{ yyval = list(val_peek(0)); }
break;
-case 297:
-//#line 1056 "e.y"
+case 299:
+//#line 1085 "e.y"
{ yyval = with(val_peek(3),val_peek(0)); }
break;
-case 298:
-//#line 1058 "e.y"
+case 300:
+//#line 1087 "e.y"
{ reserved("on event"); }
break;
-case 299:
-//#line 1059 "e.y"
+case 301:
+//#line 1088 "e.y"
{ reserved("on event"); }
break;
-case 300:
-//#line 1066 "e.y"
+case 302:
+//#line 1095 "e.y"
{ yyval = mType(val_peek(1),list(),val_peek(0)); }
break;
-case 301:
-//#line 1067 "e.y"
+case 303:
+//#line 1096 "e.y"
{ yyval = mType(val_peek(4),val_peek(2),val_peek(0)); }
break;
-case 302:
-//#line 1068 "e.y"
+case 304:
+//#line 1097 "e.y"
{ yyval = mType("run",val_peek(2),val_peek(0)); }
break;
-case 303:
-//#line 1072 "e.y"
+case 305:
+//#line 1101 "e.y"
{ yyval = val_peek(0); }
break;
-case 304:
-//#line 1073 "e.y"
+case 306:
+//#line 1102 "e.y"
{ yyval = val_peek(1); }
break;
-case 305:
-//#line 1077 "e.y"
+case 307:
+//#line 1106 "e.y"
{ yyval = list(val_peek(0)); }
break;
-case 306:
-//#line 1078 "e.y"
+case 308:
+//#line 1107 "e.y"
{ yyval = with(val_peek(3),val_peek(0)); }
break;
-case 307:
-//#line 1085 "e.y"
+case 309:
+//#line 1114 "e.y"
{ yyval = pType(val_peek(1),val_peek(0)); }
break;
-case 308:
-//#line 1086 "e.y"
+case 310:
+//#line 1115 "e.y"
{ yyval = pType(null,val_peek(0)); }
break;
-case 309:
-//#line 1090 "e.y"
+case 311:
+//#line 1119 "e.y"
{ yyval = null; }
break;
-case 310:
-//#line 1091 "e.y"
+case 312:
+//#line 1120 "e.y"
{ yyval = val_peek(0); }
+break;
+case 315:
+//#line 1136 "e.y"
+{ begin(); }
+break;
+case 316:
+//#line 1143 "e.y"
+{ end(); }
break;
-//#line 6734 "EParser.java"
+//#line 6800 "EParser.java"
//########## END OF USER-SUPPLIED ACTIONS ##########
}//switch
//#### Now let's reduce... ####
1.86 +115 -66 e/src/jsrc/org/erights/e/elang/syntax/e.y
Index: e.y
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/e.y,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -r1.85 -r1.86
--- e.y 2001/10/03 04:41:03 1.85
+++ e.y 2001/10/27 17:27:43 1.86
@@ -67,7 +67,7 @@
/* Keywords */
%token BIND CATCH CLASS DEF DELEGATE
%token ELSE ESCAPE FINALLY FOR IF IN
-%token MATCH META SWITCH
+%token MATCH META PRAGMA SWITCH
%token THUNK TO TRY VAR WHEN WHILE
/* Pseudo-reserved (Reserved, but used in reserved productions) */
@@ -85,7 +85,7 @@
%token KNOW KNOWS LAMBDA LET METHOD METHODS MODULE
%token NAMESPACE NATIVE
%token OBEYS OCTET ONEWAY
-%token PACKAGE PRAGMA PRIVATE PROTECTED PUBLIC
+%token PACKAGE PRIVATE PROTECTED PUBLIC
%token RAISES RELIANCE RELIANT RELIES RELY REVEAL
%token SAKE SIGNED STATIC STRUCT
%token SUCHTHAT SUPPORTS SUSPECT SUSPECTS SYNCHRONIZED
@@ -406,15 +406,15 @@
*
*/
metaExpr:
- META parenArgs { $$ = doMeta("run", $2); }
- | META verb parenArgs { $$ = doMeta($2, $3); }
- | META Send parenArgs { $$ = doMetaSend("run", $3); }
- | META Send verb parenArgs { $$ = doMetaSend($3, $4); }
-
- | META verb { pocket("no-paren-call");
- $$ = doMeta($2, list()); }
- | META Send verb { pocket("no-paren-call");
- $$ = doMetaSend($3, list()); }
+ metaoid parenArgs { $$ = doMeta($1, "run", $2); }
+ | metaoid verb parenArgs { $$ = doMeta($1, $2, $3); }
+ | metaoid Send parenArgs { $$ = doMetaSend($1, "run", $3); }
+ | metaoid Send verb parenArgs { $$ = doMetaSend($1, $3, $4); }
+
+ | metaoid verb { pocket("no-paren-call");
+ $$ = doMeta($1, $2, list()); }
+ | metaoid Send verb { pocket("no-paren-call");
+ $$ = doMetaSend($1, $3, list()); }
;
@@ -453,20 +453,18 @@
| '[' argList ']' { $$ = tuple($2); }
| '[' maps ']' { $$ = map($2); }
- | body { $$ = hide($1); }
+ | begin body { $$ = hide($2); }
- | ESCAPE pattern body { $$ = escape($2,$3); }
+ | begin ESCAPE pattern body { $$ = escape($3,$4); }
- | WHILE parenExpr body { $$ = whilex($2,$3); }
+ | begin WHILE parenExpr body { $$ = whilex($3,$4); }
- | FOR iterPattern IN assign body { $$ = forx($2,$4,$5); }
+ | begin SWITCH parenExpr caseList end { $$ = switchx($3,$4); }
- | SWITCH parenExpr caseList { $$ = switchx($2,$3); }
+ | begin TRY body catchList finallyClause { $$ = tryx($3,$4,$5); }
- | TRY body catchList finallyClause { $$ = tryx($2,$3,$4); }
-
- | WHEN whenHead body catches finallyClause { $$ = when($2,$3,$4,$5); }
-
+ | forExpr
+ | whenExpr
| ifExpr
| macro
@@ -485,21 +483,22 @@
;
/**
- *
+ * Note that 'classHead' provides its own 'begin'
*/
object:
defAudits vTable { $$ = object($1, $2); }
- | defAudits funcHead body { $$ = methObject($1,$2,$3); }
- | THUNK body { $$ = thunk($2); }
+ | defAudits begin funcHead body { $$ = methObject($1,$3,$4); }
+ | begin THUNK body { $$ = thunk($3); }
| CLASS classHead body { $$ = classExpr($2,$3); }
- | '_' funcHead body { pocket("anon-lambda");
- $$ = methObject(audits(ignore(), list()),
- $2,
- $3); }
- | '_' body { pocket("anon-lambda");
- $$ = thunk($2); }
+ | begin '_' funcHead body { pocket("anon-lambda");
+ $$ = methObject(audits(ignore(),
+ list()),
+ $3,
+ $4); }
+ | begin '_' body { pocket("anon-lambda");
+ $$ = thunk($3); }
;
/**
@@ -524,32 +523,57 @@
* is accepted directly.
*/
ifExpr:
- IF parenExpr body { $$ = ifx($2, $3); }
- | IF parenExpr body ELSE ifExpr { $$ = ifx($2, $3, $5); }
- | IF parenExpr body ELSE body { $$ = ifx($2, $3, $5); }
+ begin IF parenExpr body { $$ = ifx($3, $4); }
+ | begin IF parenExpr body ELSE ifExpr { $$ = ifx($3, $4, $6); }
+ | begin IF parenExpr body ELSE begin body { $$ = ifx($3, $4, $7); }
;
-macro:
- BodyStartWord macroArg body restMacro
- { $$ = macro($1, $2, $3, $4); }
- | VTableStartWord macroArg vTable restMacro
- { $$ = macro($1, $2, $3, $4); }
+/**
+ * XXX Note that the outer (first) 'begin' cannot be positioned properly.
+ */
+forExpr:
+ begin FOR iterPattern IN assign begin body end
+ { $$ = forx($3,$5,$7); }
;
-macroArg:
- /*empty*/ { $$ = null; }
- | parenExpr
- | pattern
+
+/**
+ * The 'whenHead' provides the 'begin'
+ */
+whenExpr:
+ WHEN whenHead body catches finallyClause { $$ = when($2,$3,$4,$5); }
+ ;
+
+/**
+ * The 'macroArg' below should be turned into a 'macroArgList' (with
+ * the obvious definition) but this creates
+ * an undiagnosed shift/reduce conflicts. Need to figure out why.
+ */
+macro:
+ BodyStartWord begin macroArg body restMacro
+ { $$ = macro($1, $3, $4, $5); }
+ | VTableStartWord begin macroArg vTable end restMacro
+ { $$ = macro($1, $3, $4, $6); }
;
restMacro:
/*empty*/ { $$ = null; }
- BodyNextWord macroArg body restMacro
- { $$ = macro($1, $2, $3, $4); }
- | VTableNextWord macroArg vTable restMacro
- { $$ = macro($1, $2, $3, $4); }
+ BodyNextWord begin macroArg body restMacro
+ { $$ = macro($1, $3, $4, $5); }
+ | VTableNextWord begin macroArg vTable end restMacro
+ { $$ = macro($1, $3, $4, $6); }
;
+/**
+ * XXX The 'parenExpr' below should be 'parenArgs', but this creates
+ * an undiagnosed shift/reduce conflict. Need to figure out why.
+ */
+macroArg:
+ /*empty*/ { $$ = null; }
+ | parenExpr
+ | pattern
+ ;
+
quasiParser:
/* empty */ { $$ = noun("simple__quasiParser"); }
@@ -622,7 +646,7 @@
listPatt
| listPatt '?' order { $$ = suchThat($1, $3); }
- | META parenExpr MapsTo pattern { reserved("meta pattern"); }
+ | metaoid parenExpr MapsTo pattern { reserved("meta pattern"); }
;
listPatt:
@@ -776,12 +800,12 @@
* methHead's patterns to the message's args.
*/
method:
- TO methHead body { $$ = method($2, $3); }
+ begin TO methHead body { $$ = method($3, $4); }
- | TO verb OpAss assign { reserved("fields"); }
- | ON methHead body { reserved("on event"); }
- | META parenExpr MapsTo parenExpr { reserved("sealed meta"); }
- | META parenExpr body { reserved("sealed meta"); }
+ | begin TO verb OpAss assign end { reserved("fields"); }
+ | begin ON methHead body { reserved("on event"); }
+ | begin META parenExpr MapsTo parenExpr end { reserved("sealed meta"); }
+ | begin META parenExpr body { reserved("sealed meta"); }
;
@@ -814,7 +838,7 @@
*
*/
classHead:
- audits '(' patternList ')' resultGuard { $$ = list($1, $3, $5); }
+ audits begin '(' patternList ')' resultGuard { $$ = list($1, $4, $6); }
;
/**
@@ -824,7 +848,7 @@
* will be a Tuple of the argument values.
*/
matcher:
- MATCH pattern body { $$ = matcher($2, $3); }
+ begin MATCH pattern body { $$ = matcher($3, $4); }
;
/**
@@ -833,7 +857,7 @@
* delegate { expr } -> match [v,a] { E call(expr, v,a) }
*/
delegator:
- DELEGATE body { $$ = delegatex($2); }
+ begin DELEGATE body { $$ = delegatex($3); }
;
/**
@@ -848,12 +872,17 @@
'(' args ')' { $$ = $2; }
;
+/**
+ * XXX Note that the 'begin' in the when-clauses form cannot be
+ * positioned properly
+ */
whenHead:
- whenArgs OpWhen audits '(' patterns ')' resultGuard
- { $$ = list($1, $3, $5, $7); }
+ whenArgs OpWhen audits begin '(' patterns ')' resultGuard
+ { $$ = list($1, $3, $6, $8); }
- | audits '(' whenClauses ')' resultGuard { pocket("when-clauses");
- $$ = list($1, $3, $5); }
+ | audits begin '(' whenClauses ')' resultGuard
+ { pocket("when-clauses");
+ $$ = list($1, $4, $6); }
;
whenClauses:
@@ -891,8 +920,8 @@
parenArgs:
'(' argList ')' { $$ = $2; }
/*
- | parenArgs body { pocket("block-args");
- $$ = with($1, thunk($2)); }
+ | parenArgs begin body { pocket("block-args");
+ $$ = with($1, thunk($3)); }
*/
| parenArgs object { pocket("lambda-args");
$$ = with($1, $2); }
@@ -966,8 +995,8 @@
* scope (which is always a child of the current lexical scope)
*/
body:
- '{' br '}' { $$ = NULL; }
- | '{' br seqs br '}' { $$ = $3; }
+ '{' br '}' end { $$ = NULL; }
+ | '{' br seqs br '}' end { $$ = $3; }
;
caseList:
@@ -1021,7 +1050,7 @@
;
catchClause:
- CATCH pattern body { $$ = matcher($2, $3); }
+ begin CATCH pattern body { $$ = matcher($3, $4); }
;
/**
@@ -1029,7 +1058,7 @@
*/
finallyClause:
/*empty*/ { $$ = null; }
- | FINALLY body { $$ = $2; }
+ | begin FINALLY body { $$ = $3; }
;
@@ -1091,8 +1120,28 @@
| ':' noun { $$ = $2; }
;
+/**
+ *
+ */
+metaoid:
+ META
+ | PRAGMA
+ ;
+
+/**
+ * Begins a nested scope
+ */
+begin:
+ /*empty*/ { begin(); }
+ ;
+/**
+ * Ends a nested scope
+ */
+end:
+ /*empty*/ { end(); }
+ ;
/**
* Reserved Keywords
@@ -1109,7 +1158,7 @@
| KNOW | KNOWS | LAMBDA | LET | METHOD | METHODS | MODULE
| NAMESPACE | NATIVE
| OBEYS | OCTET | ONEWAY
- | PACKAGE | PRAGMA | PRIVATE | PROTECTED | PUBLIC
+ | PACKAGE | PRIVATE | PROTECTED | PUBLIC
| RAISES | RELIANCE | RELIANT | RELIES | RELY | REVEAL
| SAKE | SIGNED | STATIC | STRUCT
| SUCHTHAT | SUPPORTS | SUSPECT | SUSPECTS | SYNCHRONIZED
@@ -1385,6 +1434,7 @@
TheTokens[IN] = "in";
TheTokens[MATCH] = "match";
TheTokens[META] = "meta";
+ TheTokens[PRAGMA] = "pragma";
TheTokens[SWITCH] = "switch";
TheTokens[THUNK] = "thunk";
TheTokens[TO] = "to";
@@ -1452,7 +1502,6 @@
TheTokens[OCTET] = "octet";
TheTokens[ONEWAY] = "oneway";
TheTokens[PACKAGE] = "package";
- TheTokens[PRAGMA] = "pragma";
TheTokens[PRIVATE] = "private";
TheTokens[PROTECTED] = "protected";
TheTokens[PUBLIC] = "public";
1.21 +3 -3 e/src/jsrc/org/erights/e/elib/prim/StaticMaker.java
Index: StaticMaker.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/prim/StaticMaker.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- StaticMaker.java 2001/10/02 23:38:31 1.20
+++ StaticMaker.java 2001/10/27 17:27:43 1.21
@@ -64,12 +64,12 @@
"java.lang.Number",
"java.lang.Object",
"java.lang.Runnable",
- "java.lang.RuntimeException", //must enforce transPassByCopy
+ "java.lang.RuntimeException", //must enforce DeepPassByCopy
"java.lang.Short",
//"java.lang.StrictMath", only after we remove random()
"java.lang.String",
"java.lang.StringBuffer",
- "java.lang.Throwable", //XXX must enforce transPassByCopy
+ "java.lang.Throwable", //XXX must enforce DeepPassByCopy
"java.lang.Void",
"java.math.BigInteger",
@@ -102,7 +102,7 @@
"org.erights.e.elib.tables.FlexList",
"org.erights.e.elib.tables.FlexMap",
- //must enforce transPassByCopy
+ //must enforce DeepPassByCopy
"org.erights.e.elib.util.TwineException",
"net.captp.api.SturdyRef",
1.23 +1 -1 e/src/jsrc/org/erights/e/meta/java/io/FileSugar.java
Index: FileSugar.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/meta/java/io/FileSugar.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- FileSugar.java 2001/09/07 05:49:24 1.22
+++ FileSugar.java 2001/10/27 17:27:43 1.23
@@ -61,7 +61,7 @@
/**
*
*/
- static public ReadOnlyFile transReadOnly(File self) {
+ static public ReadOnlyFile deepReadOnly(File self) {
return new ReadOnlyFile(self, true);
}
1.13 +3 -3 e/src/jsrc/org/erights/e/meta/java/io/ReadOnlyFile.java
Index: ReadOnlyFile.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/meta/java/io/ReadOnlyFile.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- ReadOnlyFile.java 2001/09/07 05:49:24 1.12
+++ ReadOnlyFile.java 2001/10/27 17:27:43 1.13
@@ -44,7 +44,7 @@
/**
*
*/
- public ReadOnlyFile transReadOnly() {
+ public ReadOnlyFile deepReadOnly() {
if (myIsTransitive) {
return this;
} else {
@@ -272,9 +272,9 @@
public void printOn(TextWriter out) throws IOException {
out.print(myPrecious);
if (myIsTransitive) {
- out.print(" transReadOnly");
+ out.print(" deepReadOnly()");
} else {
- out.print(" readOnly");
+ out.print(" readOnly()");
}
}
}
1.2 +5 -5 e/src/jsrc/org/quasiliteral/astro/Functor.java
Index: Functor.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/quasiliteral/astro/Functor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Functor.java 2001/10/26 07:56:09 1.1
+++ Functor.java 2001/10/27 17:27:43 1.2
@@ -70,11 +70,11 @@
{
String tokenType = (String)typeNames.get(token.getType());
SourceSpan span = new SourceSpan(url,
- false,
- token.getLine(),
- token.getColumn(),
- token.getLine(),
- token.getColumn());
+ false,
+ token.getLine(),
+ token.getColumn(),
+ token.getLine(),
+ token.getColumn());
return new Functor(tokenType,
Twine.fromString(token.getText(), span),
null);