content
stringlengths
10
4.9M
<gh_stars>10-100 // A visitor implementing the view on user namespaces and their owned // namespaces, using the lxkns information model. // Copyright 2020 <NAME>. // // Licensed under the Apache License, Version 2.0 (the "License"); you may not // use this file except in compliance with the License. You may obtain a copy // of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations // under the License. package main import ( "fmt" "os/user" "reflect" "github.com/thediveo/lxkns/cmd/internal/pkg/output" "github.com/thediveo/lxkns/cmd/internal/pkg/style" "github.com/thediveo/lxkns/discover" "github.com/thediveo/lxkns/model" ) // PIDNSVisitor is an asciitree.Visitor which starts from a list (slice) of root // PID namespaces and then recursively dives into the PID namespace hierarchy, // optionally showing the intermediate user namespaces owing PID namespaces. type PIDNSVisitor struct { ShowUserNS bool } // Roots returns the given topmost hierarchical PID namespaces sorted. Well, to // be honest, it returns the owning user namespaces instead in case user // namespaces should be shown too. func (v *PIDNSVisitor) Roots(roots reflect.Value) (children []reflect.Value) { pidroots := discover.SortNamespaces(roots.Interface().([]model.Namespace)) if !v.ShowUserNS { // When only showing PID namespaces, then sort all PID "root" namespaces // numerically and then visit them, descending down the hierarchy. count := len(pidroots) children = make([]reflect.Value, count) for idx := 0; idx < count; idx++ { children[idx] = reflect.ValueOf(pidroots[idx]) } return } // When showing the owning user namespaces in the tree, find the (unique) // user namespaces for all PID "root" namespaces, so we start with the user // namespaces. userns := map[model.Namespace]bool{} for _, pidns := range pidroots { userns[pidns.Owner().(model.Namespace)] = true } userroots := []model.Namespace{} for uns := range userns { userroots = append(userroots, uns) } userroots = discover.SortNamespaces(userroots) count := len(userroots) children = make([]reflect.Value, count) for idx := 0; idx < count; idx++ { children[idx] = reflect.ValueOf(userroots[idx]) } return } // Label returns the text label for a namespace node. Everything else will have // no label. func (v *PIDNSVisitor) Label(node reflect.Value) (label string) { if ns, ok := node.Interface().(model.Namespace); ok { style := style.Styles[ns.Type().Name()] label = fmt.Sprintf("%s%s %s", output.NamespaceIcon(ns), style.V(ns.(model.NamespaceStringer).TypeIDString()), output.NamespaceReferenceLabel(ns)) } if uns, ok := node.Interface().(model.Ownership); ok { username := "" if user, err := user.LookupId(fmt.Sprintf("%d", uns.UID())); err == nil { username = fmt.Sprintf(" (%q)", style.OwnerStyle.V(user.Username)) } label += fmt.Sprintf(" created by UID %d%s", style.OwnerStyle.V(uns.UID()), username) } return } // Get returns the user namespace text label for the current node (which is // always an user namespace), as well as the list of properties (owned // non-user namespaces) and the list of child user namespace nodes. func (v *PIDNSVisitor) Get(node reflect.Value) ( label string, properties []string, children reflect.Value) { // Label for this PID (or user) namespace; this is the easy part ;) label = v.Label(node) // For a user namespace, its children are the owned PID namespaces ... but // ... we must only take the topmost owned PID namespaces, otherwise the // result isn't exactly correct and we would all subtrees mirrored to the // topmost level. Now, a "topmost" owned PID namespace is one that either // has no parent PID namespace, or the parent PID namespace has a different // owner. That's all that's to it. if uns, ok := node.Interface().(model.Ownership); ok { clist := []model.Namespace{} for _, ns := range uns.Ownings()[model.PIDNS] { pidns := ns.(model.Hierarchy) ppidns := pidns.Parent() if ppidns == nil || ppidns.(model.Namespace).Owner() != uns { clist = append(clist, ns) } } children = reflect.ValueOf(discover.SortNamespaces(clist)) return } // For a PID namespace, the children are either PID namespaces, or user // namespaces in case a child PID namespace lives in a different user // namespace. clist := []interface{}{} if hns, ok := node.Interface().(model.Hierarchy); ok { if !v.ShowUserNS { // Show only the PID namespace hierarchy: this is easy, as we all we // need to do is to take all child PID namespaces and return them. // That's it. for _, cpidns := range discover.SortChildNamespaces(hns.Children()) { clist = append(clist, cpidns) } } else { // Insert user namespaces into the PID namespace hierarchy, whenever // there is a change of user namespaces in the PID hierarchy. userns := node.Interface().(model.Namespace).Owner() for _, cpidns := range discover.SortChildNamespaces(hns.Children()) { if ownerns := cpidns.(model.Namespace).Owner(); ownerns == userns { // The child PID namespace is still in the same user namespace, // so we take it as a direct child. clist = append(clist, cpidns) } else { // The child PID namespace is in a different user namespace, so // we take the child's user namespace instead and will visit the // child PID namespace only later via the user namespace. clist = append(clist, ownerns) } } } } children = reflect.ValueOf(clist) return }
async def delete( self, option: _helpers.WriteOption = None, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, ) -> Timestamp: request, kwargs = self._prep_delete(option, retry, timeout) commit_response = await self._client._firestore_api.commit( request=request, metadata=self._client._rpc_metadata, **kwargs, ) return commit_response.commit_time
/** Duplicates a NUL-terminated string, allocated from a memory heap. @param[in] heap, memory heap where string is allocated @param[in] str) string to be copied @return own: a copy of the string */ char* mem_heap_strdup( mem_heap_t* heap, const char* str) { return(static_cast<char*>(mem_heap_dup(heap, str, strlen(str) + 1))); }
__author__ = 'MoustaphaSaad' shoes = map(int, raw_input().split()) d = dict() count = 0 for i in xrange(0,len(shoes)): if d.__contains__(shoes[i]): d[shoes[i]] += 1 else: d[shoes[i]] = 1 print 4 - len(d)
// Checks that the header data in the small buffer is valid. We may read cache // entries that were written by a previous version of Chrome which use obsolete // formats. These reads should fail and be doomed as soon as possible. bool IsValidHeader(scoped_refptr<net::IOBufferWithSize> small_buffer) { size_t buffer_size = small_buffer->size(); if (buffer_size < kHeaderSizeInBytes) return false; uint32_t data_size; memcpy(&data_size, small_buffer->data() + kResponseTimeSizeInBytes, kDataSizeInBytes); if (data_size <= kSmallDataLimit) return buffer_size == kHeaderSizeInBytes + data_size; if (data_size <= GetLargeDataLimit()) return buffer_size == kHeaderSizeInBytes; return buffer_size == kHeaderSizeInBytes + kSHAKeySizeInBytes; }
/** * @author Thomas Segismont */ public class CloseableIteratorCollectionStream<I, O> implements ReadStream<O> { private static final int BATCH_SIZE = 10; private final Context context; private final Supplier<CloseableIteratorCollection<I>> iterableSupplier; private final Function<I, O> converter; private CloseableIteratorCollection<I> iterable; private CloseableIterator<I> iterator; private Deque<I> queue; private Handler<O> dataHandler; private Handler<Throwable> exceptionHandler; private Handler<Void> endHandler; private long demand = Long.MAX_VALUE; private boolean readInProgress; private boolean closed; public CloseableIteratorCollectionStream(Context context, Supplier<CloseableIteratorCollection<I>> iterableSupplier, Function<I, O> converter) { this.context = context; this.iterableSupplier = iterableSupplier; this.converter = converter; } @Override public synchronized CloseableIteratorCollectionStream<I, O> exceptionHandler(Handler<Throwable> handler) { checkClosed(); this.exceptionHandler = handler; return this; } private void checkClosed() { if (closed) { throw new IllegalArgumentException("Stream is closed"); } } @Override public synchronized CloseableIteratorCollectionStream<I, O> handler(Handler<O> handler) { checkClosed(); if (handler == null) { close(); } else { dataHandler = handler; context.<CloseableIteratorCollection<I>>executeBlocking(fut -> fut.complete(iterableSupplier.get()), false, ar -> { synchronized (this) { if (ar.succeeded()) { iterable = ar.result(); if (canRead()) { doRead(); } } else { close(); handleException(ar.cause()); } } }); } return this; } private boolean canRead() { return demand > 0L && !closed; } @Override public synchronized CloseableIteratorCollectionStream<I, O> pause() { checkClosed(); demand = 0L; return this; } @Override public CloseableIteratorCollectionStream<I, O> fetch(long amount) { checkClosed(); if (amount > 0L) { demand += amount; if (demand < 0L) { demand = Long.MAX_VALUE; } if (dataHandler != null && iterable != null) { doRead(); } } return this; } @Override public synchronized CloseableIteratorCollectionStream<I, O> resume() { return fetch(Long.MAX_VALUE); } private synchronized void doRead() { if (readInProgress) { return; } readInProgress = true; if (iterator == null) { context.<CloseableIterator<I>>executeBlocking(fut -> fut.complete(iterable.iterator()), false, ar -> { synchronized (this) { readInProgress = false; if (ar.succeeded()) { iterator = ar.result(); if (canRead()) { doRead(); } } else { close(); handleException(ar.cause()); } } }); return; } if (queue == null) { queue = new ArrayDeque<>(BATCH_SIZE); } if (!queue.isEmpty()) { context.runOnContext(v -> emitQueued()); return; } context.<List<I>>executeBlocking(fut -> { List<I> batch = new ArrayList<>(BATCH_SIZE); for (int i = 0; i < BATCH_SIZE && iterator.hasNext(); i++) { batch.add(iterator.next()); } fut.complete(batch); }, false, ar -> { synchronized (this) { if (ar.succeeded()) { queue.addAll(ar.result()); if (queue.isEmpty()) { close(); if (endHandler != null) { endHandler.handle(null); } } else { emitQueued(); } } else { close(); handleException(ar.cause()); } } }); } private void handleException(Throwable cause) { if (exceptionHandler != null) { exceptionHandler.handle(cause); } } private synchronized void emitQueued() { while (!queue.isEmpty() && canRead()) { if (demand != Long.MAX_VALUE) { demand--; } dataHandler.handle(converter.apply(queue.remove())); } readInProgress = false; if (canRead()) { doRead(); } } @Override public synchronized CloseableIteratorCollectionStream<I, O> endHandler(Handler<Void> handler) { endHandler = handler; return this; } private void close() { closed = true; AtomicReference<CloseableIterator<I>> iteratorRef = new AtomicReference<>(); context.executeBlocking(fut -> { synchronized (this) { iteratorRef.set(iterator); } CloseableIterator<I> iter = iteratorRef.get(); if (iter != null) { iter.close(); } fut.complete(); }, false, null); } }
<filename>quesadiya/cli.py<gh_stars>1-10 import click import os import quesadiya import quesadiya.commands.create import quesadiya.commands.run import quesadiya.commands.inspect import quesadiya.commands.delete import quesadiya.commands.export import quesadiya.commands.modify @click.group() @click.version_option() def cli(): """A delicious mexican dish.""" pass @cli.command() def path(): """Print path to this package.""" click.echo("quesadiya resides @ {}".format( quesadiya.get_base_path() )) @cli.command() @click.argument( "project_name", metavar="PROJECT" ) @click.argument( "admin_name", metavar="ADMIN", ) @click.argument( "input_data_path", metavar="DATAPATH" ) @click.option( "-d", "--project-description", type=click.STRING, default="No description", help="Description of a project to create." ) @click.option( "-c", "--contact", type=click.STRING, default="No contact", help="Contact to admin user." ) @click.option( "-a", "--add-collaborators", type=click.STRING, help="Add collaboratos from a jsonl file. Each row in the file must " "follow the following format: " "{'name': str, 'password': str, 'contact': str}. " "Note that `contact` field can be empty." ) def create( project_name, admin_name, input_data_path, project_description, contact, add_collaborators ): """Create a data annotation project.""" quesadiya.commands.create.operator( project_name=project_name, project_description=project_description, input_data_path=input_data_path, admin_name=admin_name, admin_contact=contact, collaborator_input_path=add_collaborators ) @cli.command() @click.option( "-p", "--port", default=1133, help="Select the port number to run quesadiya server. The default port for " "quesadiya is 1133." ) def run(port): """Run annotation project.""" quesadiya.commands.run.operator(port) @cli.command() @click.argument( "project_name", metavar="PROJECT" ) @click.option( "-s", "--show-collaborators", is_flag=True, default=False, help="Show all collaborators associated with a project. " "This operation requires admin authentication." ) def inspect(project_name, show_collaborators): """Show project information indicated by project name.""" quesadiya.commands.inspect.operator( project_name=project_name, show_collaborators=show_collaborators ) @cli.command() @click.argument( "project_name", metavar="PROJECT" ) @click.option( "-e", "--edit", type=click.Choice(["contact", "description"], case_sensitive=True), help="Edit `admin contact` or `project description` of a project." ) @click.option( "-t", "--transfer-ownership", is_flag=True, default=False, help="Change `admin name` and `admin password` of a project." ) @click.option( "-a", "--add-collaborators", type=click.STRING, help="Add collaboratos from a jsonl file. Each row in the file must " "follow the following format: " "{'name': str, 'password': str, 'contact': str}. " "Note that `contact` field can be empty." ) def modify( project_name, edit, transfer_ownership, add_collaborators ): """Modify a project indicated by project name. Note that it exectues one operation per run. """ quesadiya.commands.modify.operator( project_name=project_name, edit=edit, transfer_ownership=transfer_ownership, collaborator_input_path=add_collaborators ) @cli.command() @click.argument( "project_name", metavar="PROJECT" ) def delete(project_name): """Delete project indicated by project name. Note that this operation will delete all data associated with a project.""" quesadiya.commands.delete.operator(project_name=project_name) @cli.command() @click.argument( "project_name", metavar="PROJECT" ) @click.argument("output_path") @click.option( "-i", "--include-text", is_flag=True, default=False, help="Include text field assocaited with sample ids into output file." ) def export(project_name, output_path, include_text): """Export data associated with a project indicated by project name.""" quesadiya.commands.export.operator( project_name=project_name, output_path=output_path, include_text=include_text )
/** Returns the associated {@link SRange} of the specified {@link SSheet} and area reference string (e.g. "A1:D4" or "NSheet2!A1:D4") * note that if reference string contains sheet name, the returned range will refer to the named sheet. * * @param sheet the {@link SSheet} the Range will refer to. * @param reference the area the Range will refer to (e.g. "A1:D4"). * @return the associated {@link SRange} of the specified {@link SSheet} and area reference string (e.g. "A1:D4"). */ public static SRange range(SSheet sheet, String areaReference){ SheetRegion region = new SheetRegion(sheet, areaReference); return new RangeImpl(sheet,region.getRow(),region.getColumn(),region.getLastRow(),region.getLastColumn()); }
/** * Test that update allow the garbage collection of the objects. */ public TestCase buildUpdateTest() { MemoryLeakTestCase test = new MemoryLeakTestCase() { public void test() { EntityManager manager = createEntityManager(); ((JpaEntityManager)manager).getUnitOfWork().getParent().getIdentityMapAccessor().initializeAllIdentityMaps(); manager.getTransaction().begin(); Query query = manager.createQuery("Select e from Employee e"); List<Employee> employees = query.getResultList(); for (Employee employee : employees) { employee.setFirstName("UpdatedGuy"); addWeakReference(employee); } manager.getTransaction().commit(); query = manager.createQuery("Select e from Employee e"); query.setHint("eclipselink.return-shared", true); addWeakReferences(query.getResultList()); addWeakReference(manager); addWeakReference(((JpaEntityManager)manager).getUnitOfWork()); addWeakReference(((JpaEntityManager)manager).getUnitOfWork().getParent()); manager.close(); } }; test.setName("UpdateMemoryLeakTest"); test.setThreshold(100); return test; }
#include<bits/stdc++.h> using namespace std; int main(){ char letter; int position; int ans; int distance1, distance2; position=0; ans=0; scanf("%c", &letter); while(letter>=97){ if(abs(position-(letter-97))<26-abs(position-(letter-97))){ ans=ans+abs(position-(letter-97)); } else{ ans=ans+26-abs(position-(letter-97)); } position=letter-97; scanf("%c", &letter); } printf("%i", ans); return 0; }
def plotUniform(name): xrange = uniform(name) lb = xrange[0,0] ub = xrange[0,1] xrange = np.linspace(0.5 * lb, 1.3 * ub, 100) y = np.zeros_like(xrange) for i, j in enumerate(xrange): if (lb <= j <= ub): y[i] = 1.0 else: y[i] = 0.0 plt.xlabel('Head Thickness [Å]') plt.ylabel('pdf') plt.title(name) plt.plot(xrange, y) plt.show()
def read_yaml2cls(yml_file): with open(yml_file, "r") as stream: data = yaml.safe_load(stream) cls_data = munchify(data) return cls_data
Amino Acid Composition and Immunolabelling of a 42.5 KDA Protein from Phloem Exudate of Luffa Cylindrica Fruits Phloem proteins are specifically presented in phloem tissues of monocotyledons and dicotyledons. Ultrastructural studies showed that they were filamentous, spherical, tubular, crystalline and amorphous in shaped They were present in the sieve elements and sometimes are also found in companion cells and phloem parenchyma cells. The diversities in shape and biogenesis of plant p-protein in relation to plant species and developmental stage of phloem tissues were reported. In the present study, a 42.5 kDA protein obtained from phloem exudate of Luffa cylindrica fruits were examined with amino acid composition, immnoblotting, and immunolocalization. Phloem exudates leaking from Luffa cylindrica fruits by a simple razor blade cutting were mixed with the extraction medium containing antioxidant and rapidly separated by 2-dimensional gel of native and sodium dodecylsulfate (SDS) polyacrylamide gel electrophoresis (PAGE).
/** * Utility class for building a sample CommandHistory populated with dummy InputOutput data * for testing purposes. */ public class TypicalCommandHistory { // Defined explicitly instead of imported to reduce dependencies public static final String SUCCESS_COMMAND_1 = "list"; public static final String SUCCESS_COMMAND_OUTPUT_1 = "Listed all appeals\nListed all modules\nListed all students"; public static final String SUCCESS_COMMAND_2 = "list -a"; public static final String SUCCESS_COMMAND_OUTPUT_2 = "Listed all appeals\n"; public static final String UNSUCCESSFUL_COMMAND_1 = "afoaref"; public static final String UNSUCCESSFUL_COMMAND_2 = "cs2103"; public static final String UNSUCCESSFUL_COMMAND_OUTPUT = "Unknown command"; public static final InputOutput SUCCESSFUL_IO_1 = new InputOutput(SUCCESS_COMMAND_1, SUCCESS_COMMAND_OUTPUT_1, true, TIME_STAMP_1); public static final InputOutput SUCCESSFUL_IO_2 = new InputOutput(SUCCESS_COMMAND_2, SUCCESS_COMMAND_OUTPUT_2, true, TIME_STAMP_2); public static final InputOutput UNSUCCESSFUL_IO_1 = new InputOutput(UNSUCCESSFUL_COMMAND_1, UNSUCCESSFUL_COMMAND_OUTPUT, false, TIME_STAMP_3); public static final InputOutput UNSUCCESSFUL_IO_2 = new InputOutput(UNSUCCESSFUL_COMMAND_2, UNSUCCESSFUL_COMMAND_OUTPUT, false, TIME_STAMP_4); // not used as part of #getTypicalCommandHistory() public static final String SUCCESSFUL_COMMAND_3 = "list -a -s"; public static final String SUCCESSFUL_COMMAND_OUTPUT_3 = "Listed all appeals\nListed all students\n"; public static final String SUCCESSFUL_COMMAND_4 = "list -s"; public static final String SUCCESSFUL_COMMAND_OUTPUT_4 = "Listed all students\n"; public static final InputOutput SUCCESSFUL_IO_3 = new InputOutput(SUCCESSFUL_COMMAND_3, SUCCESSFUL_COMMAND_OUTPUT_3, true, TIME_STAMP_5); public static final InputOutput SUCCESSFUL_IO_4 = new InputOutput(SUCCESSFUL_COMMAND_4, SUCCESSFUL_COMMAND_OUTPUT_4, true, TIME_STAMP_6); private TypicalCommandHistory() {} // prevents instantiation public static CommandHistory getTypicalCommandHistory() { return new CommandHistory(Arrays.asList(SUCCESSFUL_IO_1, SUCCESSFUL_IO_2, UNSUCCESSFUL_IO_1, UNSUCCESSFUL_IO_2)); } }
import asyncio import json from functools import partial import aiohttp import requests import websockets from .handler import RaceHandler class Bot: """ The racetime.gg bot class. This bot uses event loops to connect to multiple race rooms at once. Each room is assigned a handler object, which you can determine with the `get_handler_class`/`get_handler_kwargs` methods. When implementing your own bot, you will need to specify what handler you wish to use, as the default `RaceHandler` will not actually do anything other than connect to the room and log the messages. """ racetime_host = 'racetime.gg' racetime_secure = True scan_races_every = 30 reauthorize_every = 36000 continue_on = [ # Exception types that will not cause the bot to shut down. websockets.ConnectionClosed, ] def __init__(self, category_slug, client_id, client_secret, logger, ssl_context=None): """ Bot constructor. """ self.logger = logger self.category_slug = category_slug self.ssl_context = ssl_context self.loop = asyncio.get_event_loop() self.last_scan = None self.handlers = {} self.races = {} self.state = {} self.client_id = client_id self.client_secret = client_secret self.access_token, self.reauthorize_every = self.authorize() def get_handler_class(self): """ Returns the handler class for races. Each race the bot finds will have its own handler object of this class. """ return RaceHandler def get_handler_kwargs(self, ws_conn, state): """ Returns a dict of keyword arguments to be passed into the handler class when instantiated. Override this method if you need to pass additional kwargs to your race handler. """ return { 'conn': ws_conn, 'logger': self.logger, 'state': state, 'command_prefix': '!', } def should_handle(self, race_data): """ Determine if a race we've found should be handled by this bot or not. Returns True if the race should have a handler created for it, False otherwise. """ status = race_data.get('status', {}).get('value') return status not in self.get_handler_class().stop_at def authorize(self): """ Get an OAuth2 token from the authentication server. """ resp = requests.post(self.http_uri('/o/token'), { 'client_id': self.client_id, 'client_secret': self.client_secret, 'grant_type': 'client_credentials', }) resp.raise_for_status() data = json.loads(resp.content) if not data.get('access_token'): raise Exception('Unable to retrieve access token.') return data.get('access_token'), data.get('expires_in', 36000) def create_handler(self, race_data): """ Create a new WebSocket connection and set up a handler object to manage it. """ ws_conn = websockets.connect( self.ws_uri(race_data.get('websocket_bot_url')), extra_headers={ 'Authorization': 'Bearer ' + self.access_token, }, ssl=self.ssl_context, ) race_name = race_data.get('name') if race_name not in self.state: self.state[race_name] = {} cls = self.get_handler_class() kwargs = self.get_handler_kwargs(ws_conn, self.state[race_name]) handler = cls(**kwargs) self.logger.info( 'Created handler for %(race)s' % {'race': race_data.get('name')} ) return handler async def reauthorize(self): """ Reauthorize with the token endpoint, to generate a new access token before the current one expires. This method runs in a constant loop, creating a new access token when needed. """ while True: self.logger.info('Get new access token') self.access_token, self.reauthorize_every = self.authorize() delay = self.reauthorize_every if delay > 600: # Get a token a bit earlier so that we don't get caught out by # expiry. delay -= 600 await asyncio.sleep(delay) async def refresh_races(self): """ Retrieve current race information from the category detail API endpoint, retrieving the current race list. Creates a handler and task for any race that should be handled but currently isn't. This method runs in a constant loop, checking for new races every few seconds. """ def done(task_name, *args): del self.handlers[task_name] while True: self.logger.info('Refresh races') try: async with aiohttp.request( method='get', url=self.http_uri(f'/{self.category_slug}/data') ) as resp: data = json.loads(await resp.read()) except Exception: self.logger.error( "Fatal error when attempting to retrieve race data.", exc_info=True) await asyncio.sleep(self.scan_races_every) continue self.races = {} for race in data.get('current_races', []): self.races[race.get('name')] = race for name, summary_data in self.races.items(): if name not in self.handlers: try: async with aiohttp.request( method='get', url=self.http_uri(summary_data.get('data_url')) ) as resp: race_data = json.loads(await resp.read()) except Exception: self.logger.error( "Fatal error when attempting to retrieve race summary data.", exc_info=True) await asyncio.sleep(self.scan_races_every) continue if self.should_handle(race_data): handler = self.create_handler(race_data) self.handlers[name] = self.loop.create_task( handler.handle()) self.handlers[name].add_done_callback( partial(done, name)) else: if name in self.state: del self.state[name] self.logger.info( 'Ignoring %(race)s by configuration.' % {'race': race_data.get('name')} ) await asyncio.sleep(self.scan_races_every) def handle_exception(self, loop, context): """ Handle exceptions that occur during the event loop. """ self.logger.error(context) exception = context.get('exception') if exception: self.logger.exception(context) if not exception or exception.__class__ not in self.continue_on: loop.stop() def run(self): """ Run the bot. Creates an event loop then iterates over it forever. """ self.loop.create_task(self.reauthorize()) self.loop.create_task(self.refresh_races()) self.loop.set_exception_handler(self.handle_exception) self.loop.run_forever() def http_uri(self, url): """ Generate a HTTP/HTTPS URI from the given URL path fragment. """ return self.uri( proto='https' if self.racetime_secure else 'http', url=url, ) def ws_uri(self, url): """ Generate a WS/WSS URI from the given URL path fragment. """ return self.uri( proto='wss' if self.racetime_secure else 'ws', url=url, ) def uri(self, proto, url): """ Generate a URI from the given protocol and URL path fragment. """ return '%(proto)s://%(host)s%(url)s' % { 'proto': proto, 'host': self.racetime_host, 'url': url, }
/// Entry point of `cargo cov report` subcommand. Renders the coverage report using a template. pub fn generate(config: &ReportConfig) -> Result<Option<PathBuf>> { let report_path = &config.output_path; clean_dir(report_path).chain_err(|| "Cannot clean report directory")?; create_dir_all(report_path)?; let mut interner = Interner::new(); let graph = create_graph(config, &mut interner).chain_err(|| "Cannot create graph")?; let report = graph.report(); render(config, &report, &interner).chain_err(|| "Cannot render report") }
// The base class calls this when a client sets the mute state tCQCKit::ECommResults TZoomPlayerSDriver::eSetMute(const tCIDLib::TBoolean bToSet) { return tCQCKit::ECommResults::Success; }
<gh_stars>1-10 import * as assert from 'assert'; import * as sinon from 'sinon'; import Enumerable from './Enumerable'; describe('finally()', () => { it('should creates a sequence whose termination or disposal of an enumerator causes a finally action to be executed', () => { const source1 = [1, 2, 3]; const finallyAction1 = sinon.spy(); assert.deepEqual(new Enumerable(source1).finally(finallyAction1).toArray(), [1, 2, 3]); sinon.assert.called(finallyAction1); const source2 = { [Symbol.iterator]: function*() { yield 1; yield 2; yield 3; throw new Error(); } }; const finallyAction2 = sinon.spy(); assert.throws(() => new Enumerable(source2).finally(finallyAction2).toArray()); sinon.assert.called(finallyAction2); }); });
// apply applies the delta b to the current version to produce a new // version. The new version is consistent with respect to the comparer cmp. // // curr may be nil, which is equivalent to a pointer to a zero version. // // On success, a map of zombie files containing the file numbers and sizes of // deleted files is returned. These files are considered zombies because they // are no longer referenced by the returned Version, but cannot be deleted from // disk as they are still in use by the incoming Version. func (b *bulkVersionEdit) apply(curr *version, ) (_ *version, zombies map[fileNum]uint64, _ error) { addZombie := func(fn fileNum) { if zombies == nil { zombies = make(map[fileNum]uint64) } zombies[fn] = 0 } removeZombie := func(fileNum fileNum) { if zombies != nil { delete(zombies, fileNum) } } v := new(version) if curr == nil || curr.files == nil { v.files = make(map[fileNum]*fileMetadata) } else { v.files = curr.clone() } if len(b.added) == 0 && len(b.deleted) == 0 { return v, zombies, nil } addedFiles := b.added deletedMap := b.deleted if n := len(v.files) + len(addedFiles); n == 0 { return nil, nil, errors.New("No current or added files but have deleted files") } for _, f := range deletedMap { addZombie(f.fileNum) f, ok := v.files[f.fileNum] if ok { if atomic.AddInt32(&f.refs, -1) == 0 { err := errors.Errorf("file %s obsolete during B-Tree removal", f.fileNum) return nil, nil, err } delete(v.files, f.fileNum) } } for _, f := range addedFiles { if _, ok := deletedMap[f.fileNum]; ok { continue } atomic.AddInt32(&f.refs, 1) v.files[f.fileNum] = f removeZombie(f.fileNum) } return v, zombies, nil }
package org.osmdroid.samplefragments.events; import android.content.Context; import android.location.Location; import android.widget.Toast; import org.osmdroid.api.IGeoPoint; import org.osmdroid.api.IMapController; import org.osmdroid.samplefragments.BaseSampleFragment; import org.osmdroid.util.GeoPoint; import org.osmdroid.views.overlay.ItemizedIconOverlay; import org.osmdroid.views.overlay.ItemizedOverlayWithFocus; import org.osmdroid.views.overlay.MinimapOverlay; import org.osmdroid.views.overlay.OverlayItem; import org.osmdroid.views.overlay.gestures.RotationGestureOverlay; import org.osmdroid.views.overlay.mylocation.GpsMyLocationProvider; import org.osmdroid.views.overlay.mylocation.IMyLocationConsumer; import org.osmdroid.views.overlay.mylocation.IMyLocationProvider; import java.util.ArrayList; /** * @author <NAME> */ public class SampleAnimatedZoomToLocation extends BaseSampleFragment { public static final String TITLE = "Animated Zoom to Location"; private ItemizedOverlayWithFocus<OverlayItem> mMyLocationOverlay; private RotationGestureOverlay mRotationGestureOverlay; private GpsMyLocationProvider mGpsMyLocationProvider; @Override public void onPause() { super.onPause(); if(mGpsMyLocationProvider != null) { mGpsMyLocationProvider.stopLocationProvider(); } } @Override public String getSampleTitle() { return TITLE; } @Override protected void addOverlays() { super.addOverlays(); final Context context = getActivity(); Toast.makeText(getActivity(), "Make sure location services are enabled!", Toast.LENGTH_LONG).show(); mGpsMyLocationProvider = new GpsMyLocationProvider(context); mGpsMyLocationProvider.startLocationProvider(new IMyLocationConsumer() { @Override public void onLocationChanged(Location location, IMyLocationProvider source) { mGpsMyLocationProvider.stopLocationProvider(); if(mMyLocationOverlay == null) { final ArrayList<OverlayItem> items = new ArrayList<>(); items.add(new OverlayItem("Me", "My Location", new GeoPoint(location))); mMyLocationOverlay = new ItemizedOverlayWithFocus<>(items, new ItemizedIconOverlay.OnItemGestureListener<OverlayItem>() { @Override public boolean onItemSingleTapUp(final int index, final OverlayItem item) { IMapController mapController = mMapView.getController(); mapController.setCenter(item.getPoint()); mapController.zoomTo(mMapView.getMaxZoomLevel()); return true; } @Override public boolean onItemLongPress(final int index, final OverlayItem item) { return false; } }, context); mMyLocationOverlay.setFocusItemsOnTap(true); mMyLocationOverlay.setFocusedItem(0); mMapView.getOverlays().add(mMyLocationOverlay); mMapView.getController().setZoom(10); IGeoPoint geoPoint = mMyLocationOverlay.getFocusedItem().getPoint(); mMapView.getController().animateTo(geoPoint); } } }); mRotationGestureOverlay = new RotationGestureOverlay(mMapView); mRotationGestureOverlay.setEnabled(false); mMapView.getOverlays().add(mRotationGestureOverlay); MinimapOverlay miniMapOverlay = new MinimapOverlay(context, mMapView.getTileRequestCompleteHandler()); mMapView.getOverlays().add(miniMapOverlay); } }
#include<stdio.h> int main() { long long int n,m,a,b=0,c=0,d=0,e,f=0; scanf("%I64d %I64d %I64d",&n,&m,&a); e=a*a; if(e==1) { f=m*n; printf("%I64d",f); goto end; } else if(m*n<e) { printf("1"); goto end; } if(n%a!=0) { b=(n/a)+1; } else { b=(n/a); } if(m%a!=0) { c=(m/a)+1; } else { c=(m/a); } printf("%I64d",b*c); end: printf("\n"); }
def _trigger_project_creation(self, cr, uid, vals, context=None): if context is None: context = {} return vals.get('use_tasks') and not 'project_creation_in_progress' in context
Using Automatic Vehicle Location System Data to Assess Impacts of Weather on Bus Journey Times for Different Bus Route Types Weather has the largest collective effect on transport systems, affecting users of all modes at the same time over a wide area. The aim of the research is to use Automatic Vehicle Location System (AVLS) data to investigate the impact of adverse weather, using rainfall, temperature and wind speed as indicators, on bus journey time. It will also assess if the impacts are dissimilar across three bus route types: bus lanes on the entire route, bus lanes on part of the route and buses running in mixed traffic. Previous research tends to use bus ridership levels as the key variable of interest when exploring weather impacts whereas the approach taken here will examine bus journey times. Multiple linear regression and in-depth analyses are used to explore which weather variables have the greatest effects. Results indicate that more bus journey time variation can be explained by weather on weekdays than on weekends. Increases in rainfall, wind speed and temperature resulted in longer journey times, but the extent depends on the season and route type. The results will be useful to bus operators and local authorities in preparing mitigation strategies and for longer term planning, particularly in the context of climate change.
a,b,c,d=map(int,input().split()) ''' if a>b: x=a else: x=b if c>d: y=c else: y=d print(x*y) ''' print(max(a*c,a*d,b*c,b*d))
import copy def d5_idx(arr, low, high): return max((len(sorted(copy.deepcopy(arr[low:high]))) // 5) - 1, low) def quicksort(arr): def exchange(arr, a, b): temp = arr[a] arr[a] = arr[b] arr[b] = temp def partition(arr, low, high): i = low j = high - 1 while True: pivot = arr[low] while arr[i] < pivot: i += 1 if i == high: break while pivot < arr[j]: j -= 1 if j == low: break if i >= j: break exchange(arr, i, j) exchange(arr, low, j) return j def quick_sort_inner(arr, low, high): if high <= low: return # Find d5(S) (the index of the 1st-quintile value in S slice) # Swap the value at that index with the start of the slice. d5i = d5_idx(arr, low, high) exchange(arr, low, d5i) mid = partition(arr, low, high) quick_sort_inner(arr, low, mid - 1) quick_sort_inner(arr, mid + 1, high) quick_sort_inner(arr, 0, len(arr)) arr = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0] expected = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] quicksort(arr) print(arr) print(expected)
// // UtilVoice.h // 语音工具类 // // Created by <NAME> on 13-10-24. // Copyright (c) 2013年 iTensen. All rights reserved. // #import <Foundation/Foundation.h> #import <AVFoundation/AVFoundation.h> #import "VoiceConverter.h" typedef enum{ UtilVoiceStatus_Begin=1, UtilVoiceStatus_Success=2, UtilVoiceStatus_Timeout=3, UtilVoiceStatus_TooShort=4, UtilVoiceStatus_Delete = 5, UtilVoiceStatus_Error = 6, }UtilVoiceStatus; @protocol UtilVoiceDelegate; @interface UtilVoice : NSObject<AVAudioRecorderDelegate>{ // id<UtilVoiceDelegate> delegate; bool recording; int time_max; int time_min; NSTimeInterval time;//录音时间 } @property(nonatomic,retain) NSString* file; @property(nonatomic,assign) id< UtilVoiceDelegate > delegate; @property(nonatomic,retain) AVAudioRecorder *recorder; @property(nonatomic,retain) AVAudioSession *session; - (id)initMax:(int)_max min:(int)_min; - (void)start; - (void)stop; - (void)deleteRecord; - (NSString *)getFileUrl; + (NSString *)download:(NSURL *)url; //语音下载 +(void)scheduleDownload:(NSString*)name remoteUrl:(NSString*)url result:(void(^)(NSString *amrPath, NSString*wavPath, float length, NSError *error))result; //时长计算 +(float)lengthOfAudio:(NSString*)audioFullPath; @end @protocol UtilVoiceDelegate <NSObject> //录音状态变化 - (void)UtilVoice:(UtilVoice *)obj recordStateDidChange:(UtilVoiceStatus)status; - (bool)pcmToMp3:(NSString *)cafFilePath mp3SavePath:(NSString *)mp3FilePath; @end
<filename>test/fixtures.ts<gh_stars>1-10 export default { alphabets: { base2: '01', base16: '0123456789abcdef', base58: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz', }, valid: [ { alphabet: 'base2', hex: '000f', string: '01111', }, { alphabet: 'base2', hex: '00ff', comment: 'Note the first leading zero byte is compressed into 1 char', string: '011111111', }, { alphabet: 'base2', hex: '0fff', string: '111111111111', }, { alphabet: 'base2', hex: 'ff00ff00', string: '11111111000000001111111100000000', }, { alphabet: 'base16', hex: '0000000f', string: '000f', }, { alphabet: 'base16', hex: '000fff', string: '0fff', }, { alphabet: 'base16', hex: 'ffff', string: 'ffff', }, { alphabet: 'base58', hex: '', string: '', }, { alphabet: 'base58', hex: '61', string: '2g', }, { alphabet: 'base58', hex: '626262', string: 'a3gV', }, { alphabet: 'base58', hex: '636363', string: 'aPEr', }, { alphabet: 'base58', hex: '73696d706c792061206c6f6e6720737472696e67', string: '2cFupjhnEsSn59qHXstmK2ffpLv2', }, { alphabet: 'base58', hex: '00eb15231dfceb60925886b67d065299925915aeb172c06647', string: '1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L', }, { alphabet: 'base58', hex: '516b6fcd0f', string: 'ABnLTmg', }, { alphabet: 'base58', hex: 'bf4f89001e670274dd', string: '3SEo3LWLoPntC', }, { alphabet: 'base58', hex: '572e4794', string: '3EFU7m', }, { alphabet: 'base58', hex: 'ecac89cad93923c02321', string: 'EJDM8drfXA6uyA', }, { alphabet: 'base58', hex: '10c8511e', string: 'Rt5zm', }, { alphabet: 'base58', hex: '00000000000000000000', string: '1111111111', }, { alphabet: 'base58', hex: '801184cd2cdd640ca42cfc3a091c51d549b2f016d454b2774019c2b2d2e08529fd206ec97e', string: '5Hx15HFGyep2CfPxsJKe2fXJsCVn5DEiyoeGGF6JZjGbTRnqfiD', }, { alphabet: 'base58', hex: '003c176e659bea0f29a3e9bf7880c112b1b31b4dc826268187', string: '16UjcYNBG9GTK4uq2f7yYEbuifqCzoLMGS', }, { alphabet: 'base58', hex: 'ffffffffffffffffffff', string: 'FPBt6CHo3fovdL', }, { alphabet: 'base58', hex: 'ffffffffffffffffffffffffff', string: 'NKioeUVktgzXLJ1B3t', }, { alphabet: 'base58', hex: 'ffffffffffffffffffffffffffffffff', string: 'YcVfxkQb6JRzqk5kF2tNLv', }, { alphabet: 'base2', hex: 'fb6f9ac3', string: '11111011011011111001101011000011', }, { alphabet: 'base2', hex: '179eea7a', string: '10111100111101110101001111010', }, { alphabet: 'base2', hex: '6db825db', string: '1101101101110000010010111011011', }, { alphabet: 'base2', hex: '93976aa7', string: '10010011100101110110101010100111', }, { alphabet: 'base58', hex: 'ef41b9ce7e830af7', string: 'h26E62FyLQN', }, { alphabet: 'base58', hex: '606cbc791036d2e9', string: 'H8Sa62HVULG', }, { alphabet: 'base58', hex: 'bdcb0ea69c2c8ec8', string: 'YkESUPpnfoD', }, { alphabet: 'base58', hex: '1a2358ba67fb71d5', string: '5NaBN89ajtQ', }, { alphabet: 'base58', hex: 'e6173f0f4d5fb5d7', string: 'fVAoezT1ZkS', }, { alphabet: 'base58', hex: '91c81cbfdd58bbd2', string: 'RPGNSU3bqTX', }, { alphabet: 'base58', hex: '329e0bf0e388dbfe', string: '9U41ZkwwysT', }, { alphabet: 'base58', hex: '30b10393210fa65b', string: '99NMW3WHjjY', }, { alphabet: 'base58', hex: 'ab3bdd18e3623654', string: 'VeBbqBb4rCT', }, { alphabet: 'base58', hex: 'fe29d1751ec4af8a', string: 'jWhmYLN9dUm', }, { alphabet: 'base58', hex: 'c1273ab5488769807d', string: '3Tbh4kL3WKW6g', }, { alphabet: 'base58', hex: '6c7907904de934f852', string: '2P5jNYhfpTJxy', }, { alphabet: 'base58', hex: '05f0be055db47a0dc9', string: '5PN768Kr5oEp', }, { alphabet: 'base58', hex: '3511e6206829b35b12', string: 'gBREojGaJ6DF', }, { alphabet: 'base58', hex: 'd1c7c2ddc4a459d503', string: '3fsekq5Esq2KC', }, { alphabet: 'base58', hex: '1f88efd17ab073e9a1', string: 'QHJbmW9ZY7jn', }, { alphabet: 'base58', hex: '0f45dadf4e64c5d5c2', string: 'CGyVUMmCKLRf', }, { alphabet: 'base58', hex: 'de1e5c5f718bb7fafa', string: '3pyy8U7w3KUa5', }, { alphabet: 'base58', hex: '123190b93e9a49a46c', string: 'ES3DeFrG1zbd', }, { alphabet: 'base58', hex: '8bee94a543e7242e5a', string: '2nJnuWyLpGf6y', }, { alphabet: 'base58', hex: '9fd5f2285362f5cfd834', string: '9yqFhqeewcW3pF', }, { alphabet: 'base58', hex: '6987bac63ad23828bb31', string: '6vskE5Y1LhS3U4', }, { alphabet: 'base58', hex: '19d4a0f9d459cc2a08b0', string: '2TAsHPuaLhh5Aw', }, { alphabet: 'base58', hex: 'a1e47ffdbea5a807ab26', string: 'A6XzPgSUJDf1W5', }, { alphabet: 'base58', hex: '35c231e5b3a86a9b83db', string: '42B8reRwPAAoAa', }, { alphabet: 'base58', hex: 'b2351012a48b8347c351', string: 'B1hPyomGx4Vhqa', }, { alphabet: 'base58', hex: '71d402694dd9517ea653', string: '7Pv2SyAQx2Upu8', }, { alphabet: 'base58', hex: '55227c0ec7955c2bd6e8', string: '5nR64BkskyjHMq', }, { alphabet: 'base58', hex: '17b3d8ee7907c1be34df', string: '2LEg7TxosoxTGS', }, { alphabet: 'base58', hex: '7e7bba7b68bb8e95827f', string: '879o2ATGnmYyAW', }, { alphabet: 'base58', hex: 'db9c13f5ba7654b01407fb', string: 'wTYfxjDVbiks874', }, { alphabet: 'base58', hex: '6186449d20f5fd1e6c4393', string: 'RBeiWhzZNL6VtMG', }, { alphabet: 'base58', hex: '5248751cebf4ad1c1a83c3', string: 'MQSVNnc8ehFCqtW', }, { alphabet: 'base58', hex: '32090ef18cd479fc376a74', string: 'DQdu351ExDaeYeX', }, { alphabet: 'base58', hex: '7cfa5d6ed1e467d986c426', string: 'XzW67T5qfEnFcaZ', }, { alphabet: 'base58', hex: '9d8707723c7ede51103b6d', string: 'g4eTCg6QJnB1UU4', }, { alphabet: 'base58', hex: '6f4d1e392d6a9b4ed8b223', string: 'Ubo7kZY5aDpAJp2', }, { alphabet: 'base58', hex: '38057d98797cd39f80a0c9', string: 'EtjQ2feamJvuqse', }, { alphabet: 'base58', hex: 'de7e59903177e20880e915', string: 'xB2N7yRBnDYEoT2', }, { alphabet: 'base58', hex: 'b2ea24a28bc4a60b5c4b8d', string: 'mNFMpJ2P3TGYqhv', }, { alphabet: 'base58', hex: 'cf84938958589b6ffba6114d', string: '4v8ZbsGh2ePz5sipt', }, { alphabet: 'base58', hex: 'dee13be7b8d8a08c94a3c02a', string: '5CwmE9jQqwtHkTF45', }, { alphabet: 'base58', hex: '14cb9c6b3f8cd2e02710f569', string: 'Pm85JHVAAdeUdxtp', }, { alphabet: 'base58', hex: 'ca3f2d558266bdcc44c79cb5', string: '4pMwomBAQHuUnoLUC', }, { alphabet: 'base58', hex: 'c031215be44cbad745f38982', string: '4dMeTrcxiVw9RWvj3', }, { alphabet: 'base58', hex: '1435ab1dbc403111946270a5', string: 'P7wX3sCWNrbqhBEC', }, { alphabet: 'base58', hex: 'd8c6e4d775e7a66a0d0f9f41', string: '56GLoRDGWGuGJJwPN', }, { alphabet: 'base58', hex: 'dcee35e74f0fd74176fce2f4', string: '5Ap1zyuYiJJFwWcMR', }, { alphabet: 'base58', hex: 'bfcc0ca4b4855d1cf8993fc0', string: '4cvafQW4PEhARKv9D', }, { alphabet: 'base58', hex: 'e02a3ac25ece7b54584b670a', string: '5EMM28xkpxZ1kkVUM', }, { alphabet: 'base58', hex: 'fe4d938fc3719f064cabb4bfff', string: 'NBXKkbHwrAsiWTLAk6', }, { alphabet: 'base58', hex: '9289cb4f6b15c57e6086b87ea5', string: 'DCvDpjEXEbHjZqskKv', }, { alphabet: 'base58', hex: 'fc266f35626b3612bfe978537b', string: 'N186PVoBWrNre35BGE', }, { alphabet: 'base58', hex: '33ff08c06d92502bf258c07166', string: '5LC4SoW6jmTtbkbePw', }, { alphabet: 'base58', hex: '6a81cac1f3666bc59dc67b1c3c', string: '9sXgUySUzwiqDU5WHy', }, { alphabet: 'base58', hex: '9dfb8e7e744c544c0f323ea729', string: 'EACsmGmkgcwsrPFzLg', }, { alphabet: 'base58', hex: '1e7a1e284f70838b38442b682b', string: '3YEVk9bE7rw5qExMkv', }, { alphabet: 'base58', hex: '2a862ad57901a8235f5dc74eaf', string: '4YS259nuTLfeXa5Wuc', }, { alphabet: 'base58', hex: '74c82096baef21f9d3089e5462', string: 'AjAcKEhUfrqm8smvM7', }, { alphabet: 'base58', hex: '7a3edbc23d7b600263920261cc', string: 'BBZXyRgey5S5DDZkcK', }, { alphabet: 'base58', hex: '20435664c357d25a9c8df751cf4f', string: 'CrwNL6Fbv4pbRx1zd9g', }, { alphabet: 'base58', hex: '51a7aa87cf5cb1c12d045ec3422d', string: 'X27NHGgKXmGzzQvDtpC', }, { alphabet: 'base58', hex: '344d2e116aa26f1062a2cb6ebbef', string: 'LEDLDvL1Hg4qt1efVXt', }, { alphabet: 'base58', hex: '6941add7be4c0b5c7163e4928f8e', string: 'fhMyN6gwoxE3uYraVzV', }, { alphabet: 'base58', hex: '10938fcbb7c4ab991649734a14bf', string: '76TPrSDxzGQfSzMu974', }, { alphabet: 'base58', hex: 'eafe04d944ba504e9af9117b07de', string: '2VPgov563ryfe4L2Bj6M', }, { alphabet: 'base58', hex: '58d0aeed4d35da20b6f052127edf', string: 'ZenZhXF9YwP8nQvNtNz', }, { alphabet: 'base58', hex: 'd734984e2f5aecf25f7a3e353f8a', string: '2N7n3jFsTdyN49Faoq6h', }, { alphabet: 'base58', hex: '57d873fdb405b7daf4bafa62068a', string: 'ZJ7NwoP4wHvwyZg3Wjs', }, { alphabet: 'base58', hex: 'bda4ec7b40d0d65ca95dec4c4d3b', string: '2CijxjsNyvqTwPCfDcpA', }, { alphabet: 'base58', hex: '826c4abdceb1b91f0d4ad665f86d2e', string: '4edfvuDQu9KzVxLuXHfMo', }, { alphabet: 'base58', hex: 'e7ecb35d07e65b960cb10574a4f51a', string: '7VLRYdB4cToipp2J2p3v9', }, { alphabet: 'base58', hex: '4f2d72ead87b31d6869fba39eac6dc', string: '3DUjqJRcfdWhpsrLrGcQs', }, { alphabet: 'base58', hex: '8b4f5788d60030950d5dfbf94c585d', string: '4u44JSRH5jP5X39YhPsmE', }, { alphabet: 'base58', hex: 'ee4c0a0025d1a74ace9fe349355cc5', string: '7fgACjABRQUGUEpN6VBBA', }, { alphabet: 'base58', hex: '58ac05b9a0b4b66083ff1d489b8d84', string: '3UtJPyTwGXapcxHx8Rom5', }, { alphabet: 'base58', hex: '1aa35c05e1132e8e049aafaef035d8', string: 'kE2eSU7gM2619pT82iGP', }, { alphabet: 'base58', hex: '771b0c28608484562a292e5d5d2b30', string: '4LGYeWhyfrjUByibUqdVR', }, { alphabet: 'base58', hex: '78ff9a0e56f9e88dc1cd654b40d019', string: '4PLggs66qAdbmZgkaPihe', }, { alphabet: 'base58', hex: '6d691bdd736346aa5a0a95b373b2ab', string: '44Y6qTgSvRMkdqpQ5ufkN', }, ], invalid: [ { alphabet: 'base58', description: 'non-base58 string', exception: '^Error: Non-base58 character$', string: '#####', }, { alphabet: 'base58', description: 'non-base58 string', exception: '^Error: Non-base58 character$', string: 'invalid', }, { alphabet: 'base58', description: 'non-base58 alphabet', exception: '^Error: Non-base58 character$', string: 'c2F0b3NoaQo=', }, { alphabet: 'base58', description: 'leading whitespace', exception: '^Error: Non-base58 character$', string: ' 1111111111', }, { alphabet: 'base58', description: 'trailing whitespace', exception: '^Error: Non-base58 character$', string: '1111111111 ', }, { alphabet: 'base58', description: 'unexpected character after whitespace', exception: '^Error: Non-base58 character$', string: ' \t\n\u000b\f\r skip \r\f\u000b\n\t a', }, ], };
/// Delete the value at this cursor /// /// Returns `true` if something was deleted, `false` otherwise. /// pub fn delete(cursor: NP_Cursor, memory: &NP_Memory) -> Result<bool, NP_Error> { if cursor.buff_addr == 0 { return Ok(false) } if cursor.parent_type == NP_Cursor_Parent::Tuple { memory.write_bytes()[cursor.buff_addr - 1] = 0; NP_Cursor::set_schema_default(cursor, memory)? } else { cursor.get_value_mut(memory).set_addr_value(0); } Ok(true) }
In 2004, Paul Sinton-Hewitt CBE led 13 of his running friends to Bushy Park in West London where they completed the first ever 5km parkrun. Now eleven and a half years later more than half a million runners are part of the parkrun organisation. I spoke to Tom Williams, the Managing Director of parkrun UK about how parkrun is reversing worrying trends in British fitness. parkrun’s appeal extends way beyond its obvious physical benefits, Tom emphasises that parkrun is “much more than just a run” and appeals to the general public’s “innate desire to be outside, be with other people, contribute to their community and do good things and generally be a part of a community”. Although the obvious focus of parkrun is the 5km event, Tom’s vision of parkrun was one of community spirit rather than social physical exercise: “I don’t think it’s about as much breaking down the barriers to participate in a run which we do, for me it’s more about breaking down the barriers to be involved with your community” parkrun is accessible to everyone. Tom reiterated “it’s absolutely not a race, it’s a free, weekly timed run or walk” and it is this accessibility that is hoped will counteract the movement in British society to exercise alone. Recognising the “a massive need” in Britain for more social exercise, Tom gave the example of how parkrun can appeal to the entire family unit. Tom laments that it has become the norm for all members of the family exercise individually, and used his own example of spending his Sunday morning with his wife and two children at the junior parkrun, relishing in a too rare opportunity to be “as a family, outside, being active all morning”. “hopefully [parkrun]is contributing to changing that back to the most valuable exercise you can do which is outside and social and fun” Tom, a former lecturer in exercise science at the University of Leeds and founder of the Leeds Woodhouse Moor parkrun (the first outside London), left his academic role and joined parkruns team of only 13 dedicated staff in 2010. In his time with the Leeds parkrun Tom witnessed students and members of the wider community mixing outside of their usual friendship circle, the ability for the parkrun to cross age, gender, religious and racial groups. Allowing people to socialise in groups they may not normally. For students, the opportunity to not only participate but to also volunteer at parkrun offers “immense” transferable skills attractive to employers. As an employer Tom was keen to reiterate how volunteering at an event like parkrun was an easy way to satisfy “students’ need to differentiate themselves” in the post-graduation job market. Parkrun relies on more than 8,500 volunteers every week to run their 391 parkruns across the United Kingdom. For anyone worried about joining in with parkrun Tom offered the following advice, “the most important thing is that everybody is fit enough to do it”, parkrun’s maxim “run, jog, walk, volunteer” allows anyone of any ability to get involved: “if you’re really worried about participating, then volunteer. It’s a really great way of getting to know people and if you’re worried about that then just come along and watch” For more information visit parkrun’s website or if you want to know where to find me on a Saturday morning, Southampton parkrun.
package org.ofbiz.webapp.event; import java.util.Iterator; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.ofbiz.webapp.control.ConfigXMLReader.Event; import org.ofbiz.webapp.control.ConfigXMLReader.RequestMap; /** * SCIPIO: Super event handler, for nested handling. */ public interface EventHandlerWrapper { /** * Initializes the handler. Since handlers use the singleton pattern this method should only be called * the first time the handler is used. * * @param context ServletContext This may be needed by the handler in order to lookup properties or XML * definition files for rendering pages or handler options. * @throws EventHandlerException */ public void init(ServletContext context) throws EventHandlerException; /** * Invoke the web event * @param handlers The (next) event handlers being invoked; call next() and then invoke() * @param event Contains information about what to execute * @param requestMap Contains information about the request-map the event was called from * @param request The servlet request object * @param response The servlet response object * *@return String Result code *@throws EventHandlerException */ public String invoke(Iterator<EventHandlerWrapper> handlers, Event event, RequestMap requestMap, HttpServletRequest request, HttpServletResponse response) throws EventHandlerException; }
<gh_stars>0 import { GeoPoint } from '../src/geopoint'; import * as geolib from '../src/index'; describe("Geolib", () => { it("longitude conversion deg->rad", () => { let geoPoint = new GeoPoint(0, 90); expect(geoPoint.lonrad).toBeCloseTo(Math.PI * 0.5); }); it("latitude conversion deg->rad", () => { let geoPoint = new GeoPoint(90, 0); expect(geoPoint.latrad).toBeCloseTo(Math.PI * 0.5); }); it('1 minute is approx 1 nm', () => { expect( Math.abs(geolib.calculateDistance(new GeoPoint(0, 0), new GeoPoint(0.016666666, 0)) - 1852) ).toBeLessThan(2); }); });
/** * The persistent class for the functions database table. * */ @Entity @Table(name = "functions") @XmlRootElement(name = "functions") public class Function extends POSNirvanaBaseClassWithoutGeneratedIds { private static final long serialVersionUID = 1L; @Column(name = "display_name", nullable = false, length = 64) private String displayName; @Column(name = "display_sequence", nullable = false) private int displaySequence; @Column(nullable = false, length = 32) private String name; public Function() { } public String getDisplayName() { return this.displayName; } public void setDisplayName(String displayName) { this.displayName = displayName; } public int getDisplaySequence() { return this.displaySequence; } public void setDisplaySequence(int displaySequence) { this.displaySequence = displaySequence; } public String getName() { return this.name; } public void setName(String name) { this.name = name; } @Override public String toString() { return "Function [displayName=" + displayName + ", displaySequence=" + displaySequence + ", name=" + name + "]"; } }
package com.tvd12.ezydata.database.test; import java.util.Collection; import java.util.List; import com.tvd12.ezydata.database.EzyDatabaseContext; import com.tvd12.ezydata.database.EzyDatabaseContextAware; import com.tvd12.ezydata.database.EzyDatabaseRepository; public class DbRepository<I,E> implements EzyDatabaseRepository<I, E>, EzyDatabaseContextAware { @Override public void setDatabaseContext(EzyDatabaseContext context) { } @Override public long count() { return 0; } @Override public void save(E entity) { } @Override public void save(Iterable<E> entities) { } @Override public E findById(I id) { return null; } @Override public List<E> findListByIds(Collection<I> ids) { return null; } @Override public E findByField(String field, Object value) { return null; } @Override public List<E> findListByField(String field, Object value) { return null; } @Override public List<E> findListByField(String field, Object value, int skip, int limit) { return null; } @Override public List<E> findAll() { return null; } @Override public List<E> findAll(int skip, int limit) { return null; } @Override public int deleteAll() { return 0; } @Override public void delete(I id) { } @Override public int deleteByIds(Collection<I> ids) { return 0; } protected Class<E> getEntityType() { return null; } }
/// /// Returns the constant tuple semantic element. /// fn constant(scope: Rc<RefCell<Scope>>, tuple: TupleExpression) -> Result<Element, Error> { let mut result = TupleConstant::with_capacity(tuple.location, tuple.elements.len()); for expression in tuple.elements.into_iter() { let expression_location = expression.location; let (element, _) = ExpressionAnalyzer::new(scope.clone(), TranslationRule::Constant) .analyze(expression)?; match element { Element::Constant(constant) => result.push(constant), element => { return Err(Error::ExpressionNonConstantElement { location: expression_location, found: element.to_string(), }); } } } let element = Element::Constant(Constant::Tuple(result)); Ok(element) }
<filename>typings/download-git-repo/index.d.ts function download( repo: string, dest: string, opts: { clone: boolean }, callback: (err?: string) => void ): void function download( repo: string, dest: string, callback: (err?: string) => void ): void declare module "download-git-repo" { export default download }
/** Cup generated class to encapsulate user supplied action code.*/ class CUP$parser$actions { /** Constructor */ CUP$parser$actions() { } /** Method with the actual generated action code. */ public final Symbol CUP$parser$do_action( int CUP$parser$act_num, lr_parser CUP$parser$parser, java.util.Stack CUP$parser$stack, int CUP$parser$top) throws java.lang.Exception { /* Symbol object for return from actions */ Symbol CUP$parser$result; /* select the action based on the action number */ switch (CUP$parser$act_num) { /*. . . . . . . . . . . . . . . . . . . .*/ case 368: // literal ::= NULL { TreeNode RESULT = null; Literal node = new Literal("null",0,0,7); RESULT = node; CUP$parser$result = new Symbol(133/*literal*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 367: // literal ::= TRUE { TreeNode RESULT = null; Literal node = new Literal("true",0,0,6); RESULT = node; CUP$parser$result = new Symbol(133/*literal*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 366: // literal ::= FALSE { TreeNode RESULT = null; Literal node = new Literal("false",0,0,5); RESULT = node; CUP$parser$result = new Symbol(133/*literal*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 365: // literal ::= SLITERAL { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; String e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Literal node = new Literal(e1.toString(),0,0,4); RESULT = node; CUP$parser$result = new Symbol(133/*literal*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 364: // literal ::= CLITERAL { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; String e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Literal node = new Literal(e1.toString(),0,0,3); RESULT = node; CUP$parser$result = new Symbol(133/*literal*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 363: // literal ::= RLITERAL { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; String e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Literal node = new Literal(e1.toString(),0,0,2); RESULT = node; CUP$parser$result = new Symbol(133/*literal*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 362: // literal ::= ILITERAL { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; String e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Literal node = new Literal(e1.toString(),0,0,1); RESULT = node; CUP$parser$result = new Symbol(133/*literal*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 361: // dims ::= dims LS RS { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; DimExpr node = new DimExpr(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(132/*dims*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 360: // dims ::= LS RS { TreeNode RESULT = null; DimExpr node = new DimExpr(0,0); RESULT = node; CUP$parser$result = new Symbol(132/*dims*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 359: // dimExpr ::= LS expression RS { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; DimExpr node = new DimExpr(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(131/*dimExpr*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 358: // dimExprs ::= dimExprs dimExpr { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; DimExprs node = new DimExprs(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(130/*dimExprs*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 357: // dimExprs ::= dimExpr { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; DimExprs node = new DimExprs(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(130/*dimExprs*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 356: // arrayCreationExpression ::= NEW classOrInterfaceType dims arrayInitializer { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ArrayCreationExpression node = new ArrayCreationExpression(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(129/*arrayCreationExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 355: // arrayCreationExpression ::= NEW primitiveType dims arrayInitializer { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ArrayCreationExpression node = new ArrayCreationExpression(0,0); node.addChild(e1); node.addChild(e2); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(129/*arrayCreationExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 354: // arrayCreationExpression ::= NEW classOrInterfaceType dimExprs { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ArrayCreationExpression node = new ArrayCreationExpression(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(129/*arrayCreationExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 353: // arrayCreationExpression ::= NEW classOrInterfaceType dimExprs dims { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ArrayCreationExpression node = new ArrayCreationExpression(0,0); node.addChild(e1); node.addChild(e2); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(129/*arrayCreationExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 352: // arrayCreationExpression ::= NEW primitiveType dimExprs { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ArrayCreationExpression node = new ArrayCreationExpression(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(129/*arrayCreationExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 351: // arrayCreationExpression ::= NEW primitiveType dimExprs dims { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ArrayCreationExpression node = new ArrayCreationExpression(0,0); node.addChild(e1); node.addChild(e2); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(129/*arrayCreationExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 350: // arrayAccess ::= primaryNoNewArray LS expression RS { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; ArrayAccess node = new ArrayAccess(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(128/*arrayAccess*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 349: // arrayAccess ::= name LS expression RS { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; ArrayAccess node = new ArrayAccess(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(128/*arrayAccess*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 348: // methodInvocation ::= SUPER DOT ID LP RP { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; String e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; MethodInvocation node = new MethodInvocation(e1.toString(),0,0,3,false); RESULT = node; CUP$parser$result = new Symbol(127/*methodInvocation*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 347: // methodInvocation ::= SUPER DOT ID LP argumentList RP { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; String e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; MethodInvocation node = new MethodInvocation(e1.toString(),0,0,3,true); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(127/*methodInvocation*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 346: // methodInvocation ::= primary DOT ID LP RP { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-4)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; String e2 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; MethodInvocation node = new MethodInvocation(e2.toString(),0,0,2,false); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(127/*methodInvocation*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 345: // methodInvocation ::= primary DOT ID LP argumentList RP { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-5)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; String e2 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; MethodInvocation node = new MethodInvocation(e2.toString(),0,0,2,true); node.addChild(e1); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(127/*methodInvocation*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 344: // methodInvocation ::= name LP RP { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; MethodInvocation node = new MethodInvocation(null,0,0,1,false); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(127/*methodInvocation*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 343: // methodInvocation ::= name LP argumentList RP { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; MethodInvocation node = new MethodInvocation(null,0,0,1,true); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(127/*methodInvocation*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 342: // fieldAccess ::= SUPER DOT ID { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; String e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; FieldAccess node = new FieldAccess(e1.toString(),0,0); RESULT = node; CUP$parser$result = new Symbol(126/*fieldAccess*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 341: // fieldAccess ::= primary DOT ID { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; String e2 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; FieldAccess node = new FieldAccess(e2.toString(),0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(126/*fieldAccess*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 340: // argumentList ::= argumentList COMMA expression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ArgumentList node = new ArgumentList(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(125/*argumentList*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 339: // argumentList ::= expression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ArgumentList node = new ArgumentList(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(125/*argumentList*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 338: // classInstanceCreationExpression ::= primary DOT NEW ID LP RP { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-5)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; String e2 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; ClassInstanceCreationExpression node = new ClassInstanceCreationExpression(e2.toString(),0,0,8); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(124/*classInstanceCreationExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 337: // classInstanceCreationExpression ::= primary DOT NEW ID LP RP classBody { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-6)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; String e2 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ClassInstanceCreationExpression node = new ClassInstanceCreationExpression(e2.toString(),0,0,7); node.addChild(e1); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(124/*classInstanceCreationExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 336: // classInstanceCreationExpression ::= primary DOT NEW ID LP argumentList RP { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-6)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; String e2 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; ClassInstanceCreationExpression node = new ClassInstanceCreationExpression(e2.toString(),0,0,6); node.addChild(e1); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(124/*classInstanceCreationExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 335: // classInstanceCreationExpression ::= primary DOT NEW ID LP argumentList RP classBody { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-7)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).right; String e2 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-4)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e4left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e4right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e4 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ClassInstanceCreationExpression node = new ClassInstanceCreationExpression(e2.toString(),0,0,5); node.addChild(e1); node.addChild(e3); node.addChild(e4); RESULT = node; CUP$parser$result = new Symbol(124/*classInstanceCreationExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 334: // classInstanceCreationExpression ::= NEW classType LP RP classBody { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ClassInstanceCreationExpression node = new ClassInstanceCreationExpression(null,0,0,4); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(124/*classInstanceCreationExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 333: // classInstanceCreationExpression ::= NEW classType LP argumentList RP classBody { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-4)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ClassInstanceCreationExpression node = new ClassInstanceCreationExpression(null,0,0,3); node.addChild(e1); node.addChild(e2); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(124/*classInstanceCreationExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 332: // classInstanceCreationExpression ::= NEW classType LP RP { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; ClassInstanceCreationExpression node = new ClassInstanceCreationExpression(null,0,0,2); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(124/*classInstanceCreationExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 331: // classInstanceCreationExpression ::= NEW classType LP argumentList RP { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; ClassInstanceCreationExpression node = new ClassInstanceCreationExpression(null,0,0,1); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(124/*classInstanceCreationExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 330: // primaryNoNewArray ::= VOID DOT CLASS { TreeNode RESULT = null; PrimaryNoNewArray node = new PrimaryNoNewArray(0,0,11); RESULT = node; CUP$parser$result = new Symbol(123/*primaryNoNewArray*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 329: // primaryNoNewArray ::= name DOT CLASS { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; PrimaryNoNewArray node = new PrimaryNoNewArray(0,0,10); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(123/*primaryNoNewArray*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 328: // primaryNoNewArray ::= primitiveType DOT CLASS { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; PrimaryNoNewArray node = new PrimaryNoNewArray(0,0,9); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(123/*primaryNoNewArray*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 327: // primaryNoNewArray ::= name DOT THIS { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; PrimaryNoNewArray node = new PrimaryNoNewArray(0,0,8); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(123/*primaryNoNewArray*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 326: // primaryNoNewArray ::= arrayAccess { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; PrimaryNoNewArray node = new PrimaryNoNewArray(0,0,7); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(123/*primaryNoNewArray*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 325: // primaryNoNewArray ::= methodInvocation { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; PrimaryNoNewArray node = new PrimaryNoNewArray(0,0,6); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(123/*primaryNoNewArray*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 324: // primaryNoNewArray ::= fieldAccess { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; PrimaryNoNewArray node = new PrimaryNoNewArray(0,0,5); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(123/*primaryNoNewArray*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 323: // primaryNoNewArray ::= classInstanceCreationExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; PrimaryNoNewArray node = new PrimaryNoNewArray(0,0,4); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(123/*primaryNoNewArray*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 322: // primaryNoNewArray ::= LP expression RP { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; PrimaryNoNewArray node = new PrimaryNoNewArray(0,0,3); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(123/*primaryNoNewArray*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 321: // primaryNoNewArray ::= literal { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; PrimaryNoNewArray node = new PrimaryNoNewArray(0,0,2); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(123/*primaryNoNewArray*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 320: // primaryNoNewArray ::= THIS { TreeNode RESULT = null; PrimaryNoNewArray node = new PrimaryNoNewArray(0,0,1); RESULT = node; CUP$parser$result = new Symbol(123/*primaryNoNewArray*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 319: // primary ::= arrayCreationExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Primary node = new Primary(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(122/*primary*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 318: // primary ::= primaryNoNewArray { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Primary node = new Primary(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(122/*primary*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 317: // castExpression ::= LP name dims RP unaryExpressionNotPlusMinus { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; CastExpression node = new CastExpression(0,0); node.addChild(e1); node.addChild(e2); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(121/*castExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 316: // castExpression ::= LP expression RP unaryExpressionNotPlusMinus { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; CastExpression node = new CastExpression(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(121/*castExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 315: // castExpression ::= LP primitiveType RP unaryExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; CastExpression node = new CastExpression(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(121/*castExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 314: // castExpression ::= LP primitiveType dims RP unaryExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; CastExpression node = new CastExpression(0,0); node.addChild(e1); node.addChild(e2); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(121/*castExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 313: // postDecrementExpression ::= postfixExpression DM { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; PostDecrementExpression node = new PostDecrementExpression(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(120/*postDecrementExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 312: // postIncrementExpression ::= postfixExpression DP { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; PostIncrementExpression node = new PostIncrementExpression(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(119/*postIncrementExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 311: // postfixExpression ::= postDecrementExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; PostfixExpression node = new PostfixExpression(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(118/*postfixExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 310: // postfixExpression ::= postIncrementExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; PostfixExpression node = new PostfixExpression(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(118/*postfixExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 309: // postfixExpression ::= name { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; PostfixExpression node = new PostfixExpression(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(118/*postfixExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 308: // postfixExpression ::= primary { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; PostfixExpression node = new PostfixExpression(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(118/*postfixExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 307: // unaryExpressionNotPlusMinus ::= LN unaryExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; UnaryExpressionNotPlusMinus node = new UnaryExpressionNotPlusMinus(0,0,sym.LN); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(117/*unaryExpressionNotPlusMinus*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 306: // unaryExpressionNotPlusMinus ::= BWN unaryExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; UnaryExpressionNotPlusMinus node = new UnaryExpressionNotPlusMinus(0,0,sym.BWN); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(117/*unaryExpressionNotPlusMinus*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 305: // unaryExpressionNotPlusMinus ::= castExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; UnaryExpressionNotPlusMinus node = new UnaryExpressionNotPlusMinus(0,0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(117/*unaryExpressionNotPlusMinus*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 304: // unaryExpressionNotPlusMinus ::= postfixExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; UnaryExpressionNotPlusMinus node = new UnaryExpressionNotPlusMinus(0,0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(117/*unaryExpressionNotPlusMinus*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 303: // preDecrementExpression ::= DM unaryExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; PreDecrementExpression node = new PreDecrementExpression(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(116/*preDecrementExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 302: // preIncrementExpression ::= DP unaryExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; PreIncrementExpression node = new PreIncrementExpression(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(115/*preIncrementExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 301: // unaryExpression ::= unaryExpressionNotPlusMinus { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; UnaryExpression node = new UnaryExpression(0,0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(114/*unaryExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 300: // unaryExpression ::= SUB unaryExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; UnaryExpression node = new UnaryExpression(0,0,sym.SUB); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(114/*unaryExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 299: // unaryExpression ::= ADD unaryExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; UnaryExpression node = new UnaryExpression(0,0,sym.ADD); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(114/*unaryExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 298: // unaryExpression ::= preDecrementExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; UnaryExpression node = new UnaryExpression(0,0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(114/*unaryExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 297: // unaryExpression ::= preIncrementExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; UnaryExpression node = new UnaryExpression(0,0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(114/*unaryExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 296: // multiplicativeExpression ::= multiplicativeExpression MOD unaryExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; MultiplicativeExpression node = new MultiplicativeExpression(0,0,sym.MOD); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(113/*multiplicativeExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 295: // multiplicativeExpression ::= multiplicativeExpression DIV unaryExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; MultiplicativeExpression node = new MultiplicativeExpression(0,0,sym.DIV); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(113/*multiplicativeExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 294: // multiplicativeExpression ::= multiplicativeExpression MUL unaryExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; MultiplicativeExpression node = new MultiplicativeExpression(0,0,sym.MUL); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(113/*multiplicativeExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 293: // multiplicativeExpression ::= unaryExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; MultiplicativeExpression node = new MultiplicativeExpression(0,0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(113/*multiplicativeExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 292: // additiveExpression ::= additiveExpression SUB multiplicativeExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; AdditiveExpression node = new AdditiveExpression(0,0,sym.SUB); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(112/*additiveExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 291: // additiveExpression ::= additiveExpression ADD multiplicativeExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; AdditiveExpression node = new AdditiveExpression(0,0,sym.ADD); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(112/*additiveExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 290: // additiveExpression ::= multiplicativeExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; AdditiveExpression node = new AdditiveExpression(0,0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(112/*additiveExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 289: // shiftExpression ::= shiftExpression USR additiveExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ShiftExpression node = new ShiftExpression(0,0,sym.USR); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(111/*shiftExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 288: // shiftExpression ::= shiftExpression SR additiveExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ShiftExpression node = new ShiftExpression(0,0,sym.SR); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(111/*shiftExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 287: // shiftExpression ::= shiftExpression SL additiveExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ShiftExpression node = new ShiftExpression(0,0,sym.SL); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(111/*shiftExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 286: // shiftExpression ::= additiveExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ShiftExpression node = new ShiftExpression(0,0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(111/*shiftExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 285: // relationalExpression ::= relationalExpression INSTANCEOF referenceType { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RelationalExpression node = new RelationalExpression(0,0,sym.INSTANCEOF); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(110/*relationalExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 284: // relationalExpression ::= relationalExpression GE shiftExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RelationalExpression node = new RelationalExpression(0,0,sym.GE); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(110/*relationalExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 283: // relationalExpression ::= relationalExpression LE shiftExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RelationalExpression node = new RelationalExpression(0,0,sym.LE); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(110/*relationalExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 282: // relationalExpression ::= relationalExpression GT shiftExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RelationalExpression node = new RelationalExpression(0,0,sym.GT); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(110/*relationalExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 281: // relationalExpression ::= relationalExpression LT shiftExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RelationalExpression node = new RelationalExpression(0,0,sym.LT); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(110/*relationalExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 280: // relationalExpression ::= shiftExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RelationalExpression node = new RelationalExpression(0,0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(110/*relationalExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 279: // equalityExpression ::= equalityExpression NE relationalExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; EqualityExpression node = new EqualityExpression(0,0,sym.NE); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(109/*equalityExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 278: // equalityExpression ::= equalityExpression EQ relationalExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; EqualityExpression node = new EqualityExpression(0,0,sym.EQ); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(109/*equalityExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 277: // equalityExpression ::= relationalExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; EqualityExpression node = new EqualityExpression(0,0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(109/*equalityExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 276: // andExpression ::= andExpression BWA equalityExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; AndExpression node = new AndExpression(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(108/*andExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 275: // andExpression ::= equalityExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; AndExpression node = new AndExpression(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(108/*andExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 274: // exclusiveOrExpression ::= exclusiveOrExpression BWEO andExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ExclusiveOrExpression node = new ExclusiveOrExpression(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(107/*exclusiveOrExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 273: // exclusiveOrExpression ::= andExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ExclusiveOrExpression node = new ExclusiveOrExpression(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(107/*exclusiveOrExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 272: // inclusiveOrExpression ::= inclusiveOrExpression BWO exclusiveOrExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; InclusiveOrExpression node = new InclusiveOrExpression(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(106/*inclusiveOrExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 271: // inclusiveOrExpression ::= exclusiveOrExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; InclusiveOrExpression node = new InclusiveOrExpression(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(106/*inclusiveOrExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 270: // conditionalAndExpression ::= conditionalAndExpression LA inclusiveOrExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ConditionalAndExpression node = new ConditionalAndExpression(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(105/*conditionalAndExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 269: // conditionalAndExpression ::= inclusiveOrExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ConditionalAndExpression node = new ConditionalAndExpression(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(105/*conditionalAndExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 268: // conditionalOrExpression ::= conditionalOrExpression LO conditionalAndExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ConditionalOrExpression node = new ConditionalOrExpression(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(104/*conditionalOrExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 267: // conditionalOrExpression ::= conditionalAndExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ConditionalOrExpression node = new ConditionalOrExpression(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(104/*conditionalOrExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 266: // conditionalExpression ::= conditionalOrExpression QM expression COLON conditionalExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-4)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ConditionalExpression node = new ConditionalExpression(0,0); node.addChild(e1); node.addChild(e2); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(103/*conditionalExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 265: // conditionalExpression ::= conditionalOrExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ConditionalExpression node = new ConditionalExpression(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(103/*conditionalExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 264: // assignmentOperator ::= ABWO { TreeNode RESULT = null; AssignmentOperator node = new AssignmentOperator(0,0,sym.ABWO); RESULT = node; CUP$parser$result = new Symbol(102/*assignmentOperator*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 263: // assignmentOperator ::= ABWN { TreeNode RESULT = null; AssignmentOperator node = new AssignmentOperator(0,0,sym.ABWN); RESULT = node; CUP$parser$result = new Symbol(102/*assignmentOperator*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 262: // assignmentOperator ::= ABWA { TreeNode RESULT = null; AssignmentOperator node = new AssignmentOperator(0,0,sym.ABWA); RESULT = node; CUP$parser$result = new Symbol(102/*assignmentOperator*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 261: // assignmentOperator ::= AUSR { TreeNode RESULT = null; AssignmentOperator node = new AssignmentOperator(0,0,sym.AUSR); RESULT = node; CUP$parser$result = new Symbol(102/*assignmentOperator*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 260: // assignmentOperator ::= ASR { TreeNode RESULT = null; AssignmentOperator node = new AssignmentOperator(0,0,sym.ASR); RESULT = node; CUP$parser$result = new Symbol(102/*assignmentOperator*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 259: // assignmentOperator ::= ASL { TreeNode RESULT = null; AssignmentOperator node = new AssignmentOperator(0,0,sym.ASL); RESULT = node; CUP$parser$result = new Symbol(102/*assignmentOperator*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 258: // assignmentOperator ::= ASUB { TreeNode RESULT = null; AssignmentOperator node = new AssignmentOperator(0,0,sym.ASUB); RESULT = node; CUP$parser$result = new Symbol(102/*assignmentOperator*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 257: // assignmentOperator ::= AADD { TreeNode RESULT = null; AssignmentOperator node = new AssignmentOperator(0,0,sym.AADD); RESULT = node; CUP$parser$result = new Symbol(102/*assignmentOperator*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 256: // assignmentOperator ::= AMOD { TreeNode RESULT = null; AssignmentOperator node = new AssignmentOperator(0,0,sym.AMOD); RESULT = node; CUP$parser$result = new Symbol(102/*assignmentOperator*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 255: // assignmentOperator ::= ADIV { TreeNode RESULT = null; AssignmentOperator node = new AssignmentOperator(0,0,sym.ADIV); RESULT = node; CUP$parser$result = new Symbol(102/*assignmentOperator*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 254: // assignmentOperator ::= AMUL { TreeNode RESULT = null; AssignmentOperator node = new AssignmentOperator(0,0,sym.AMUL); RESULT = node; CUP$parser$result = new Symbol(102/*assignmentOperator*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 253: // assignmentOperator ::= ASSIGN { TreeNode RESULT = null; AssignmentOperator node = new AssignmentOperator(0,0,sym.ASSIGN); RESULT = node; CUP$parser$result = new Symbol(102/*assignmentOperator*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 252: // assignment ::= conditionalExpression assignmentOperator expression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Assignment node = new Assignment(0,0); node.addChild(e1); node.addChild(e2); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(101/*assignment*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 251: // assignmentExpression ::= assignment { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; AssignmentExpression node = new AssignmentExpression(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(100/*assignmentExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 250: // assignmentExpression ::= conditionalExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; AssignmentExpression node = new AssignmentExpression(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(100/*assignmentExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 249: // expression ::= assignmentExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Expression node = new Expression(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(99/*expression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 248: // constantExpression ::= expression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ConstantExpression node = new ConstantExpression(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(98/*constantExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 247: // finally ::= FINALLY block { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Finally node = new Finally(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(97/*finally*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 246: // catchClause ::= CATCH LP formalParameter RP block { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; CatchClause node = new CatchClause(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(96/*catchClause*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 245: // catches ::= catches catchClause { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Catches node = new Catches(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(95/*catches*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 244: // catches ::= catchClause { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Catches node = new Catches(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(95/*catches*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 243: // tryStatement ::= TRY block finally { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; TryStatement node = new TryStatement(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(94/*tryStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 242: // tryStatement ::= TRY block catches finally { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; TryStatement node = new TryStatement(0,0); node.addChild(e1); node.addChild(e2); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(94/*tryStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 241: // tryStatement ::= TRY block catches { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; TryStatement node = new TryStatement(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(94/*tryStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 240: // synchronizedStatement ::= SYNCHRONIZED LP expression RP block { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; SynchronizedStatement node = new SynchronizedStatement(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(93/*synchronizedStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 239: // throwStatement ::= THROW expression SEMIC { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; ThrowStatement node = new ThrowStatement(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(92/*throwStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 238: // returnStatement ::= RETURN SEMIC { TreeNode RESULT = null; ReturnStatement node = new ReturnStatement(0,0); RESULT = node; CUP$parser$result = new Symbol(91/*returnStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 237: // returnStatement ::= RETURN expression SEMIC { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; ReturnStatement node = new ReturnStatement(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(91/*returnStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 236: // continueStatement ::= CONTINUE SEMIC { TreeNode RESULT = null; ContinueStatement node = new ContinueStatement(null,0,0); RESULT = node; CUP$parser$result = new Symbol(90/*continueStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 235: // continueStatement ::= CONTINUE ID SEMIC { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; String e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; ContinueStatement node = new ContinueStatement(e1.toString(),0,0); RESULT = node; CUP$parser$result = new Symbol(90/*continueStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 234: // breakStatement ::= BREAK SEMIC { TreeNode RESULT = null; BreakStatement node = new BreakStatement(null,0,0); RESULT = node; CUP$parser$result = new Symbol(89/*breakStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 233: // breakStatement ::= BREAK ID SEMIC { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; String e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; BreakStatement node = new BreakStatement(e1.toString(),0,0); RESULT = node; CUP$parser$result = new Symbol(89/*breakStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 232: // statementExpressionList ::= statementExpressionList COMMA statementExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; StatementExpression node = new StatementExpression(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(88/*statementExpressionList*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 231: // statementExpressionList ::= statementExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; StatementExpression node = new StatementExpression(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(88/*statementExpressionList*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 230: // forUpdate ::= statementExpressionList { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ForUpdate node = new ForUpdate(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(87/*forUpdate*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 229: // forInit ::= localVariableDeclaration { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ForInit node = new ForInit(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(86/*forInit*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 228: // forInit ::= statementExpressionList { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ForInit node = new ForInit(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(86/*forInit*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 227: // forStatementNoShortIf ::= FOR LP SEMIC SEMIC RP statementNoShortIf { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ForStatementNoShortIf node = new ForStatementNoShortIf(0,0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(85/*forStatementNoShortIf*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 226: // forStatementNoShortIf ::= FOR LP SEMIC SEMIC forUpdate RP statementNoShortIf { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ForStatementNoShortIf node = new ForStatementNoShortIf(0,0,1); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(85/*forStatementNoShortIf*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 225: // forStatementNoShortIf ::= FOR LP SEMIC expression SEMIC RP statementNoShortIf { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ForStatementNoShortIf node = new ForStatementNoShortIf(0,0,2); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(85/*forStatementNoShortIf*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 224: // forStatementNoShortIf ::= FOR LP forInit SEMIC SEMIC RP statementNoShortIf { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-4)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ForStatementNoShortIf node = new ForStatementNoShortIf(0,0,4); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(85/*forStatementNoShortIf*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 223: // forStatementNoShortIf ::= FOR LP SEMIC expression SEMIC forUpdate RP statementNoShortIf { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-4)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ForStatementNoShortIf node = new ForStatementNoShortIf(0,0,3); node.addChild(e1); node.addChild(e2); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(85/*forStatementNoShortIf*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 222: // forStatementNoShortIf ::= FOR LP forInit SEMIC SEMIC forUpdate RP statementNoShortIf { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-5)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ForStatementNoShortIf node = new ForStatementNoShortIf(0,0,5); node.addChild(e1); node.addChild(e2); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(85/*forStatementNoShortIf*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 221: // forStatementNoShortIf ::= FOR LP forInit SEMIC expression SEMIC RP statementNoShortIf { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-5)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ForStatementNoShortIf node = new ForStatementNoShortIf(0,0,6); node.addChild(e1); node.addChild(e2); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(85/*forStatementNoShortIf*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 220: // forStatementNoShortIf ::= FOR LP forInit SEMIC expression SEMIC forUpdate RP statementNoShortIf { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-6)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-4)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e4left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e4right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e4 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ForStatementNoShortIf node = new ForStatementNoShortIf(0,0,7); node.addChild(e1); node.addChild(e2); node.addChild(e3); node.addChild(e4); RESULT = node; CUP$parser$result = new Symbol(85/*forStatementNoShortIf*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-8)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 219: // forStatement ::= FOR LP SEMIC SEMIC RP statement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ForStatement node = new ForStatement(0,0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(84/*forStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 218: // forStatement ::= FOR LP SEMIC SEMIC forUpdate RP statement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ForStatement node = new ForStatement(0,0,1); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(84/*forStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 217: // forStatement ::= FOR LP SEMIC expression SEMIC RP statement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ForStatement node = new ForStatement(0,0,2); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(84/*forStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 216: // forStatement ::= FOR LP forInit SEMIC SEMIC RP statement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-4)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ForStatement node = new ForStatement(0,0,4); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(84/*forStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 215: // forStatement ::= FOR LP SEMIC expression SEMIC forUpdate RP statement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-4)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ForStatement node = new ForStatement(0,0,3); node.addChild(e1); node.addChild(e2); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(84/*forStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 214: // forStatement ::= FOR LP forInit SEMIC SEMIC forUpdate RP statement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-5)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ForStatement node = new ForStatement(0,0,5); node.addChild(e1); node.addChild(e2); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(84/*forStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 213: // forStatement ::= FOR LP forInit SEMIC expression SEMIC RP statement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-5)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ForStatement node = new ForStatement(0,0,6); node.addChild(e1); node.addChild(e2); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(84/*forStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 212: // forStatement ::= FOR LP forInit SEMIC expression SEMIC forUpdate RP statement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-6)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-4)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e4left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e4right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e4 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ForStatement node = new ForStatement(0,0,7); node.addChild(e1); node.addChild(e2); node.addChild(e3); node.addChild(e4); RESULT = node; CUP$parser$result = new Symbol(84/*forStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-8)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 211: // doStatement ::= DO statement WHILE LP expression RP SEMIC { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-5)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; DoStatement node = new DoStatement(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(83/*doStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 210: // whileStatementNoShortIf ::= WHILE LP expression RP statementNoShortIf { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; WhileStatementNoShortIf node = new WhileStatementNoShortIf(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(82/*whileStatementNoShortIf*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 209: // whileStatement ::= WHILE LP expression RP statement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; SwitchLabels node = new SwitchLabels(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(81/*whileStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 208: // switchLabel ::= DEFAULT COLON { TreeNode RESULT = null; SwitchLabels node = new SwitchLabels(0,0); RESULT = node; CUP$parser$result = new Symbol(80/*switchLabel*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 207: // switchLabel ::= CASE constantExpression COLON { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; SwitchLabels node = new SwitchLabels(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(80/*switchLabel*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 206: // switchLabels ::= switchLabels switchLabel { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; SwitchLabels node = new SwitchLabels(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(79/*switchLabels*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 205: // switchLabels ::= switchLabel { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; SwitchLabels node = new SwitchLabels(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(79/*switchLabels*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 204: // switchBlockStatementGroup ::= switchLabels blockStatements { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; SwitchBlockStatementGroup node = new SwitchBlockStatementGroup(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(78/*switchBlockStatementGroup*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 203: // switchBlockStatementGroups ::= switchBlockStatementGroups switchBlockStatementGroup { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; SwitchBlockStatementGroups node = new SwitchBlockStatementGroups(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(77/*switchBlockStatementGroups*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 202: // switchBlockStatementGroups ::= switchBlockStatementGroup { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; SwitchBlockStatementGroups node = new SwitchBlockStatementGroups(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(77/*switchBlockStatementGroups*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 201: // switchBlock ::= LB RB { TreeNode RESULT = null; SwitchStatement node = new SwitchStatement(0,0); RESULT = node; CUP$parser$result = new Symbol(76/*switchBlock*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 200: // switchBlock ::= LB switchLabels RB { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; SwitchStatement node = new SwitchStatement(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(76/*switchBlock*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 199: // switchBlock ::= LB switchBlockStatementGroups RB { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; SwitchStatement node = new SwitchStatement(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(76/*switchBlock*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 198: // switchBlock ::= LB switchBlockStatementGroups switchLabels RB { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; SwitchStatement node = new SwitchStatement(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(76/*switchBlock*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 197: // switchStatement ::= SWITCH LP expression RP switchBlock { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; SwitchStatement node = new SwitchStatement(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(75/*switchStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 196: // statementExpression ::= classInstanceCreationExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; StatementExpression node = new StatementExpression(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(74/*statementExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 195: // statementExpression ::= methodInvocation { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; StatementExpression node = new StatementExpression(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(74/*statementExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 194: // statementExpression ::= postDecrementExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; StatementExpression node = new StatementExpression(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(74/*statementExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 193: // statementExpression ::= postIncrementExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; StatementExpression node = new StatementExpression(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(74/*statementExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 192: // statementExpression ::= preDecrementExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; StatementExpression node = new StatementExpression(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(74/*statementExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 191: // statementExpression ::= preIncrementExpression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; StatementExpression node = new StatementExpression(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(74/*statementExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 190: // statementExpression ::= assignment { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; StatementExpression node = new StatementExpression(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(74/*statementExpression*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 189: // expressionStatement ::= statementExpression SEMIC { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; ExpressionStatement node = new ExpressionStatement(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(73/*expressionStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 188: // labeledStatementNoShortIf ::= ID COLON statementNoShortIf { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; String e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; LabeledStatementNoShortIf node = new LabeledStatementNoShortIf(e1.toString(),0,0); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(72/*labeledStatementNoShortIf*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 187: // labeledStatement ::= ID COLON statement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; String e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; LabeledStatement node = new LabeledStatement(e1.toString(),0,0); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(71/*labeledStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 186: // emptyStatement ::= SEMIC { TreeNode RESULT = null; EmptyStatement node = new EmptyStatement(0,0); RESULT = node; CUP$parser$result = new Symbol(70/*emptyStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 185: // ifThenElseStatementNoShortIf ::= IF LP expression RP statementNoShortIf ELSE statementNoShortIf { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-4)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; IfThenElseStatementNoShortIf node = new IfThenElseStatementNoShortIf(0,0); node.addChild(e1); node.addChild(e2); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(69/*ifThenElseStatementNoShortIf*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 184: // ifThenElseStatement ::= IF LP expression RP statementNoShortIf ELSE statement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-4)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; IfThenElseStatement node = new IfThenElseStatement(0,0); node.addChild(e1); node.addChild(e2); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(68/*ifThenElseStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 183: // ifThenStatement ::= IF LP expression RP statement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; IfThenStatement node = new IfThenStatement(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(67/*ifThenStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 182: // statementWithoutTrailingSubstatement ::= tryStatement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; StatementWithoutTrailingSubstatement node = new StatementWithoutTrailingSubstatement(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(66/*statementWithoutTrailingSubstatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 181: // statementWithoutTrailingSubstatement ::= throwStatement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; StatementWithoutTrailingSubstatement node = new StatementWithoutTrailingSubstatement(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(66/*statementWithoutTrailingSubstatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 180: // statementWithoutTrailingSubstatement ::= synchronizedStatement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; StatementWithoutTrailingSubstatement node = new StatementWithoutTrailingSubstatement(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(66/*statementWithoutTrailingSubstatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 179: // statementWithoutTrailingSubstatement ::= returnStatement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; StatementWithoutTrailingSubstatement node = new StatementWithoutTrailingSubstatement(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(66/*statementWithoutTrailingSubstatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 178: // statementWithoutTrailingSubstatement ::= continueStatement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; StatementWithoutTrailingSubstatement node = new StatementWithoutTrailingSubstatement(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(66/*statementWithoutTrailingSubstatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 177: // statementWithoutTrailingSubstatement ::= breakStatement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; StatementWithoutTrailingSubstatement node = new StatementWithoutTrailingSubstatement(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(66/*statementWithoutTrailingSubstatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 176: // statementWithoutTrailingSubstatement ::= doStatement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; StatementWithoutTrailingSubstatement node = new StatementWithoutTrailingSubstatement(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(66/*statementWithoutTrailingSubstatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 175: // statementWithoutTrailingSubstatement ::= switchStatement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; StatementWithoutTrailingSubstatement node = new StatementWithoutTrailingSubstatement(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(66/*statementWithoutTrailingSubstatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 174: // statementWithoutTrailingSubstatement ::= expressionStatement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; StatementWithoutTrailingSubstatement node = new StatementWithoutTrailingSubstatement(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(66/*statementWithoutTrailingSubstatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 173: // statementWithoutTrailingSubstatement ::= emptyStatement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; StatementWithoutTrailingSubstatement node = new StatementWithoutTrailingSubstatement(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(66/*statementWithoutTrailingSubstatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 172: // statementWithoutTrailingSubstatement ::= block { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; StatementWithoutTrailingSubstatement node = new StatementWithoutTrailingSubstatement(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(66/*statementWithoutTrailingSubstatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 171: // statementNoShortIf ::= forStatementNoShortIf { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; StatementNoShortIf node = new StatementNoShortIf(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(65/*statementNoShortIf*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 170: // statementNoShortIf ::= whileStatementNoShortIf { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; StatementNoShortIf node = new StatementNoShortIf(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(65/*statementNoShortIf*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 169: // statementNoShortIf ::= ifThenElseStatementNoShortIf { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; StatementNoShortIf node = new StatementNoShortIf(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(65/*statementNoShortIf*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 168: // statementNoShortIf ::= labeledStatementNoShortIf { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; StatementNoShortIf node = new StatementNoShortIf(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(65/*statementNoShortIf*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 167: // statementNoShortIf ::= statementWithoutTrailingSubstatement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; StatementNoShortIf node = new StatementNoShortIf(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(65/*statementNoShortIf*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 166: // statement ::= forStatement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Statement node = new Statement(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(64/*statement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 165: // statement ::= whileStatement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Statement node = new Statement(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(64/*statement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 164: // statement ::= ifThenElseStatement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Statement node = new Statement(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(64/*statement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 163: // statement ::= ifThenStatement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Statement node = new Statement(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(64/*statement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 162: // statement ::= labeledStatement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Statement node = new Statement(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(64/*statement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 161: // statement ::= statementWithoutTrailingSubstatement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Statement node = new Statement(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(64/*statement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 160: // localVariableDeclaration ::= type variableDeclarators { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; LocalVariableDeclaration node = new LocalVariableDeclaration(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(63/*localVariableDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 159: // localVariableDeclarationStatement ::= localVariableDeclaration SEMIC { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; LocalVariableDeclarationStatement node = new LocalVariableDeclarationStatement(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(62/*localVariableDeclarationStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 158: // blockStatement ::= classDeclaration { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; BlockStatement node = new BlockStatement(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(61/*blockStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 157: // blockStatement ::= statement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; BlockStatement node = new BlockStatement(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(61/*blockStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 156: // blockStatement ::= localVariableDeclarationStatement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; BlockStatement node = new BlockStatement(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(61/*blockStatement*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 155: // blockStatements ::= blockStatements blockStatement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; BlockStatements node = new BlockStatements(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(60/*blockStatements*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 154: // blockStatements ::= blockStatement { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; BlockStatements node = new BlockStatements(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(60/*blockStatements*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 153: // block ::= LB RB { TreeNode RESULT = null; Block node = new Block(0,0); RESULT = node; CUP$parser$result = new Symbol(59/*block*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 152: // block ::= LB blockStatements RB { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; Block node = new Block(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(59/*block*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 151: // arrayType ::= arrayType LS RS { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; ArrayType node = new ArrayType(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(58/*arrayType*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 150: // arrayType ::= name LS RS { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; ArrayType node = new ArrayType(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(58/*arrayType*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 149: // arrayType ::= primitiveType LS RS { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; ArrayType node = new ArrayType(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(58/*arrayType*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 148: // interfaceType ::= classOrInterfaceType { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; InterfaceType node = new InterfaceType(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(57/*interfaceType*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 147: // classType ::= classOrInterfaceType { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ClassType node = new ClassType(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(56/*classType*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 146: // classOrInterfaceType ::= name { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ClassOrInterfaceType node = new ClassOrInterfaceType(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(55/*classOrInterfaceType*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 145: // referenceType ::= arrayType { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ReferenceType node = new ReferenceType(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(54/*referenceType*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 144: // referenceType ::= classOrInterfaceType { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ReferenceType node = new ReferenceType(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(54/*referenceType*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 143: // floatingPointType ::= DOUBLE { TreeNode RESULT = null; FloatingPointType node = new FloatingPointType(0,0,"double"); RESULT = node; CUP$parser$result = new Symbol(53/*floatingPointType*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 142: // floatingPointType ::= FLOAT { TreeNode RESULT = null; FloatingPointType node = new FloatingPointType(0,0,"float"); RESULT = node; CUP$parser$result = new Symbol(53/*floatingPointType*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 141: // integralType ::= CHAR { TreeNode RESULT = null; IntegralType node = new IntegralType(0,0,"char"); RESULT = node; CUP$parser$result = new Symbol(52/*integralType*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 140: // integralType ::= LONG { TreeNode RESULT = null; IntegralType node = new IntegralType(0,0,"long"); RESULT = node; CUP$parser$result = new Symbol(52/*integralType*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 139: // integralType ::= INT { TreeNode RESULT = null; IntegralType node = new IntegralType(0,0,"int"); RESULT = node; CUP$parser$result = new Symbol(52/*integralType*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 138: // integralType ::= SHORT { TreeNode RESULT = null; IntegralType node = new IntegralType(0,0,"short"); RESULT = node; CUP$parser$result = new Symbol(52/*integralType*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 137: // integralType ::= BYTE { TreeNode RESULT = null; IntegralType node = new IntegralType(0,0,"byte"); RESULT = node; CUP$parser$result = new Symbol(52/*integralType*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 136: // numericType ::= floatingPointType { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; NumericType node = new NumericType(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(51/*numericType*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 135: // numericType ::= integralType { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; NumericType node = new NumericType(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(51/*numericType*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 134: // primitiveType ::= BOOLEAN { TreeNode RESULT = null; PrimitiveType node = new PrimitiveType(0,0,"boolean"); RESULT = node; CUP$parser$result = new Symbol(50/*primitiveType*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 133: // primitiveType ::= numericType { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; PrimitiveType node = new PrimitiveType(0,0,e1.toString()); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(50/*primitiveType*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 132: // type ::= referenceType { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Type node = new Type(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(49/*type*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 131: // type ::= primitiveType { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Type node = new Type(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(49/*type*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 130: // variableInitializers ::= variableInitializers COMMA variableInitializer { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; VariableInitializers node = new VariableInitializers(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(48/*variableInitializers*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 129: // variableInitializers ::= variableInitializer { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; VariableInitializers node = new VariableInitializers(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(48/*variableInitializers*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 128: // arrayInitializer ::= LB RB { TreeNode RESULT = null; ArrayInitializer node = new ArrayInitializer(0,0); node.setHasLastComma(false); RESULT = node; CUP$parser$result = new Symbol(47/*arrayInitializer*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 127: // arrayInitializer ::= LB COMMA RB { TreeNode RESULT = null; ArrayInitializer node = new ArrayInitializer(0,0); node.setHasLastComma(true); RESULT = node; CUP$parser$result = new Symbol(47/*arrayInitializer*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 126: // arrayInitializer ::= LB variableInitializers RB { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; ArrayInitializer node = new ArrayInitializer(0,0); node.setHasLastComma(false); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(47/*arrayInitializer*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 125: // arrayInitializer ::= LB variableInitializers COMMA RB { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; ArrayInitializer node = new ArrayInitializer(0,0); node.setHasLastComma(true); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(47/*arrayInitializer*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 124: // abstractMethodDeclaration ::= methodHeader SEMIC { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; AbstractMethodDeclaration node = new AbstractMethodDeclaration(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(46/*abstractMethodDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 123: // constantDeclaration ::= fieldDeclaration { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ConstantDeclaration node = new ConstantDeclaration(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(45/*constantDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 122: // interfaceMemberDeclaration ::= interfaceDeclaration { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; InterfaceMemberDeclaration node = new InterfaceMemberDeclaration(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(44/*interfaceMemberDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 121: // interfaceMemberDeclaration ::= classDeclaration { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; InterfaceMemberDeclaration node = new InterfaceMemberDeclaration(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(44/*interfaceMemberDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 120: // interfaceMemberDeclaration ::= abstractMethodDeclaration { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; InterfaceMemberDeclaration node = new InterfaceMemberDeclaration(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(44/*interfaceMemberDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 119: // interfaceMemberDeclaration ::= constantDeclaration { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; InterfaceMemberDeclaration node = new InterfaceMemberDeclaration(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(44/*interfaceMemberDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 118: // interfaceMemberDeclarations ::= interfaceMemberDeclarations interfaceMemberDeclaration { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; InterfaceMemberDeclarations node = new InterfaceMemberDeclarations(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(43/*interfaceMemberDeclarations*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 117: // interfaceMemberDeclarations ::= interfaceMemberDeclaration { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; InterfaceMemberDeclarations node = new InterfaceMemberDeclarations(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(43/*interfaceMemberDeclarations*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 116: // interfaceBody ::= LB RB { TreeNode RESULT = null; InterfaceBody node = new InterfaceBody(0,0); RESULT = node; CUP$parser$result = new Symbol(42/*interfaceBody*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 115: // interfaceBody ::= LB interfaceMemberDeclarations RB { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; InterfaceBody node = new InterfaceBody(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(42/*interfaceBody*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 114: // extendsInterfaces ::= extendsInterfaces COMMA interfaceType { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ExtendsInterfaces node = new ExtendsInterfaces(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(41/*extendsInterfaces*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 113: // extendsInterfaces ::= EXTENDS interfaceType { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ExtendsInterfaces node = new ExtendsInterfaces(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(41/*extendsInterfaces*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 112: // interfaceDeclaration ::= INTERFACE ID interfaceBody { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; String e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; InterfaceDeclaration node = new InterfaceDeclaration(e1.toString(),0,0,0); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(40/*interfaceDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 111: // interfaceDeclaration ::= INTERFACE ID extendsInterfaces interfaceBody { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; String e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; InterfaceDeclaration node = new InterfaceDeclaration(e1.toString(),0,0,1); node.addChild(e2); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(40/*interfaceDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 110: // interfaceDeclaration ::= modifiers INTERFACE ID interfaceBody { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; String e2 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; InterfaceDeclaration node = new InterfaceDeclaration(e2.toString(),0,0,2); node.addChild(e1); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(40/*interfaceDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 109: // interfaceDeclaration ::= modifiers INTERFACE ID extendsInterfaces interfaceBody { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-4)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; String e2 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e4left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e4right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e4 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; InterfaceDeclaration node = new InterfaceDeclaration(e2.toString(),0,0,3); node.addChild(e1); node.addChild(e3); node.addChild(e4); RESULT = node; CUP$parser$result = new Symbol(40/*interfaceDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 108: // explicitConstructorInvocation ::= primary DOT SUPER LP RP SEMIC { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-5)).value; ExplicitConstructorInvocation node = new ExplicitConstructorInvocation(0,0,false,"super",true); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(39/*explicitConstructorInvocation*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 107: // explicitConstructorInvocation ::= primary DOT SUPER LP argumentList RP SEMIC { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-6)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; ExplicitConstructorInvocation node = new ExplicitConstructorInvocation(0,0,true,"super",true); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(39/*explicitConstructorInvocation*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 106: // explicitConstructorInvocation ::= SUPER LP RP SEMIC { TreeNode RESULT = null; ExplicitConstructorInvocation node = new ExplicitConstructorInvocation(0,0,false,"super",false); RESULT = node; CUP$parser$result = new Symbol(39/*explicitConstructorInvocation*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 105: // explicitConstructorInvocation ::= SUPER LP argumentList RP SEMIC { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; ExplicitConstructorInvocation node = new ExplicitConstructorInvocation(0,0,true,"super",false); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(39/*explicitConstructorInvocation*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 104: // explicitConstructorInvocation ::= THIS LP RP SEMIC { TreeNode RESULT = null; ExplicitConstructorInvocation node = new ExplicitConstructorInvocation(0,0,false,"this",false); RESULT = node; CUP$parser$result = new Symbol(39/*explicitConstructorInvocation*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 103: // explicitConstructorInvocation ::= THIS LP argumentList RP SEMIC { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; ExplicitConstructorInvocation node = new ExplicitConstructorInvocation(0,0,true,"this",false); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(39/*explicitConstructorInvocation*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 102: // constructorBody ::= LB RB { TreeNode RESULT = null; ConstructorBody node = new ConstructorBody(0,0); RESULT = node; CUP$parser$result = new Symbol(38/*constructorBody*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 101: // constructorBody ::= LB blockStatement RB { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; ConstructorBody node = new ConstructorBody(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(38/*constructorBody*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 100: // constructorBody ::= LB explicitConstructorInvocation RB { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; ConstructorBody node = new ConstructorBody(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(38/*constructorBody*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 99: // constructorBody ::= LB explicitConstructorInvocation blockStatements RB { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; ConstructorBody node = new ConstructorBody(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(38/*constructorBody*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 98: // constructorDeclarator ::= simpleName LP RP { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; ConstructorDeclarator node = new ConstructorDeclarator(0,0,false); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(37/*constructorDeclarator*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 97: // constructorDeclarator ::= simpleName LP formalParameterList RP { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; ConstructorDeclarator node = new ConstructorDeclarator(0,0,true); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(37/*constructorDeclarator*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 96: // constructorDeclaration ::= constructorDeclarator constructorBody { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ConstructorDeclaration node = new ConstructorDeclaration(0,0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(36/*constructorDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 95: // constructorDeclaration ::= constructorDeclarator throws constructorBody { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ConstructorDeclaration node = new ConstructorDeclaration(0,0,1); node.addChild(e1); node.addChild(e2); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(36/*constructorDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 94: // constructorDeclaration ::= modifiers constructorDeclarator constructorBody { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ConstructorDeclaration node = new ConstructorDeclaration(0,0,2); node.addChild(e1); node.addChild(e2); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(36/*constructorDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 93: // constructorDeclaration ::= modifiers constructorDeclarator throws constructorBody { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e4left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e4right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e4 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ConstructorDeclaration node = new ConstructorDeclaration(0,0,3); node.addChild(e1); node.addChild(e2); node.addChild(e3); node.addChild(e4); RESULT = node; CUP$parser$result = new Symbol(36/*constructorDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 92: // staticInitializer ::= STATIC block { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; StaticInitializer node = new StaticInitializer(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(35/*staticInitializer*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 91: // methodBody ::= SEMIC { TreeNode RESULT = null; MethodBody node = new MethodBody(0,0); RESULT = node; CUP$parser$result = new Symbol(34/*methodBody*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 90: // methodBody ::= block { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; MethodBody node = new MethodBody(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(34/*methodBody*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 89: // classTypeList ::= classTypeList COMMA classType { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ClassTypeList node = new ClassTypeList(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(33/*classTypeList*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 88: // classTypeList ::= classType { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ClassTypeList node = new ClassTypeList(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(33/*classTypeList*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 87: // throws ::= THROWS classTypeList { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Throws node = new Throws(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(32/*throws*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 86: // formalParameter ::= modifiers type variableDeclaratorId { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; FormalParameter node = new FormalParameter(0,0); node.addChild(e1); node.addChild(e2); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(31/*formalParameter*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 85: // formalParameter ::= type variableDeclaratorId { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; FormalParameter node = new FormalParameter(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(31/*formalParameter*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 84: // formalParameterList ::= formalParameter { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; FormalParameterList node = new FormalParameterList(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(30/*formalParameterList*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 83: // formalParameterList ::= formalParameterList COMMA formalParameter { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; FormalParameterList node = new FormalParameterList(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(30/*formalParameterList*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 82: // methodDeclarator ::= methodDeclarator LS RS { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; MethodDeclarator node = new MethodDeclarator(null,0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(29/*methodDeclarator*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 81: // methodDeclarator ::= ID LP RP { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; String e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; MethodDeclarator node = new MethodDeclarator(e1.toString(),0,0); RESULT = node; CUP$parser$result = new Symbol(29/*methodDeclarator*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 80: // methodDeclarator ::= ID LP formalParameterList RP { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; String e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; MethodDeclarator node = new MethodDeclarator(e1.toString(),0,0); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(29/*methodDeclarator*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 79: // methodHeader ::= VOID methodDeclarator { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; MethodHeader node = new MethodHeader(0,0,0,true); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(28/*methodHeader*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 78: // methodHeader ::= VOID methodDeclarator throws { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; MethodHeader node = new MethodHeader(0,0,1,true); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(28/*methodHeader*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 77: // methodHeader ::= modifiers VOID methodDeclarator { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; MethodHeader node = new MethodHeader(0,0,2,true); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(28/*methodHeader*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 76: // methodHeader ::= modifiers VOID methodDeclarator throws { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; MethodHeader node = new MethodHeader(0,0,3,true); node.addChild(e1); node.addChild(e2); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(28/*methodHeader*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 75: // methodHeader ::= type methodDeclarator { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; MethodHeader node = new MethodHeader(0,0,0,false); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(28/*methodHeader*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 74: // methodHeader ::= type methodDeclarator throws { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; MethodHeader node = new MethodHeader(0,0,1,false); node.addChild(e1); node.addChild(e2); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(28/*methodHeader*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 73: // methodHeader ::= modifiers type methodDeclarator { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; MethodHeader node = new MethodHeader(0,0,2,false); node.addChild(e1); node.addChild(e2); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(28/*methodHeader*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 72: // methodHeader ::= modifiers type methodDeclarator throws { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e4left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e4right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e4 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; MethodHeader node = new MethodHeader(0,0,3,false); node.addChild(e1); node.addChild(e2); node.addChild(e3); node.addChild(e4); RESULT = node; CUP$parser$result = new Symbol(28/*methodHeader*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 71: // methodDeclaration ::= methodHeader methodBody { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; MethodDeclaration node = new MethodDeclaration(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(27/*methodDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 70: // variableInitializer ::= arrayInitializer { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; VariableInitializer node = new VariableInitializer(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(26/*variableInitializer*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 69: // variableInitializer ::= expression { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; VariableInitializer node = new VariableInitializer(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(26/*variableInitializer*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 68: // variableDeclaratorId ::= variableDeclaratorId LS RS { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; VariableDeclaratorId node = new VariableDeclaratorId(null,0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(25/*variableDeclaratorId*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 67: // variableDeclaratorId ::= ID { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; String e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; VariableDeclaratorId node = new VariableDeclaratorId(e1.toString(),0,0); RESULT = node; CUP$parser$result = new Symbol(25/*variableDeclaratorId*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 66: // variableDeclarator ::= variableDeclaratorId ASSIGN variableInitializer { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; VariableDeclarator node = new VariableDeclarator(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(24/*variableDeclarator*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 65: // variableDeclarator ::= variableDeclaratorId { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; VariableDeclarator node = new VariableDeclarator(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(24/*variableDeclarator*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 64: // variableDeclarators ::= variableDeclarators COMMA variableDeclarator { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; VariableDeclarators node = new VariableDeclarators(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(23/*variableDeclarators*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 63: // variableDeclarators ::= variableDeclarator { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; VariableDeclarators node = new VariableDeclarators(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(23/*variableDeclarators*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 62: // fieldDeclaration ::= type variableDeclarators SEMIC { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; FieldDeclaration node = new FieldDeclaration(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(22/*fieldDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 61: // fieldDeclaration ::= modifiers type variableDeclarators SEMIC { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; FieldDeclaration node = new FieldDeclaration(0,0); node.addChild(e1); node.addChild(e2); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(22/*fieldDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 60: // classMemberDeclaration ::= interfaceDeclaration { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ClassMemberDeclaration node = new ClassMemberDeclaration(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(21/*classMemberDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 59: // classMemberDeclaration ::= classDeclaration { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ClassMemberDeclaration node = new ClassMemberDeclaration(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(21/*classMemberDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 58: // classMemberDeclaration ::= methodDeclaration { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ClassMemberDeclaration node = new ClassMemberDeclaration(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(21/*classMemberDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 57: // classMemberDeclaration ::= fieldDeclaration { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ClassMemberDeclaration node = new ClassMemberDeclaration(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(21/*classMemberDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 56: // classBodyDeclaration ::= block { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ClassBodyDeclaration node = new ClassBodyDeclaration(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(20/*classBodyDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 55: // classBodyDeclaration ::= constructorDeclaration { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ClassBodyDeclaration node = new ClassBodyDeclaration(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(20/*classBodyDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 54: // classBodyDeclaration ::= staticInitializer { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ClassBodyDeclaration node = new ClassBodyDeclaration(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(20/*classBodyDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 53: // classBodyDeclaration ::= classMemberDeclaration { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ClassBodyDeclaration node = new ClassBodyDeclaration(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(20/*classBodyDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 52: // classBodyDeclarations ::= classBodyDeclarations classBodyDeclaration { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ClassBodyDeclarations node = new ClassBodyDeclarations(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(19/*classBodyDeclarations*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 51: // classBodyDeclarations ::= classBodyDeclaration { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ClassBodyDeclarations node = new ClassBodyDeclarations(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(19/*classBodyDeclarations*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 50: // classBody ::= LB RB { TreeNode RESULT = null; ClassBody node = new ClassBody(0,0); RESULT = node; CUP$parser$result = new Symbol(18/*classBody*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 49: // classBody ::= LB classBodyDeclarations RB { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; ClassBody node = new ClassBody(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(18/*classBody*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 48: // interfaceTypeList ::= interfaceTypeList COMMA interfaceType { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; InterfaceTypeList node = new InterfaceTypeList(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(17/*interfaceTypeList*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 47: // interfaceTypeList ::= interfaceType { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; InterfaceTypeList node = new InterfaceTypeList(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(17/*interfaceTypeList*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 46: // interfaces ::= IMPLEMENTS interfaceTypeList { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Interfaces node = new Interfaces(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(16/*interfaces*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 45: // super ::= EXTENDS classType { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Super node = new Super(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(15/*super*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 44: // modifier ::= SYNCHRONIZED { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Object e1 = (Object)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Modifier node = new Modifier(e1.toString(),0,0); RESULT = node; CUP$parser$result = new Symbol(14/*modifier*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 43: // modifier ::= NATIVE { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Object e1 = (Object)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Modifier node = new Modifier(e1.toString(),0,0); RESULT = node; CUP$parser$result = new Symbol(14/*modifier*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 42: // modifier ::= ABSTRACT { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Object e1 = (Object)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Modifier node = new Modifier(e1.toString(),0,0); RESULT = node; CUP$parser$result = new Symbol(14/*modifier*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 41: // modifier ::= VOLATILE { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Object e1 = (Object)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Modifier node = new Modifier(e1.toString(),0,0); RESULT = node; CUP$parser$result = new Symbol(14/*modifier*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 40: // modifier ::= TRANSIENT { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Object e1 = (Object)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Modifier node = new Modifier(e1.toString(),0,0); RESULT = node; CUP$parser$result = new Symbol(14/*modifier*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 39: // modifier ::= FINAL { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Object e1 = (Object)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Modifier node = new Modifier(e1.toString(),0,0); RESULT = node; CUP$parser$result = new Symbol(14/*modifier*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 38: // modifier ::= STATIC { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Object e1 = (Object)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Modifier node = new Modifier(e1.toString(),0,0); RESULT = node; CUP$parser$result = new Symbol(14/*modifier*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 37: // modifier ::= PRIVATE { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Object e1 = (Object)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Modifier node = new Modifier(e1.toString(),0,0); RESULT = node; CUP$parser$result = new Symbol(14/*modifier*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 36: // modifier ::= PROTECTED { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Object e1 = (Object)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Modifier node = new Modifier(e1.toString(),0,0); RESULT = node; CUP$parser$result = new Symbol(14/*modifier*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 35: // modifier ::= PUBLIC { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; Object e1 = (Object)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Modifier node = new Modifier(e1.toString(),0,0); RESULT = node; CUP$parser$result = new Symbol(14/*modifier*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 34: // modifiers ::= modifiers modifier { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Modifiers node = new Modifiers(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(13/*modifiers*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 33: // modifiers ::= modifier { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Modifiers node = new Modifiers(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(13/*modifiers*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 32: // classDeclaration ::= CLASS ID classBody { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; String e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ClassDeclaration node = new ClassDeclaration(e1.toString(),0,0,0); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(12/*classDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 31: // classDeclaration ::= CLASS ID interfaces classBody { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; String e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ClassDeclaration node = new ClassDeclaration(e1.toString(),0,0,1); node.addChild(e2); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(12/*classDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 30: // classDeclaration ::= CLASS ID super classBody { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; String e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ClassDeclaration node = new ClassDeclaration(e1.toString(),0,0,2); node.addChild(e2); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(12/*classDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 29: // classDeclaration ::= modifiers CLASS ID classBody { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; String e2 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ClassDeclaration node = new ClassDeclaration(e2.toString(),0,0,4); node.addChild(e1); node.addChild(e3); RESULT = node; CUP$parser$result = new Symbol(12/*classDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 28: // classDeclaration ::= CLASS ID super interfaces classBody { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; String e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e4left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e4right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e4 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ClassDeclaration node = new ClassDeclaration(e1.toString(),0,0,3); node.addChild(e2); node.addChild(e3); node.addChild(e4); RESULT = node; CUP$parser$result = new Symbol(12/*classDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 27: // classDeclaration ::= modifiers CLASS ID interfaces classBody { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-4)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; String e2 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e4left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e4right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e4 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ClassDeclaration node = new ClassDeclaration(e2.toString(),0,0,5); node.addChild(e1); node.addChild(e3); node.addChild(e4); RESULT = node; CUP$parser$result = new Symbol(12/*classDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 26: // classDeclaration ::= modifiers CLASS ID super classBody { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-4)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; String e2 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e4left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e4right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e4 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ClassDeclaration node = new ClassDeclaration(e2.toString(),0,0,6); node.addChild(e1); node.addChild(e3); node.addChild(e4); RESULT = node; CUP$parser$result = new Symbol(12/*classDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 25: // classDeclaration ::= modifiers CLASS ID super interfaces classBody { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-5)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; String e2 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e4left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e4right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e4 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e5left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e5right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e5 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ClassDeclaration node = new ClassDeclaration(e2.toString(),0,0,7); node.addChild(e1); node.addChild(e3); node.addChild(e4); node.addChild(e5); RESULT = node; CUP$parser$result = new Symbol(12/*classDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 24: // typeDeclaration ::= SEMIC { TreeNode RESULT = null; TypeDeclaration node = new TypeDeclaration(0,0); RESULT = node; CUP$parser$result = new Symbol(11/*typeDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 23: // typeDeclaration ::= interfaceDeclaration { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; TypeDeclaration node = new TypeDeclaration(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(11/*typeDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 22: // typeDeclaration ::= classDeclaration { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; TypeDeclaration node = new TypeDeclaration(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(11/*typeDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 21: // typeDeclarations ::= typeDeclarations typeDeclaration { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; TypeDeclarations node = new TypeDeclarations(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(10/*typeDeclarations*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 20: // typeDeclarations ::= typeDeclaration { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; TypeDeclarations node = new TypeDeclarations(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(10/*typeDeclarations*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 19: // typeImportOnDemandDeclaration ::= IMPORT name DOT MUL SEMIC { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; TypeImportOnDemandDeclaration node = new TypeImportOnDemandDeclaration(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(9/*typeImportOnDemandDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 18: // singleTypeImportDeclaration ::= IMPORT name SEMIC { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; SingleTypeImportDeclaration node = new SingleTypeImportDeclaration(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(8/*singleTypeImportDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 17: // importDeclaration ::= typeImportOnDemandDeclaration { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ImportDeclaration node = new ImportDeclaration(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(7/*importDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 16: // importDeclaration ::= singleTypeImportDeclaration { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ImportDeclaration node = new ImportDeclaration(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(7/*importDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 15: // importDeclarations ::= importDeclarations importDeclaration { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ImportDeclarations node = new ImportDeclarations(0,0); node.addChild(e1); node.addChild(e2); RESULT = node; CUP$parser$result = new Symbol(6/*importDeclarations*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 14: // importDeclarations ::= importDeclaration { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; ImportDeclarations node = new ImportDeclarations(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(6/*importDeclarations*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 13: // qualifiedName ::= name DOT ID { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; String e2 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; //String s=e2.toString(); QualifiedName node=new QualifiedName(e2.toString(),0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(5/*qualifiedName*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 12: // simpleName ::= ID { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; String e1 = (String)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; RESULT = new SimpleName(e1.toString(),0,0); CUP$parser$result = new Symbol(4/*simpleName*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 11: // name ::= qualifiedName { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Name node=new Name(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(3/*name*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 10: // name ::= simpleName { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; Name node=new Name(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(3/*name*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 9: // packageDeclaration ::= PACKAGE name SEMIC { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; PackageDeclaration node=new PackageDeclaration(0,0); node.addChild(e1); RESULT = node; CUP$parser$result = new Symbol(2/*packageDeclaration*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 8: // compilationUnit ::= importDeclarations { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; CompilationUnit node = new CompilationUnit(0,0); node.addChild(e1,2); RESULT = node; CUP$parser$result = new Symbol(1/*compilationUnit*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 7: // compilationUnit ::= packageDeclaration { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; CompilationUnit node = new CompilationUnit(0,0); node.addChild(e1,1); RESULT = node; CUP$parser$result = new Symbol(1/*compilationUnit*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 6: // compilationUnit ::= packageDeclaration importDeclarations { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; CompilationUnit node = new CompilationUnit(0,0); node.addChild(e1,1); node.addChild(e2,2); RESULT = node; CUP$parser$result = new Symbol(1/*compilationUnit*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 5: // compilationUnit ::= typeDeclarations { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; CompilationUnit node = new CompilationUnit(0,0); node.addChild(e1,0); RESULT = node; CUP$parser$result = new Symbol(1/*compilationUnit*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 4: // compilationUnit ::= importDeclarations typeDeclarations { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; CompilationUnit node = new CompilationUnit(0,0); node.addChild(e1,2); node.addChild(e2,0); RESULT = node; CUP$parser$result = new Symbol(1/*compilationUnit*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 3: // compilationUnit ::= packageDeclaration typeDeclarations { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; CompilationUnit node = new CompilationUnit(0,0); node.addChild(e1,1); node.addChild(e2,0); RESULT = node; CUP$parser$result = new Symbol(1/*compilationUnit*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 2: // compilationUnit ::= packageDeclaration importDeclarations typeDeclarations { TreeNode RESULT = null; int e1left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int e1right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; TreeNode e1 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int e2left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int e2right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode e2 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int e3left = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left; int e3right = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right; TreeNode e3 = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value; CompilationUnit node = new CompilationUnit(0,0); node.addChild(e1,1); node.addChild(e2,2); node.addChild(e3,0); RESULT = node; CUP$parser$result = new Symbol(1/*compilationUnit*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 1: // $START ::= compilationUnit EOF { Object RESULT = null; int start_valleft = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int start_valright = ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; TreeNode start_val = (TreeNode)((Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; RESULT = start_val; CUP$parser$result = new Symbol(0/*$START*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } /* ACCEPT */ CUP$parser$parser.done_parsing(); return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 0: // compilationUnit ::= { TreeNode RESULT = null; CUP$parser$result = new Symbol(1/*compilationUnit*/, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT); } return CUP$parser$result; /* . . . . . .*/ default: throw new Exception( "Invalid action number found in internal parse table"); } } }
/****************************************************************************** * Purpose: Print the number of coupon without repeating any of the coupon * * @author <NAME> * @version 1.0 * @since 23-02-2018 * ******************************************************************************/ package com.bridgeit.functional; import com.bridgeit.utility.Utility; public class RandomNUmber { public static void main(String[] args) { Utility utility = new Utility(); System.out.println("Enter the number of coupon which should generate without repeating"); int totalcoupon = utility.inputInteger(); Utility.randomnonrepeating(totalcoupon); } }
/** * The basic implementation of DomainService. * <p/> * See /properties/domain/domain.xml */ public class ParameterServiceImpl implements ParameterService { /** * The serialization id. */ private static final long serialVersionUID = 2199606452890382789L; /** * {@link ParameterDaoService}. */ private ParameterDaoService daoService; /** * see {@link DomainService}. */ private DomainService domainService; /** * see {@link OrbeonService}. */ private OrbeonService orbeonService; /** * The list of bean typeConvocations. */ private List<TypeConvocation> typeConvocations; /** * The list of bean TypeContrat. */ private List<TypeContrat> typeContrats; /** * The list of bean TypeStatut. */ private List<TypeStatut> typeStatuts; /** * The list of bean TypeStatut. */ private List<TypeOrganisme> typeOrganismes; /** * The list of bean TypeStatut. */ private List<TypeSituation> typeSituations; /** * The default date de retour des dossiers. */ private String dateBackDefault; /** * The prefix pour le code d'un calendrier. */ private String prefixCodCalCmi; /** * The prefix. */ private String prefixLibCalCmi; /** * A logger. */ private final Logger log = new LoggerImpl(getClass()); /** * Bean constructor. */ public ParameterServiceImpl() { super(); } /** * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet() */ public void afterPropertiesSet() { Assert.notNull(this.daoService, "property daoService of class " + this.getClass().getName() + " can not be null"); Assert.notEmpty(this.typeConvocations, "property typeConvocations of class " + this.getClass().getName() + " can not be empty"); Assert.notEmpty(this.typeContrats, "property typeContrats of class " + this.getClass().getName() + " can not be empty"); Assert.notEmpty(this.typeStatuts, "property typeStatuts of class " + this.getClass().getName() + " can not be empty"); Assert.notEmpty(this.typeOrganismes, "property typeOrganismes of class " + this.getClass().getName() + " can not be empty"); Assert.notEmpty(this.typeSituations, "property typeSituations of class " + this.getClass().getName() + " can not be empty"); Assert.notNull(this.domainService, "property domainService of class " + this.getClass().getName() + " can not be null"); } // //////////////////////////////////////////////////////////// // Profile // //////////////////////////////////////////////////////////// @Override public void addProfile(final Profile profile) { if (log.isDebugEnabled()) { log.debug("entering addProfile( " + profile + " )"); } daoService.addProfile(profile); } @Override public void updateProfile(final Profile profile) { if (log.isDebugEnabled()) { log.debug("entering updateProfile( " + profile + " )"); } daoService.updateProfile(profile); } @Override public Profile getProfile(final Integer id, final String code) { if (log.isDebugEnabled()) { log.debug("entering getProfile( " + id + ", " + code + " )"); } return daoService.getProfile(id, code); } @Override public List<BeanProfile> getProfiles(final Boolean temEnSve) { if (log.isDebugEnabled()) log.debug("entering getProfiles( " + temEnSve + " )"); final List<Profile> l = daoService.getProfiles(temEnSve); return new ArrayList<>(array(l.toArray(new Profile[l.size()])) .map(new F<Profile, BeanProfile>() { public BeanProfile f(Profile p) { return new BeanProfile(p); } }) .toCollection()); } @Override public void deleteProfile(final Profile profile) { if (log.isDebugEnabled()) { log.debug("entering deleteProfile( " + profile + " )"); } daoService.deleteProfile(profile); } @Override public Boolean profileCodeIsUnique(final Profile profile) { if (log.isDebugEnabled()) { log.debug("entering profileCodeIsUnique( " + profile + " )"); } for (BeanProfile bp : getProfiles(null)) { Profile p = bp.getProfile(); if (!p.equals(profile) && p.getCode().equals(profile.getCode())) { return false; } } return true; } // //////////////////////////////////////////////////////////// // Traitement // //////////////////////////////////////////////////////////// @Override public void addTraitement(final Traitement traitement) { if (log.isDebugEnabled()) { log.debug("entering addTraitement( " + traitement + " )"); } daoService.addTraitement(traitement); } @Override public void deleteTraitement(final Traitement traitement) { if (log.isDebugEnabled()) { log.debug("entering deleteTraitement( " + traitement + " )"); } daoService.deleteTraitement(traitement); } @Override public Traitement getTraitement(final Integer id) { if (log.isDebugEnabled()) { log.debug("entering getTraitement( " + id + " )"); } return daoService.getTraitement(id); } @Override public Domain getDomain(final Integer id) { if (log.isDebugEnabled()) { log.debug("entering getDomain( " + id + " )"); } return daoService.getDomain(id); } @Override public Set<Fonction> getFonctions(final Boolean temEnSve, final Boolean initAccess) { if (log.isDebugEnabled()) { log.debug("entering getFonction( " + temEnSve + ", " + initAccess + " )"); } Set<Fonction> fct = new HashSet<Fonction>(); fct.addAll(daoService.getFonctions(temEnSve, initAccess)); return fct; } @Override public Set<Traitement> getTraitements(final Profile p, final String typeTraitement, final Domain domain) { if (log.isDebugEnabled()) { log.debug("entering getTraitements( " + p + ", " + typeTraitement + ", " + domain + " )"); } return new HashSet<Traitement>(daoService.getTraitements(p, typeTraitement, domain)); } @Override public Set<Domain> getDomains(final Boolean temEnSve, final Boolean initAccess) { if (log.isDebugEnabled()) { log.debug("entering getDomain( " + temEnSve + ", " + initAccess + " )"); } Set<Domain> l = new TreeSet<Domain>(new Comparator<Traitement>() { public int compare(Traitement t1, Traitement t2) { int r1 = t1.getRang(); int r2 = t2.getRang(); return (r1 > r2) ? 1 : (r1 < r2) ? -1 : 0; } }); l.addAll(daoService.getDomains(temEnSve, initAccess)); return l; } @Override public void updateTraitement(final Traitement traitement) { if (log.isDebugEnabled()) { log.debug("entering updateFonction( " + traitement + " )"); } daoService.updateTraitement(traitement); } @Override public Boolean traitementCodeIsUnique(final Traitement traitement) { if (log.isDebugEnabled()) { log.debug("entering traitementCodeIsUnique( " + traitement + " )"); } if (traitement instanceof Fonction) { for (Fonction f : getFonctions(null, false)) { if (!f.equals(traitement) && f.getCode().equals(traitement.getCode())) { return false; } } } else if (traitement instanceof Domain) { for (Domain d : getDomains(null, null)) { if (!d.equals(traitement) && d.getRang().equals(traitement.getRang())) { return false; } } } return true; } @Override public Boolean functionRangIsUnique(final Fonction function, final Integer idDomain) { if (log.isDebugEnabled()) { log.debug("entering functionRangIsUnique( " + idDomain + " , " + function + " )"); } Domain d = getDomain(idDomain); for (Fonction f : d.getFonctions()) { if (!f.equals(function) && f.getRang().equals(function.getRang())) { return false; } } return true; } @Override public Boolean domainRangIsUnique(final Domain domain) { if (log.isDebugEnabled()) { log.debug("entering domainRangIsUnique( " + domain + " )"); } for (Domain d : getDomains(null, null)) { if (!d.equals(domain) && d.getRang().equals(domain.getRang())) { return false; } } return true; } // //////////////////////////////////////////////////////////// // AccessRight // //////////////////////////////////////////////////////////// @Override public void addAccessRight(final AccessRight accessRight) { if (log.isDebugEnabled()) { log.debug("entering addAccessRight( " + accessRight + " )"); } daoService.addAccessRight(accessRight); } @Override public void updateAccessRight(final AccessRight accessRight) { if (log.isDebugEnabled()) { log.debug("entering updateAccessRight( " + accessRight + " )"); } daoService.updateAccessRight(accessRight); } // //////////////////////////////////////////////////////////// // Profile // //////////////////////////////////////////////////////////// @Override public void addNomenclature(final Nomenclature nomenclature) { if (log.isDebugEnabled()) { log.debug("entering addNomenclature( " + nomenclature + " )"); } daoService.addNomenclature(nomenclature); } @Override public void deleteNomenclature(final Nomenclature nomenclature) { if (log.isDebugEnabled()) { log.debug("entering deleteNomenclature( " + nomenclature + " )"); } daoService.deleteNomenclature(nomenclature); } @Override public boolean canDeleteNomclature(final Nomenclature nom) { if (log.isDebugEnabled()) { log.debug("entering canDeleteNomclature nom = " + nom); } if (nom instanceof TypeDecision) { return daoService.canDeleteTypeDecision((TypeDecision) nom); } else if (nom instanceof MotivationAvis) { return daoService.canDeleteMotivation((MotivationAvis) nom); } return true; } @Override public Nomenclature getNomenclature(final Integer id) { if (log.isDebugEnabled()) { log.debug("entering getNomenclature( " + id + " )"); } return daoService.getNomenclature(id); } @Override public Set<PieceJustificative> getPJs(final Boolean temEnSve) { if (log.isDebugEnabled()) { log.debug("entering getPJs( " + temEnSve + " )"); } List<Nomenclature> nomList = daoService.getNomenclatures(temEnSve, PieceJustificative.class); Set<PieceJustificative> t = new HashSet<PieceJustificative>(); for (Nomenclature n : nomList) { t.add((PieceJustificative) n); } return t; } @Override public List<PieceJustificative> getPiecesJ(final Set<VersionEtpOpi> vet, final String codeRI) { List<PieceJustificative> pj = new ArrayList<PieceJustificative>(); Set<PieceJustificative> pjInUse = getPJs(true); for (PieceJustificative p : pjInUse) { // on garde les pièces du régime if (codeRI == null || codeRI.equals(String.valueOf(p.getCodeRI()))) { if (p.getIsForAllVet()) { pj.add(p); } else { for (PieceJustiVet pVet : p.getVersionEtapes()) { if (vet.contains(pVet.getVersionEtpOpi())) { pj.add(p); break; } } } } } return pj; } @Override public List<PieceJustificative> getPiecesJ(VersionEtpOpi vetOpi, final String codeRI) { List<PieceJustificative> pj = new ArrayList<PieceJustificative>(); Set<PieceJustificative> pjInUse = getPJs(true); for (PieceJustificative p : pjInUse) { // on garde les pièces du régime if (codeRI == null || codeRI.equals(String.valueOf(p.getCodeRI()))) { if (p.getIsForAllVet()) { pj.add(p); } else { for (PieceJustiVet pVet : p.getVersionEtapes()) { if (vetOpi.equals(pVet.getVersionEtpOpi())) { pj.add(p); break; } } } } } return pj; } @Override public Set<MotivationAvis> getMotivationsAvis(final Boolean temEnSve) { if (log.isDebugEnabled()) { log.debug("entering getMotivationAvis( " + temEnSve + " )"); } List<Nomenclature> nomList = daoService.getNomenclatures(temEnSve, MotivationAvis.class); Set<MotivationAvis> t = new HashSet<MotivationAvis>(); for (Nomenclature n : nomList) { t.add((MotivationAvis) n); } return t; } @Override public Set<Campagne> getCampagnes(final Boolean temEnSve, final String codeRI) { if (log.isDebugEnabled()) { log.debug("entering getCampagnes( " + temEnSve + " )"); } List<Nomenclature> nomList = daoService.getNomenclatures(temEnSve, Campagne.class); Set<Campagne> c = new HashSet<Campagne>(); for (Nomenclature n : nomList) { Campagne camp = (Campagne) n; if (codeRI == null || camp.getCodeRI() == Integer.parseInt(codeRI)) { c.add(camp); } } return c; } @Override public Campagne getCampagneEnServ(final int codeRI) { if (log.isDebugEnabled()) { log.debug("entering getCampagneEnServ( " + codeRI + " )"); } List<Nomenclature> nomList = daoService.getNomenclatures(true, Campagne.class); Campagne camp = null; for (Nomenclature n : nomList) { Campagne c = (Campagne) n; if (c.getCodeRI() == codeRI) { // TODO YL 22/11/2010: à modifier par une récup de la liste if (camp == null || (Integer.parseInt(camp.getCodAnu()) < Integer.parseInt(c.getCodAnu()))) { camp = c; } } } return camp; } @Override public Boolean isCampagnesFIAndFCEnServ() { if (log.isDebugEnabled()) { log.debug("entering isCampagnesFIAndFCEnServ()"); } Boolean isOK = false; Set<Campagne> campagnes = getCampagnes(Boolean.TRUE, null); if (campagnes != null && campagnes.size() > 1) { Boolean isFC = false; Boolean isFI = false; for (Campagne camp : campagnes) { //TODO : Fix this !! if (camp.getCodeRI() == 0) { //FormationInitiale.CODE){ isFI = true; } else if (camp.getCodeRI() == 1) { //FormationContinue.CODE){ isFC = true; } } isOK = isFI && isFC; } return isOK; } @Override public Set<Campagne> getCampagnesAnu(final String codAnu) { if (log.isDebugEnabled()) { log.debug("entering getCampagnesAnu( " + codAnu + " )"); } List<Nomenclature> nomList = daoService.getNomenclatures(null, Campagne.class); Set<Campagne> c = new HashSet<Campagne>(); for (Nomenclature n : nomList) { Campagne camp = (Campagne) n; if (camp.getCodAnu().equals(codAnu)) { c.add(camp); } } return c; } @Override public Set<TypeDecision> getTypeDecisions(final Boolean temEnSve) { if (log.isDebugEnabled()) { log.debug("entering getTypeDecisions( " + temEnSve + " )"); } List<Nomenclature> nomList = daoService.getNomenclatures(temEnSve, TypeDecision.class); Set<TypeDecision> t = new HashSet<TypeDecision>(); for (Nomenclature n : nomList) { t.add((TypeDecision) n); } return t; } @Override public void updateNomenclature(final Nomenclature nomenclature) { if (log.isDebugEnabled()) { log.debug("entering updateNomenclature( " + nomenclature + " )"); } daoService.updateNomenclature(nomenclature); } @Override public Boolean nomenclatureCodeIsUnique(final Nomenclature nomenclature) { if (log.isDebugEnabled()) { log.debug("entering nomenclatureCodeIsUnique( " + nomenclature + " )"); } //TODO revoir car n'utilise pas le cache + trop de code repete if (nomenclature instanceof TypeDecision) { Set<TypeDecision> list = getTypeDecisions(null); for (TypeDecision t : list) { if (!t.equals(nomenclature) && t.getCode().equals(nomenclature.getCode())) { return false; } } } else if (nomenclature instanceof MotivationAvis) { Set<MotivationAvis> list = getMotivationsAvis(null); for (MotivationAvis t : list) { if (!t.equals(nomenclature) && t.getCode().equals(nomenclature.getCode())) { return false; } } } else if (nomenclature instanceof PieceJustificative) { Set<PieceJustificative> list = getPJs(null); for (PieceJustificative t : list) { if (!t.equals(nomenclature) && t.getCode().equals(nomenclature.getCode())) { return false; } } } return true; } // //////////////////////////////////////////////////////////// // Commission // //////////////////////////////////////////////////////////// @Override public void addCommission(final Commission commission) { if (log.isDebugEnabled()) { log.debug("entering addCommission( " + commission + " )"); } // on crée le calendrier de la commission par défaut CalendarCmi calendarCmi = new CalendarCmi(); calendarCmi.setCode(prefixCodCalCmi + commission.getCode()); calendarCmi.setLibelle(prefixLibCalCmi + commission.getLibelle()); SimpleDateFormat formatter = new SimpleDateFormat(Constantes.DATE_FORMAT); ParsePosition pos = new ParsePosition(0); Date dateBack = formatter.parse(dateBackDefault, pos); calendarCmi.setDatEndBackDossier(dateBack); calendarCmi.setCommission(commission); calendarCmi = domainService.add(calendarCmi, "Batch createMissingCalendarCmi"); addCalendar(calendarCmi); commission.setCalendarCmi(calendarCmi); daoService.addCommission(commission); } @Override public void deleteCommission(final Commission commission) { if (log.isDebugEnabled()) { log.debug("entering deleteCommission( " + commission + " )"); } Commission c = getCommission(commission.getId(), null); //delete the calendar for (CalendarIns cal : getCalendarIns(c)) { cal.getCommissions().remove(c); } //delete allMissingPiece List<MissingPiece> mp = domainService.getMissingPiece(null, c); domainService.deleteMissingPiece(mp, null); //delete the manager rights for (Gestionnaire g : domainService.getManagersByCmi(c)) { g.getRightOnCmi().remove(c); } daoService.deleteCommission(c); } @Override public Commission getCommission(final Integer id, final String code) { if (log.isDebugEnabled()) { log.debug("entering getCommission( " + id + ", " + code + " )"); } return daoService.getCommission(id, code); } @Override public Set<Commission> getCommissions(final Boolean temEnSve) { if (log.isDebugEnabled()) { log.debug("entering getCommissions( " + temEnSve + " )"); } return new HashSet<>(daoService.getCommissions(temEnSve)); } @Override public void updateCommission(final Commission commission) { if (log.isDebugEnabled()) { log.debug("entering updateCommission( " + commission + " )"); } daoService.updateCommission(commission); } @Override //TODO : get rid of this ! public Boolean commissionCodeIsUnique(final Commission commission) { if (log.isDebugEnabled()) { log.debug("entering commissionCodeIsUnique( " + commission + " )"); } Set<Commission> list = getCommissions(null); for (Commission c : list) { if (!c.equals(commission) && c.getCode().equals(commission.getCode())) { return false; } } return true; } ////////////////////////////////////////////////////////////// // ContactCommission ////////////////////////////////////////////////////////////// @Override public void addContactCommission(final ContactCommission contactCommission) { if (log.isDebugEnabled()) { log.debug("entering addContactCommission( " + contactCommission + " )"); } this.daoService.addContactCommission(contactCommission); } @Override public void updateContactCommission(final ContactCommission contactCommission) { if (log.isDebugEnabled()) { log.debug("entering updateContactCommission( " + contactCommission + " )"); } this.daoService.updateContactCommission(contactCommission); } // //////////////////////////////////////////////////////////// // Member // //////////////////////////////////////////////////////////// @Override public void addMember(final Member member) { if (log.isDebugEnabled()) { log.debug("entering addMember( " + member + " )"); } daoService.addMember(member); } @Override public void updateMember(final Member member) { if (log.isDebugEnabled()) { log.debug("entering updateMember( " + member + " )"); } daoService.updateMember(member); } @Override public void deleteMember(final List<Member> member) { if (log.isDebugEnabled()) { log.debug("entering deleteMember( " + member + " )"); } for (Member m : member) { daoService.deleteMember(m); } } // //////////////////////////////////////////////////////////// // TraitementCmi // //////////////////////////////////////////////////////////// @Override public void addTraitementCmi(final TraitementCmi traitementCmi) { if (log.isDebugEnabled()) { log.debug("entering addTraitementCmi( " + traitementCmi + " )"); } daoService.addTraitementCmi(traitementCmi); } @Override public void updateTraitementCmi(final TraitementCmi traitementCmi) { if (log.isDebugEnabled()) { log.debug("entering updateTraitementCmi( " + traitementCmi + " )"); } daoService.updateTraitementCmi(traitementCmi); } @Override public void deleteTraitementCmi(final List<TraitementCmi> traitementCmi) { if (log.isDebugEnabled()) { log.debug("entering deleteTraitementCmi( " + traitementCmi + " )"); } for (TraitementCmi t : traitementCmi) { daoService.deleteTraitementCmi(t); } } @Override public TraitementCmi getTraitementCmi( final VersionEtpOpi versionEtpOpi, final Boolean initSelection) { if (log.isDebugEnabled()) { log.debug("entering getTraitementCmi( " + versionEtpOpi + "," + initSelection + " )"); } return daoService.getTraitementCmi(versionEtpOpi, null, initSelection); } @Override public TraitementCmi getTraitementCmi(final Integer id) { if (log.isDebugEnabled()) { log.debug("entering getTraitementCmi( " + id + " )"); } return daoService.getTraitementCmi(id); } @Override public Boolean isConnectCmi(final TraitementCmi t) { if (log.isDebugEnabled()) { log.debug("entering isConnectCmi( " + t + " )"); } for (Commission c : getCommissions(null)) { if (c.getTraitementCmi().contains(t)) { return true; } } return false; } // //////////////////////////////////////////////////////////// // Calendar // //////////////////////////////////////////////////////////// @Override public void addCalendar(final Calendar calendar) { if (log.isDebugEnabled()) { log.debug("entering addCalendar( " + calendar + " )"); } daoService.addCalendar(calendar); } @Override public void updateCalendar(final Calendar calendar) { if (log.isDebugEnabled()) { log.debug("entering updateCalendar( " + calendar + " )"); } daoService.updateCalendar(calendar); } @Override public List<Calendar> getCalendars(final Boolean temEnSve, final String typeCal) { if (log.isDebugEnabled()) { log.debug("entering getCalendars( " + temEnSve + ", " + typeCal + " )"); } return daoService.getCalendars(temEnSve, typeCal); } @Override public Boolean calendarCodeIsUnique(final Calendar calendar) { if (log.isDebugEnabled()) { log.debug("entering calendarCodeIsUnique( " + calendar + " )"); } if (calendar instanceof CalendarIns) { List<Calendar> list = getCalendars(true, Calendar.TYPE_CAL_INSCRIPTION); for (Calendar c : list) { if (!c.equals(calendar) && c.getCode().equals(calendar.getCode())) { return false; } } } else if (calendar instanceof CalendarCmi) { List<Calendar> list = getCalendars(true, Calendar.TYPE_CAL_COMMISSION); for (Calendar c : list) { if (!c.equals(calendar) && c.getCode().equals(calendar.getCode())) { return false; } } } return true; } @Override public void deleteCalendar(final Calendar calendar) { if (log.isDebugEnabled()) { log.debug("entering deleteCalendar( " + calendar + " )"); } if (calendar instanceof CalendarIns) { CalendarIns cIns = (CalendarIns) daoService.getCalendar(calendar.getId()); for (Commission c : cIns.getCommissions()) { updateCommission(c); } } else if (calendar instanceof CalendarCmi) { CalendarCmi cCmi = (CalendarCmi) daoService.getCalendar(calendar.getId()); cCmi.getCommission().setCalendarCmi(null); updateCommission(cCmi.getCommission()); } daoService.deleteCalendar(calendar); } @Override public Set<CalendarIns> getCalendars(final VersionEtpOpi versionEtpOpi) { if (log.isDebugEnabled()) { log.debug("entering getCalendars( " + versionEtpOpi + " )"); } return daoService.getCalendars(versionEtpOpi); } @Override public List<CalendarIns> getCalendarIns(final Commission commission) { if (log.isDebugEnabled()) { log.debug("entering getCalendarIns( " + commission + " )"); } return daoService.getCalendarIns(commission); } // //////////////////////////////////////////////////////////// // FormulaireCmi // //////////////////////////////////////////////////////////// @Override public void addFormulaireCmi(final FormulaireCmi form) { if (log.isDebugEnabled()) { log.debug("entering addFormulaireCmi( " + form + " )"); } daoService.addFormulaire(form); } @Override public void deleteFormulaireCmi(final FormulaireCmi form) { if (log.isDebugEnabled()) { log.debug("entering deleteFormulaireCmi( " + form + " )"); } daoService.deleteFormulaire(form); } @Override public Map<VersionEtpOpi, FormulaireCmi> getFormulairesCmi( final Set<TraitementCmi> traitements, final Integer codeRI) { if (log.isDebugEnabled()) { log.debug("entering getFormulairesCmi( " + traitements + " )"); } Map<VersionEtpOpi, FormulaireCmi> map = new HashMap<VersionEtpOpi, FormulaireCmi>(); Set<VersionEtpOpi> versionsEtpOpi = null; // Si des traitements sont passes en param, on filtre sur les vEtpOpi if (traitements != null && !traitements.isEmpty()) { versionsEtpOpi = new HashSet<VersionEtpOpi>(); for (TraitementCmi traitementCmi : traitements) { versionsEtpOpi.add(traitementCmi.getVersionEtpOpi()); } if (log.isDebugEnabled()) { log.debug("versionsEtpOpi : " + versionsEtpOpi); } } for (FormulaireCmi form : daoService.getFormulairesCmi(versionsEtpOpi, codeRI)) { map.put(form.getVersionEtpOpi(), form); } return map; } @Override public void addIndFormulaire(final IndFormulaire formNorme) { if (log.isDebugEnabled()) { log.debug(""); } daoService.addIndFormulaire(formNorme); } @Override public void deleteIndFormulaire(final IndFormulaire form, final String numDoss, final String sLabelRI) { if (log.isDebugEnabled()) { log.debug("entering deleteIndFormulaire form = " + form); } daoService.deleteIndFormulaire(form); // on supprime ensuite le formulaire dans la base Orbeon String formName = form.getVersionEtpOpi().getCodEtp() + "-" + form.getVersionEtpOpi().getCodVrsVet() + "-" + sLabelRI; try { orbeonService.removeResponse(formName, numDoss); } catch (SAXException e) { e.printStackTrace(); } catch (ParserConfigurationException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } @Override public final IndFormulaire findIndFormulaireById(final Integer id) { return daoService.findIndFormulaireById(id); } @Override public Map<VersionEtpOpi, IndFormulaire> getIndFormulaires( final Individu indSelected) { if (log.isDebugEnabled()) { log.debug("entering getIndFormulaires( " + indSelected + " )"); } Map<VersionEtpOpi, IndFormulaire> map = new HashMap<VersionEtpOpi, IndFormulaire>(); for (IndFormulaire form : daoService.getIndFormulaires(indSelected)) { map.put(form.getVersionEtpOpi(), form); } return map; } public boolean isExitFormulaireInd(final Individu indSelected, final VersionEtpOpi vet) { return daoService.isExitFormulaireInd(indSelected, vet); } @Override public boolean isExitFormulaireEtp(final VersionEtpOpi vet, final String codeRI) { return daoService.isExitFormulaireEtp(vet, codeRI); } @Override public boolean isAllFormulairesCreated(final Individu indSelected, final String codeRI) { // Integer nbFormsToCreate = daoService.nbFormulairesToCreateForIndividu( // indSelected.getVoeux(), ri); Integer nbFormsToCreate = 0; Integer nbFormsCreated = 0; for (IndVoeu indVoeu : indSelected.getVoeux()) { TraitementCmi trt = getTraitementCmi(indVoeu.getLinkTrtCmiCamp() .getTraitementCmi().getId()); if (isExitFormulaireEtp(trt.getVersionEtpOpi(), codeRI)) { nbFormsToCreate++; } if (isExitFormulaireInd(indSelected, trt.getVersionEtpOpi())) { nbFormsCreated++; } } // Integer nbFormsCreated = daoService.nbFormulairesCreatedByIndividu( // indSelected, indSelected.getVoeux()); return nbFormsToCreate.equals(nbFormsCreated); } @Override public boolean isAllFormulairesCreatedByTraitementsCmi( final Individu indSelected, final Integer codeRI, final Set<TraitementCmi> traitementsCmi) { boolean allFormsCreated = true; Map<VersionEtpOpi, FormulaireCmi> mapForms = getFormulairesCmi( traitementsCmi, codeRI); Map<VersionEtpOpi, IndFormulaire> mapFormInd = getIndFormulaires(indSelected); for (Map.Entry<VersionEtpOpi, FormulaireCmi> e : mapForms.entrySet()) { IndFormulaire indForm = mapFormInd.get(e.getKey()); if (indForm == null) { allFormsCreated = false; break; } } return allFormsCreated; } @Override public Map<String, List<String>> getAllFormNamesMap(final Campagne camp, final String sLabelRI) { if (log.isDebugEnabled()) { log.debug("entering getIndFormulaires( " + camp + " )"); } Map<String, List<String>> mapFormName = new HashMap<String, List<String>>(); for (IndFormulaire form : daoService.getIndFormulaires(camp)) { // Préparation de l'entrée dans la map String numDoss = form.getIndividu().getNumDossierOpi(); String formName = form.getVersionEtpOpi().getCodEtp() + "-" + form.getVersionEtpOpi().getCodVrsVet() + "-" + sLabelRI; if (!mapFormName.containsKey(numDoss)) { mapFormName.put(numDoss, new ArrayList<String>()); } mapFormName.get(numDoss).add(formName); } return mapFormName; } @Override public void purgeIndFormulaireCamp(final Campagne camp) { if (log.isDebugEnabled()) { log.debug("entering purgeIndFormulaireCamp( " + camp + " )"); } // Purge de la table IND_FORMULAIRE daoService.purgeIndFormulaireCamp(camp); } // //////////////////////////////////////////////////////////// // ReunionCmi // //////////////////////////////////////////////////////////// @Override public void addReunionCmi(final ReunionCmi reunionCmi) { if (log.isDebugEnabled()) { log.debug("entering addReunionCmi( " + reunionCmi + " )"); } daoService.addReunionCmi(reunionCmi); } @Override public void deleteReunionCmi(final List<ReunionCmi> reunionCmi) { if (log.isDebugEnabled()) { log.debug("entering deleteReunionCmi( " + reunionCmi + " )"); } for (ReunionCmi r : reunionCmi) { daoService.deleteReunionCmi(r); } } @Override public void updateReunionCmi(final ReunionCmi reunionCmi) { if (log.isDebugEnabled()) { log.debug("entering updateReunionCmi( " + reunionCmi + " )"); } daoService.updateReunionCmi(reunionCmi); } ////////////////////////////////////////////////////////////// // PieceJustiVet ////////////////////////////////////////////////////////////// @Override public void deletePieceJustiVet(final PieceJustiVet pieceJustiVet) { daoService.deletePieceJustiVet(pieceJustiVet); } @Override public void deletePieceJustiVetWithFlush(final PieceJustiVet pieceJustiVet) { daoService.deletePieceJustiVetWithFlush(pieceJustiVet); } // //////////////////////////////////////////////////////////// // NombreVoeuCge // //////////////////////////////////////////////////////////// @Override public List<NombreVoeuCge> getAllNombreDeVoeuByCge() { return daoService.getAllNombreDeVoeuByCge(); } @Override public void addNombreVoeuCge(final NombreVoeuCge nombreVoeuCge) { if (log.isDebugEnabled()) { log.debug("entering addNombreVoeuCge( " + nombreVoeuCge + " )"); } daoService.addNombreVoeuCge(nombreVoeuCge); } @Override public void deleteNombreVoeuCge(final NombreVoeuCge nombreVoeuCge) { if (log.isDebugEnabled()) { log.debug("entering deleteNombreVoeuCge( " + nombreVoeuCge + " )"); } daoService.deleteNombreVoeuCge(nombreVoeuCge); } @Override public void updateNombreVoeuCge(final NombreVoeuCge nombreVoeuCge) { if (log.isDebugEnabled()) { log.debug("entering updateNombreVoeuCge( " + nombreVoeuCge + " )"); } daoService.updateNombreVoeuCge(nombreVoeuCge); } ////////////////////////////////////////////////////////////// // MailContent ////////////////////////////////////////////////////////////// @Override public MailContent getMailContent(final String code) { if (log.isDebugEnabled()) { log.debug("entering getMailContent( " + code + " )"); } return daoService.getMailContent(code); } @Override public void addMailContent(final MailContent mailContent) { if (log.isDebugEnabled()) { log.debug("entering addMailContent( " + mailContent + " )"); } daoService.addMailContent(mailContent); } @Override public List<MailContent> getMailContents() { if (log.isDebugEnabled()) { log.debug("entering getMailContents()"); } return daoService.getMailContents(); } @Override public void updateMailContent(final MailContent mailContent) { if (log.isDebugEnabled()) { log.debug("entering updateMailContent( " + mailContent + " )"); } daoService.updateMailContent(mailContent); } ////////////////////////////////////////////////////////////// // CalendarRDV ////////////////////////////////////////////////////////////// @Override public List<CalendarRDV> getCalendarRdv() { return daoService.getCalendarRdv(); } @Override public void updateCalendarRdv(final CalendarRDV cal) { if (log.isDebugEnabled()) { log.debug("entering updateCalendarRdv( " + cal + " )"); } daoService.updateCalendarRdv(cal); } @Override public void deleteCalendarRdv(final CalendarRDV cal) { if (log.isDebugEnabled()) { log.debug("entering deleteCalendarRdv( " + cal + " )"); } daoService.deleteCalendarRdv(cal); } @Override public void addCalendarRdv(final CalendarRDV cal) { if (log.isDebugEnabled()) { log.debug("entering addCalendarRdv( " + cal + " )"); } daoService.addCalendarRdv(cal); } @Override public int getListEtudiantsParCalendarRdvParPeriode( final int idCalendarRdv, final int month, final Date dateDebut, final Date dateFin) { return daoService.getListEtudiantsParCalendarRdvParPeriode(idCalendarRdv, month, dateDebut, dateFin); } @Override public int getListEtudiantsParCalendarRdvParPeriode( final int idCalendarRdv, final Date dateDuJour, final Date dateDebut, final Date dateFin) { return daoService.getListEtudiantsParCalendarRdvParPeriode( idCalendarRdv, dateDuJour, dateDebut, dateFin); } @Override public int getListEtudiantsParCalendarRdvParDemiJournee( final int idCalendarRdv, final int month, final Date date, final Date dateDebut, final Date dateFin) { return daoService.getListEtudiantsParCalendarRdvParDemiJournee( idCalendarRdv, month, date, dateDebut, dateFin); } ////////////////////////////////////////////////////////////// // misc ////////////////////////////////////////////////////////////// public void setDaoService(final ParameterDaoService daoService) { this.daoService = daoService; } public void setDomainService(final DomainService domainService) { this.domainService = domainService; } public void setOrbeonService(final OrbeonService orbeonService) { this.orbeonService = orbeonService; } public List<TypeConvocation> getTypeConvocations() { return typeConvocations; } public void setTypeConvocations(final List<TypeConvocation> typeConvocations) { this.typeConvocations = typeConvocations; } public List<TypeContrat> getTypeContrats() { return typeContrats; } public void setTypeContrats(final List<TypeContrat> typeContrats) { this.typeContrats = typeContrats; } public List<TypeStatut> getTypeStatuts() { return typeStatuts; } public void setTypeStatuts(final List<TypeStatut> typeStatuts) { this.typeStatuts = typeStatuts; } public List<TypeOrganisme> getTypeOrganismes() { return typeOrganismes; } public void setTypeOrganismes(final List<TypeOrganisme> typeOrganismes) { this.typeOrganismes = typeOrganismes; } public List<TypeSituation> getTypeSituations() { return typeSituations; } public void setTypeSituations(final List<TypeSituation> typeSituations) { this.typeSituations = typeSituations; } @Override public String getDateBackDefault() { return dateBackDefault; } public void setDateBackDefault(final String dateBackDefault) { this.dateBackDefault = dateBackDefault; } public String getPrefixCodCalCmi() { return prefixCodCalCmi; } public void setPrefixCodCalCmi(final String prefixCodCalCmi) { this.prefixCodCalCmi = prefixCodCalCmi; } public String getPrefixLibCalCmi() { return prefixLibCalCmi; } public void setPrefixLibCalCmi(final String prefixLibCalCmi) { this.prefixLibCalCmi = prefixLibCalCmi; } ////////////////////////////////////////////////////////////// // LinkTrtCmiCamp ////////////////////////////////////////////////////////////// @Override public void addLinkTrtCmiCamp(final LinkTrtCmiCamp linkTrtCmiCamp) { if (log.isDebugEnabled()) { log.debug("entering addLinkTrtCmiCamp ( " + linkTrtCmiCamp + ")"); } daoService.addLinkTrtCmiCamp(linkTrtCmiCamp); } @Override public void deleteLinkTrtCmiCamp(final LinkTrtCmiCamp linkTrtCmiCamp) { if (log.isDebugEnabled()) { log.debug("entering deleteLinkTrtCmiCamp ( " + linkTrtCmiCamp + ")"); } daoService.deleteLinkTrtCmiCamp(linkTrtCmiCamp); } @Override public LinkTrtCmiCamp getLinkTrtCmiCamp(final TraitementCmi traitementCmi, final Campagne campagne) { if (log.isDebugEnabled()) { log.debug("entering getLinkTrtCmiCamp ( " + traitementCmi + ", " + campagne + " )"); } return daoService.getLinkTrtCmiCamp(traitementCmi, campagne); } @Override public void updateLinkTrtCmiCamp(final LinkTrtCmiCamp linkTrtCmiCamp) { if (log.isDebugEnabled()) { log.debug("entering updateLinkTrtCmiCamp ( " + linkTrtCmiCamp + ")"); } daoService.updateLinkTrtCmiCamp(linkTrtCmiCamp); } @Override public void updateLinkTrtCmiCampTemEnServ(final Campagne camp, final boolean temEnServ) { if (log.isDebugEnabled()) { log.debug("entering updateLinkTrtCmiCampTemEnServ( " + camp + ", " + temEnServ + " )"); } daoService.updateLinkTrtCmiCampTemEnServ(camp, temEnServ); } ////////////////////////////////////////////////////////////// // AutoListPrincipale ////////////////////////////////////////////////////////////// @Override public List<AutoListPrincipale> getAutoListPrincipale() { if (log.isDebugEnabled()) { log.debug(""); } return daoService.getAutoListPrincipale(); } @Override public AutoListPrincipale getAutoListPrincipale(final IndVoeu indVoeu) { if (log.isDebugEnabled()) { log.debug(""); } return daoService.getAutoListPrincipale(indVoeu); } }
<filename>example/example.go package main import ( "time" "github.com/aleasoluciones/gochecks" ) func main() { checkEngine := gochecks.NewCheckEngine([]gochecks.CheckPublisher{ gochecks.NewRiemannPublisher("127.0.0.1:5555"), gochecks.NewLogPublisher(), }) period := 5 * time.Second googleCheck := gochecks.NewGenericHTTPChecker( "google", "http", "http://www.google.com", gochecks.BodyGreaterThan(10000)).Tags("production", "web").TTL(50) checkEngine.AddCheck(googleCheck, period) checkEngine.AddCheck( gochecks.NewHTTPChecker("golang", "http", "http://www.golang.org", 200). Attributes(map[string]string{"version": "1", "network": "google"}). Tags("production"). Retry(3, 1*time.Second), period) checkEngine.AddCheck( gochecks.NewPingChecker("nonexistinghost", "ping", "172.16.5.5").Retry(3, 1*time.Second), period) checkEngine.AddCheck(gochecks.NewMysqlConnectionCheck("localhost", "mysql", ""), period) for { time.Sleep(2 * time.Second) } }
/* * segment.c * Represent a process image in a set of segments * * Created on: Dec 13, 2011 * Author: myan */ #include "segment.h" /*************************************************************************** * Global variables ***************************************************************************/ struct ca_segment* g_segments = NULL; unsigned int g_segment_count = 0; /*************************************************************************** * Internal representation of memory segments * segment infos are sorted and cached in a buffer ***************************************************************************/ static unsigned int g_segment_buffer_size = 0; #define INIT_SEG_BUFFER_SZ 256 static size_t g_bitvec_length = 0; static void* sys_alloc(size_t sz); static void sys_free(void* p, size_t sz); ///////////////////////////////////////////////////////// // Dismantle all segments previously built // but keep the buffer for reuse ///////////////////////////////////////////////////////// CA_BOOL release_all_segments(void) { unsigned int i; struct ca_segment* segment; // release the bit vector, which is one monolithic region for (i=0; i<g_segment_count; i++) { segment = &g_segments[i]; if (segment->m_ptr_bitvec) { sys_free(segment->m_ptr_bitvec, g_bitvec_length); break; } } // release module_name for (i=0; i<g_segment_count; i++) { segment = &g_segments[i]; if ((segment->m_type == ENUM_MODULE_TEXT || segment->m_type == ENUM_MODULE_DATA) && segment->m_module_name) free((void*)segment->m_module_name); } // Since all ca_segments are on a big buffer, simply ground the indexes g_segment_count = 0; return CA_TRUE; } // Expand buffer for at least "inc" slots static void prepare_segment_buffer(unsigned int inc) { if (!g_segments) { g_segments = (struct ca_segment*) malloc(sizeof(struct ca_segment)*INIT_SEG_BUFFER_SZ); g_segment_buffer_size = INIT_SEG_BUFFER_SZ; } else if (g_segment_count + inc > g_segment_buffer_size) { g_segment_buffer_size *= 2; g_segments = (struct ca_segment*) realloc(g_segments, sizeof(struct ca_segment)*g_segment_buffer_size); } } // Split a segment into two parts at given address static void split_segment(struct ca_segment* segment, address_t addr) { unsigned int index; size_t old_vsize, old_fsize; struct ca_segment* next; // Sanity check if (addr < segment->m_vaddr || addr >= segment->m_vaddr + segment->m_vsize) return; // Move down segments after me index = segment - &g_segments[0]; if (index < g_segment_count - 1) { unsigned int i; for (i = g_segment_count - 1; ; i--) { memcpy(&g_segments[i + 1], &g_segments[i], sizeof(struct ca_segment)); if (i == index) break; } } g_segment_count++; // Adjust the first part old_vsize = segment->m_vsize; old_fsize = segment->m_fsize; segment->m_vsize = addr - segment->m_vaddr; if (segment->m_fsize > segment->m_vsize) segment->m_fsize = segment->m_vsize; // Adjust the second part next = segment + 1; next->m_vaddr = addr; next->m_vsize = old_vsize - segment->m_vsize; if (segment->m_faddr) next->m_faddr = segment->m_faddr + segment->m_vsize; if (old_fsize > segment->m_fsize) next->m_fsize = old_fsize - segment->m_fsize; if (segment->m_module_name) next->m_module_name = strdup(segment->m_module_name); if (next->m_ptr_bitvec) { if (next->m_fsize > 0) { size_t ptr_sz = g_ptr_bit >> 3; next->m_ptr_bitvec = (unsigned int*)((char*)segment->m_ptr_bitvec + (segment->m_fsize/ptr_sz >> 3)); } else next->m_ptr_bitvec = NULL; } } ///////////////////////////////////////////////////////////////////// // [1] Append a new segment to the end of the array of // segments in my previous collection. // [2] If the new segment is a subset of an existing segment, split it ///////////////////////////////////////////////////////////////////// struct ca_segment* add_one_segment(address_t vaddr, size_t size, CA_BOOL read, CA_BOOL write, CA_BOOL exec) { struct ca_segment* segment = NULL; // We need no more than two more slots in the buffer prepare_segment_buffer(2); segment = &g_segments[g_segment_count-1]; if (g_segment_count == 0 || vaddr >= segment->m_vaddr + segment->m_vsize) { // In most case, new segment's address is higher segment = &g_segments[g_segment_count++]; segment->m_vaddr = vaddr; segment->m_vsize = size; segment->m_faddr = NULL; if (!read || g_debug_core) segment->m_fsize = 0; else segment->m_fsize = size; segment->m_type = ENUM_UNKNOWN; segment->m_bitvec_ready = 0; segment->m_read = read ? 1:0; segment->m_write = write ? 1:0; segment->m_exec = exec ? 1:0; segment->m_reserved = 0; segment->m_thread.tid = -1; segment->m_module_name = NULL; segment->m_ptr_bitvec = NULL; } else { size_t ptr_sz = g_ptr_bit >> 3; size_t ptr_mask = ptr_sz - 1; // round up addr/size vaddr = (vaddr + ptr_mask) & (~ptr_mask); size = (size + ptr_mask) & (~ptr_mask); segment = get_segment(vaddr, size); if (segment) { // an existing segment fully consists of the new one // check the head if (segment->m_vaddr < vaddr) { split_segment(segment, vaddr); // permission bits should be the same segment++; } // check the foot, segment->m_vaddr should be vaddr at this point if (segment->m_vsize > size) { split_segment(segment, vaddr + size); } } else CA_PRINT("Error: add_one_segment("PRINT_FORMAT_POINTER", "PRINT_FORMAT_POINTER") segment is added in wrong order\n", vaddr, vaddr + size); } if (g_segments[g_segment_count-1].m_vaddr == 0) { CA_PRINT("Internal error: g_segment_count %d\n", g_segment_count); } return segment; } ////////////////////////////////////////////////////////////// // Return the segment containing the given memory range // use binary search since segments are sorted by vaddr ////////////////////////////////////////////////////////////// struct ca_segment* get_segment(address_t addr, size_t len) { unsigned int l_index = 0; unsigned int u_index = g_segment_count; address_t target_end; if (len == 0) len = 1; target_end = addr + len; // bail out for out of bound addr if (addr < g_segments[0].m_vaddr || target_end > g_segments[u_index-1].m_vaddr+g_segments[u_index-1].m_vsize) return NULL; while (l_index < u_index) { unsigned int m_index = (l_index + u_index) / 2; struct ca_segment* segment = &g_segments[m_index]; if (target_end <= segment->m_vaddr) u_index = m_index; else if (addr >= segment->m_vaddr + segment->m_vsize) l_index = m_index + 1; else return segment; } return NULL; } CA_BOOL alloc_bit_vec(void) { unsigned int i; char* buffer; size_t ptr_sz = g_ptr_bit >> 3; g_bitvec_length = 0; for (i=0; i<g_segment_count; i++) { struct ca_segment* segment = &g_segments[i]; size_t seg_bits = segment->m_fsize/ptr_sz; g_bitvec_length += ALIGN(seg_bits, 32) >> 5; } // Carve the buffer into pieces for each segment's bit vector g_bitvec_length *= sizeof(unsigned int); buffer = (char*) sys_alloc(g_bitvec_length); for (i=0; i<g_segment_count; i++) { struct ca_segment* segment = &g_segments[i]; if (segment->m_fsize > 0) { size_t seg_bits = segment->m_fsize/ptr_sz; segment->m_ptr_bitvec = (unsigned int*) buffer; buffer += ALIGN(seg_bits, 32) >> 3; } } return CA_TRUE; } CA_BOOL test_segments(CA_BOOL verbose) { unsigned int i, len; struct ca_segment* seg; struct ca_segment* seg1; struct ca_segment* seg2; if (g_segment_count <= 0) { if (verbose) CA_PRINT("There is not segments to test\n"); return CA_FALSE; } // make sure all segments are properly sorted by address and there is no overlap for (i=0; i<g_segment_count-1; i++) { seg1 = &g_segments[i]; seg2 = &g_segments[i+1]; if (seg1->m_vaddr + seg1->m_vsize > seg2->m_vaddr) { if (verbose) { CA_PRINT("The following segments are in wrong order:\n"); CA_PRINT("\t[%d] "PRINT_FORMAT_POINTER" -- "PRINT_FORMAT_POINTER"\n", i, seg1->m_vaddr, seg1->m_vaddr + seg1->m_vsize); CA_PRINT("\t[%d] "PRINT_FORMAT_POINTER" -- "PRINT_FORMAT_POINTER"\n", i+1, seg2->m_vaddr, seg2->m_vaddr + seg2->m_vsize); } return CA_FALSE; } } // make sure query segment function works well for (len=0; len<2; len++) { // low address seg = &g_segments[0]; if (get_segment(seg->m_vaddr - 1, len) != NULL) { if (verbose) { CA_PRINT("An address less than the 1st segment returns a valid segment\n"); CA_PRINT("[0] "PRINT_FORMAT_POINTER" -- "PRINT_FORMAT_POINTER"\n", seg->m_vaddr, seg->m_vaddr + seg->m_vsize); } return CA_FALSE; } // high address seg = &g_segments[g_segment_count-1]; if (get_segment(seg->m_vaddr + seg->m_vsize, len) != NULL) { if (verbose) { CA_PRINT("An address higher than the last segment returns a valid segment\n"); CA_PRINT("[%d] "PRINT_FORMAT_POINTER" -- "PRINT_FORMAT_POINTER"\n", g_segment_count-1, seg->m_vaddr, seg->m_vaddr + seg->m_vsize); } return CA_FALSE; } for (i=0; i<g_segment_count; i++) { seg = &g_segments[i]; // Segment's beginning address if (get_segment(seg->m_vaddr, len) != seg) { if (verbose) { CA_PRINT("Segment's start address doesn't return this segment\n"); CA_PRINT("[%d] "PRINT_FORMAT_POINTER" -- "PRINT_FORMAT_POINTER"\n", i, seg->m_vaddr, seg->m_vaddr + seg->m_vsize); } return CA_FALSE; } // segment's end address if (get_segment(seg->m_vaddr + seg->m_vsize, len) == seg) { if (verbose) { CA_PRINT("Segment's end address returns this segment\n"); CA_PRINT("[%d] "PRINT_FORMAT_POINTER" -- "PRINT_FORMAT_POINTER"\n", i, seg->m_vaddr, seg->m_vaddr + seg->m_vsize); } return CA_FALSE; } if (get_segment(seg->m_vaddr + seg->m_vsize - 8, 8) != seg) { if (verbose) { CA_PRINT("Segment's last block doesn't return this segment\n"); CA_PRINT("[%d] "PRINT_FORMAT_POINTER" -- "PRINT_FORMAT_POINTER"\n", i, seg->m_vaddr, seg->m_vaddr + seg->m_vsize); } return CA_FALSE; } // segment's mid address if (get_segment(seg->m_vaddr + seg->m_vsize/2, len) != seg) { if (verbose) { CA_PRINT("Segment's middle address doesn't return this segment\n"); CA_PRINT("[%d] "PRINT_FORMAT_POINTER" -- "PRINT_FORMAT_POINTER"\n", i, seg->m_vaddr, seg->m_vaddr + seg->m_vsize); } return CA_FALSE; } // segments' gap if (i < g_segment_count - 1) { seg2 = &g_segments[i+1]; if (seg->m_vaddr + seg->m_vsize < seg2->m_vaddr && get_segment(seg->m_vaddr + seg->m_vsize, len) != NULL) { if (verbose) { CA_PRINT("An address "PRINT_FORMAT_POINTER" len=%d between two segments should return no segment:\n", seg->m_vaddr + seg->m_vsize, len); CA_PRINT("\t[%d] "PRINT_FORMAT_POINTER" -- "PRINT_FORMAT_POINTER"\n", i, seg->m_vaddr, seg->m_vaddr + seg->m_vsize); CA_PRINT("\t[%d] "PRINT_FORMAT_POINTER" -- "PRINT_FORMAT_POINTER"\n", i+1, seg2->m_vaddr, seg2->m_vaddr + seg2->m_vsize); } return CA_FALSE; } } } } return CA_TRUE; } ////////////////////////////////////////////////////////////// // Optimization for repeated reference searches // use a bitvec to indicate whether a data in target's // address space is a pointer or not. ////////////////////////////////////////////////////////////// CA_BOOL set_addressable_bit_vec(struct ca_segment* segment) { if (segment->m_fsize>0 && !segment->m_bitvec_ready) { size_t ptr_sz = g_ptr_bit >> 3; const char* start = segment->m_faddr; const char* next = start; const char* end = start + segment->m_fsize; while (next + ptr_sz <= end) { address_t val = 0; if (ptr_sz == 8) { #ifdef sun // data in sparcv9 core file aligns on 4-byte only. sigh.. if ((address_t)next & 0x7ul) memcpy(&val, next, 8); else #endif val = *(address_t*)next; } else val = *(unsigned int*)next; // Assuming bitvec is sparse, // Get its buffer by mmap therefore initial values are zero // We only need to set the bits of addressable pointers if (val) { // there is a good chance that a valid ptr points to its own segment where the ptr is if ( (val >= segment->m_vaddr && val < segment->m_vaddr + segment->m_vsize) || get_segment(val, 1) ) { size_t offset = (next - start) / ptr_sz; unsigned int bit = 1 << (offset & (size_t)0x1F); segment->m_ptr_bitvec[offset>>5] |= bit; } } next += ptr_sz; } // done segment->m_bitvec_ready = 1; } return CA_TRUE; } ////////////////////////////////////////////////////////////// // A simple implementation to remember user's choice of fake // data values ////////////////////////////////////////////////////////////// struct temp_value { struct temp_value* next; address_t addr; address_t value; }; static struct temp_value* g_set_values = NULL; void set_value (address_t addr, address_t value) { struct temp_value* pval = (struct temp_value*) malloc(sizeof(struct temp_value)); pval->next = g_set_values; pval->addr = addr; pval->value = value; g_set_values = pval; } void unset_value (address_t addr) { struct temp_value* pval = g_set_values; struct temp_value* previous = NULL; while (pval) { if (pval->addr == addr) { if (previous) previous->next = pval->next; else g_set_values = pval->next; free (pval); return; } previous = pval; } } void print_set_values (void) { struct temp_value* pval = g_set_values; if (!pval) { CA_PRINT("No value is set\n"); return; } while (pval) { CA_PRINT(PRINT_FORMAT_POINTER": "PRINT_FORMAT_POINTER"\n", pval->addr, pval->value); pval = pval->next; } } static CA_BOOL get_preset_value (address_t addr, void* buffer, size_t sz) { size_t ptr_sz = g_ptr_bit >> 3; struct temp_value* pval = g_set_values; while (pval) { if (pval->addr >= addr && pval->addr + ptr_sz <= addr + sz) { if (ptr_sz == 8) *(address_t*)((char*)buffer + (pval->addr - addr)) = pval->value; else *(unsigned int*)((char*)buffer + (pval->addr - addr)) = pval->value; } pval = pval->next; } return CA_TRUE; } ////////////////////////////////////////////////////////////// // segment may be cached by for better performance ////////////////////////////////////////////////////////////// CA_BOOL read_memory_wrapper (struct ca_segment* segment, address_t addr, void* buffer, size_t sz) { size_t ptr_sz = g_ptr_bit >> 3; CA_BOOL rc = CA_FALSE; if (g_debug_core && g_segment_count) { char* mapped_addr; static struct ca_segment* last_seg = NULL; // use caller provided segment if (segment && addr >= segment->m_vaddr && addr+sz <= segment->m_vaddr+segment->m_fsize) { mapped_addr = (char*)(segment->m_faddr + (addr - segment->m_vaddr)); #if !defined(sun) if (sz == ptr_sz) // fast path for pointer/ref { if (ptr_sz == 8) *(address_t*)buffer = *(address_t*)mapped_addr; else *(unsigned int*)buffer = *(unsigned int*)mapped_addr; } else #endif memcpy(buffer, mapped_addr, sz); rc = CA_TRUE; } // Otherwise, find the belonging segment and cache it else if (!last_seg || addr < last_seg->m_vaddr || addr+sz > last_seg->m_vaddr+last_seg->m_fsize) last_seg = get_segment(addr, sz); if (!rc && last_seg && addr >= last_seg->m_vaddr && addr+sz <= last_seg->m_vaddr+last_seg->m_fsize) { mapped_addr = (char*)(last_seg->m_faddr + (addr - last_seg->m_vaddr)); #if !defined(sun) if (sz == ptr_sz) // fast path for pointer/ref { if (ptr_sz == 8) *(address_t*)buffer = *(address_t*)mapped_addr; else *(unsigned int*)buffer = *(unsigned int*)mapped_addr; } else #endif memcpy(buffer, mapped_addr, sz); rc = CA_TRUE; } #if defined(__MACH__) if (!rc) { // MacOS's heap data structure crosses segments' boundary segment = get_segment(addr, 1); if (segment && addr + sz > segment->m_vaddr + segment->m_vsize && segment->m_vsize == segment->m_fsize) { struct ca_segment* next_segment = get_segment(segment->m_vaddr + segment->m_vsize, (addr + sz) - (segment->m_vaddr + segment->m_vsize)); if (next_segment) { size_t copy_sz = segment->m_vaddr + segment->m_vsize - addr; mapped_addr = (char*)(segment->m_faddr + (addr - segment->m_vaddr)); memcpy(buffer, mapped_addr, copy_sz); memcpy((char*)buffer + copy_sz, next_segment->m_faddr, sz - copy_sz); rc = CA_TRUE; } } } #endif } else rc = inferior_memory_read(addr, buffer, sz); // if user preset values within the range, use it if (rc && g_set_values) get_preset_value(addr, buffer, sz); return rc; } ////////////////////////////////////////////////////////////// // virtual address to mmaped-file address ////////////////////////////////////////////////////////////// void* core_to_mmap_addr(address_t vaddr) { struct ca_segment* segment = get_segment(vaddr, 1); if (segment && vaddr >= segment->m_vaddr && vaddr <= segment->m_vaddr + segment->m_vsize && segment->m_fsize >= vaddr - segment->m_vaddr) { return segment->m_faddr + (vaddr - segment->m_vaddr); } return NULL; } static void* sys_alloc(size_t sz) { void* result; #ifdef WIN32 result = VirtualAlloc(NULL, sz, MEM_COMMIT | MEM_TOP_DOWN, PAGE_READWRITE); if (!result) #elif defined(__MACH__) result = mmap(NULL, sz, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0); if(result == (void*)-1) #else result = mmap(NULL, sz, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); if(result == (void*)-1) #endif { CA_PRINT("Fatal: failed to allocate "PRINT_FORMAT_SIZE" bytes from kernel\n", sz); return NULL; } return result; } static void sys_free(void* p, size_t sz) { #ifdef WIN32 VirtualFree (p, 0, MEM_RELEASE); #else munmap ((char*)p, sz); #endif }
// DoErrorUnary implerments a unary invocation with error handling func DoErrorUnary(c calculatorpb.CalculatorServiceClient) { log.Println("Starting to do a unary RPC for SquareRoot...") numbers := []float64{14.14, 16.0, -64.0, 225., math.NaN(), 0.0} for _, n := range numbers { log.Printf("For number: %g", n) res, err := c.SquareRoot(context.Background(), &calculatorpb.SquareRootRequest{Number: n}) if err != nil { s := status.Convert(err) if s.Code() == codes.InvalidArgument { log.Printf("\tError computing square root: %v", s.Message()) } else { log.Fatalf("\tError obtaining response: %v", s.Message()) } continue } log.Printf("\tRoot is: %g", res.GetRoot()) } }
Games have a seemingly supernatural ability to punt my heart into my mouth. Nothing compares, not the slow burn terror of Ridley Scott’s Alien, nor the sickening dread of watching a Dario Argento film. When games press the right buttons, they spark a physical, innate sense of threat, instantly sending the hard-wired fight or flight reflexes in the brain flaring into action. Run. Hide. Survive. But why are games so good at unsettling us, and how do developers shape their creations to make them as terrifying as possible? (Above: Amnesia: The Dark Descent) Over the next week, I’ll be tackling this question, having spoken to a range of leading game developers and experts about games from Alien: Isolation, SOMA and Amnesia: The Dark Descent to BioShock, Thief and F.E.A.R. In part one, I’ll be picking apart the building blocks of fear: how sound design and enemy AI go towards terrifying players. Next week, in part two, I’ll be looking at the ways that story and level design are ushering in a new breed of horror game. The Sound and the (threat of) Fury Seeing the enemy in a game is rarely the most terrifying part of the encounter. Sound, as every good filmmaker, theatre director and haunted house architect will tell you, is one of the most potent tools for creating a sense of tension. Thomas Grip, creative director at Frictional Games, is behind titles such as Amnesia: The Dark Descent, the Penumbra series and the recently released SOMA. He spoke to me about how crucial sound design is to the development of both horror games, and computer-generated worlds in general. “Sounds sound a lot more real than how graphics look,” he said. “It is very easy to see flaws in the art, but a lot harder to hear them. So when you hear a monster it feels a lot more real than actually seeing it. Video of SOMA - Creature Trailer | PS4 “Sound is a great way to give the world texture. If you hear the sound of wooden boards creaking above, it emphasises the fact the ceiling is indeed made of wood and it feels a lot more real. The images provide more concrete data for the player, like what sort of space it is, but the sounds are what give that extra spice to make it feel real.” While the visual environment of a game can provide heaps of information to the player, Grips’ comments suggest that sounds that emanate from the things we can’t see are what open our imaginations to all sorts of horrible possibilities. Even for a medium famed for its visual potential, there is a great deal of power in what isn’t shown – in what’s left for us to imagine. Personally, I can attest to this; hearing the inhuman cries of the hybrid enemies in System Shock 2 before seeing them always sent a jolt down my nervous system. Likewise, the wet ache of BioShock’s Rapture – its rich symphony of dripping water and creaking architecture – created an unforgettably tense atmosphere, as did the intermittent hum and crackle of the radio in Silent Hill. Hearing something waiting in the dark is so often far scarier than seeing it in the light. Video of Silent Hill 1 Cutscenes - 03 - Strange Radio Stealth games – with their atmospheric, generally slow, gameplay – tend to pay specific attention to sound design. The Thief series, while technically not horror titles, have provided some of the most unsettling gaming experiences ever devised. Perhaps the most iconic of these is "Robbing the Cradle" in Thief: Deadly Shadows (or Thief 3), a masterclass in level design spanning a vast building, which, as you learn over the course of your time there, was both an orphanage and an insane asylum at the same time. This ominous environment is perfectly complimented by a haunting sound design. Jordan Thomas, the man behind Robbing the Cradle, designer on BioShock, director on BioShock 2 and writer on BioShock Infinite (and architect of the superb The Magic Circle) explained what made it so terrifying: “The first half of Robbing the Cradle is a little exotic for a Thief mission in that there are no AI enemies to hunt you. You are just being hunted by sounds. You're hunted by what you imagine coming after you – the more the environment can suggest than state, the more spare cycles you have to mentally scare yourself. People would imagine whatever they found to be the most menacing.” (Above: Thief 3) Letting the player’s imagination run riot is, as Grip and Thomas suggest, one way of approaching the monsters in a game. The most terrifying adversary is what we build with our own minds – the nagging feeling that something unseen is lurking just behind us. Our worst nightmares lurking close by. But what about the thing that actually is coming after you? Intelligent Monsters The first time I played Alien: Isolation I was with a group of friends. “Look at that bony prat,” I shouted, pointing at the gangly xenomorph while my friend cowered behind a box. We laughed. My friend died. Later, alone in the dark, I clasped the controller with what I can only describe as religious penance. The sound of laughter gone. The beep of my sensor told me the alien was close. I pelted across the room to an air vent and there it was, toying with me. What scared me wasn’t the look of the alien, but how intelligent it was. I was being hunted. “Alien: Isolation is one game that completely nails the use of AI for horror,” Michael Cook explained. Cook is an AI expert and senior research fellow at Falmouth University, and has spent several years working on automated game design, including a project to develop an AI system that can intelligently design its own videogames. He also runs PROCJAM, a game jam focused on procedural generation. Convincing the player that the AI is better than it actually is, he explained to me, is a crucial element of what makes Alien: Isolation so terrifying. (Above: Alien: Isolation) “Creative Assembly understood how to use level and sound design to support an AI character like the alien, to cover up its weaknesses. If the AI does something stupid, it breaks the horror illusion and the enemy isn't scary any more. Things like allowing the Alien to escape into vents and designing levels with blind corners and obstructions means you can keep the tension high without forcing the Alien to expose itself too much.” Artificial intelligence, much like real intelligence, is convincing until the person wielding it does something stupid. When the alien appears to lie in wait or hunt you through spaceship corridors, it’s easy to convince yourself that you’re at the mercy of a perceptive monster. When it circles in the same route and gets stuck on doorways – less so. Video of Alien Isolation - It's Hunting Me Trailer (PS4/Xbox One) Jordan Thomas told me that, in terms of Thief 3, the tactic with enemies in Robbing the Cradle was similarly angled towards the ethos of less is more, an inspiration drawn also in part from Spielberg’s Jaws: “I definitely knew that if you showed too much of the shark it would lose all of its menace,” he tells me. “It now cracks me up that Spielberg said that he wanted to show more of the shark but just couldn't afford it.” It turns out, though, that there’s a useful side-effect of making your antagonist a shark or an alien. According to Michael Cook, choosing to make the enemy of the game a non-human monster is actually a clever way to cover up potential flaws in its intelligence. “We're too familiar with human intelligence, which makes it easy for us to spot mistakes and slip-ups by the AI,” he said. “But animal intelligence has this unknowable quality to it – we see it in games like Alien: Isolation or Amnesia – where we can't always rely on it to be predictable or understandable. I think this kind of leeway is really important for developers, because it allows them to bend the rules a bit – we can be terrified by how clever a monster is, or how impulsive and aggressive.” Video of Amnesia The Dark Decent Best Of Reactions Compilation Playing against an animal or monster, we make unconscious concessions about its intelligence. As soon as you have an avatar that looks like a human, we expect more. What if you can convince your player that there is more? Jeff Orkin, AI developer behind the 2005 title F.E.A.R. reassured me that humans can be scary after all. “Animals might have heightened abilities to see or hear, compared to humans, and might have greater physical strength, but they're not going to try to second guess or outsmart you,” he said. “When you see a human threat, and that threat evades you into the shadows, what is he going to do next?” (Above: F.E.A.R.) Orkin tells me that, although F.E.A.R. is still lauded for its AI, many of the reasons players were unnerved by the intelligence of the enemies were down to clever sound design: “We took every situation where an NPC would normally say something – crying out in pain, detecting a threat, losing track of a threat, retreating – and replaced the "bark" or monologue with a dialogue between multiple NPCs. For example, instead of crying out in pain when an NPC gets shot, we would have another NPC shout "Are you alright?" and the guy who got shot would reply "I'm hit!".” Fear of the machine What happens when you go further than animal and human intelligence? In System Shock 2, a large portion of horror comes from the omnipresent threat of SHODAN, the rogue AI in control of the Von Braun. Having SHODAN aware of your every move layers your actions in the game with an added sense of paranoia, but as Cook told me, while superhuman AI makes a great antagonist, a truly intelligent AI would be incredibly frustrating to play against. Video of System shock 2: Shodan's Reveal! (Above: System Shock 2 - warning SPOILERS) “It’s really hard to convey extreme intelligence while also allowing the player to stay alive long enough to be scared,” he said. “We could imagine an incredible intelligent creature that the player can't outwit, and that might be completely terrifying, but if there's no way to eventually win and overcome it then the effect probably wears off quite quickly.” While horror movies get a lot of scares by showing how unstoppable a creature is, it's a much harder trick to pull off in games without alienating the player. Cook explained to me that game AI is more like a pantomime villain than a real monster, where its aim is to play along with you to tease out the most dramatic scenes rather than flat out kill you. If an game AI really did let go, you’d be dead in an instant. That, in itself, is quite a terrifying idea to consider. Smart AI can be scary, but the illusion of intelligence isn't the only way to unsettle players. Next week, in part two, I’ll be looking at how games can go beyond jump scares, to make us scared our ourselves. I’ll be talking to Jordan Thomas about BioShock, Tom Jubert and Thomas Grip about Penumbra and Soma.
// debug version of reflect.DeepEqual func DeepEqual(x, y interface{}) bool { if x == nil || y == nil { return x == y } v1 := reflect.ValueOf(x) v2 := reflect.ValueOf(y) if v1.Type() != v2.Type() { fmt.Println(v1.Type(), " != ", v2.Type()) return false } if v1 != v2 { fmt.Println(v1, " != ", v2) return false } return true }
After 10 years of baiting the “Calatrasaurus” — architect Santiago Calatrava’s years-behind-schedule, billions-of-dollars-over-budget World Trade Center Transportation Hub — I finally visited the belly of the beast. I strolled through the football field-length Oculus, which I’d ridiculed as “elephantine excess” and likened to an “LOL-ugly” sci-fi movie horror, and which The New York Times’ architectural critic gently termed a “kitsch stegosaurus.” And — surprise! — the Oculus, which will partially open to the public the first week in March, is as functionally vapid inside as it is outside. It’s a void in search of a purpose other than to connect a bunch of subway and pedestrian corridors and concourses with one another. The ribs rising to a 22-foot-wide skyline frame an impressive ovoid space, for sure. How could a white marble floor 392 feet long, 144 feet wide and a ceiling 160 feet high at its apex not be impressive? But what will the public find on the vast, 56,448-square-foot floor? Nothing. Not a seat. No newsstands or snack concessions. No central information kiosk like the one that provides a focus to the main hall of Grand Central Terminal, to which Calatrava and the Port Authority presumptuously compare the hub. Why? An empty floor was Calatrava’s idea. But also, the PA plans to pimp out the Oculus as an event venue, and any installations would get in the way. (How transit riders will make their way around weddings and corporate celebrations remains to be explained.) At the notoriously crowded, 16-acre WTC site where every square inch is precious, the Oculus has free rein to stretch and preen out of all proportion to its function. The Oculus is not the “eighth wonder of the world,” as Port Authority capital projects chief Steve Plate called it during Friday’s walk-through. It might one day be regarded as a “civic monument,” as Calatrava himself termed it on Friday. For all the project’s faults, first-time visitors will ooh and aah over the white-painted steel ribs and vertical window panes that frame an unthreatening cathedral of light. Unlike the fishbone exterior, the innards possess at least some of the “lyrical buoyancy” I found in the original 2005 design before cost-cutting snipped away its most gracious elements. But the March opening will allow access only from PATH platforms to the west. Commuters will find a lifeless void until 75,000 square feet of stores around its perimeter on two levels open when leaseholder Westfield gets around to it and until myriad under-construction elevators and escalators connect with subway lines and nearby office buildings. The passageways, to open later this year, will let you walk underground all the way from Brookfield Place in Battery Park City to William Street via the MTA’s Fulton Center — although, except in a blizzard, most of us would rather enjoy the sights and sounds of the streets. Recriminations over the hub’s epic construction saga and $4.4 billion cost won’t likely vanish even after it’s fully functional. As a reminder, Port Authority executive director Patrick Foye — who’s called his own agency’s pet project a “boondoggle” — gave us the following remarkable statement: “The cost of projects, big and small, matters — a lot. Whether due to unforeseen conditions, errors or misconduct, cost overruns consume precious resources and undermine public confidence.” So does a monument to an architect’s ego and a public agency’s institutional vainglory.
/** * gets all contents start with a tag "span" * * @param courseCode a nine-digit course code to be searched * @return a list of elements, each represents a content with tag "span * @throws IOException if gets wrong input */ public static Elements fullCourseToTags(String courseCode) throws IOException { String url_fy = "https://coursefinder.utoronto.ca/course-search/search/" + "courseInquiry?methodToCall=start&viewId=CourseDetails-" + "InquiryView&courseId=" + courseCode + "20219"; String url_s = "https://coursefinder.utoronto.ca/course-search/search/" + "courseInquiry?methodToCall=start&viewId=CourseDetails-" + "InquiryView&courseId=" + courseCode + "20221"; Document html; if (courseCode.endsWith("F") || courseCode.endsWith("Y")) { html = Jsoup.connect(url_fy).get(); } else { html = Jsoup.connect(url_s).get(); } return html.select("span"); }
/** * Pair of points. Used for serialising calibration points because IndependentPair * is not serialisable. * @author billy * */ class PointPair implements Serializable { private float firstX; private float firstY; private float secondX; private float secondY; /** * Sole constructor. * @param pair IndependentPair to copy. */ public PointPair(IndependentPair<? extends Point2d, ? extends Point2d> pair) { firstX = pair.firstObject().getX(); firstY = pair.firstObject().getY(); secondX = pair.secondObject().getX(); secondY = pair.secondObject().getY(); } /** * Creates an IndependentPair of the same values as this object. * @return Converted pair. */ public IndependentPair<? extends Point2d, ? extends Point2d> toIndependentPair() { return new IndependentPair<Point2d, Point2d>( new Point2dImpl(firstX, firstY), new Point2dImpl(secondX, secondY)); } }
. In this retrospective study we discuss 12 cases of cervical cancer diagnosed during pregnancy. At the time of diagnosis of cervical cancer 11/12 patients were older than 29 years. According to FIGO 3/12 cases were in stage Ia1 cervical carcinoma and 9/12 in stage Ib. After a follow up of at least 35 months no recurrence occurred. We believe, that pregnancy has no negative effect on prognosis of cervical cancer.
A California bill that would eliminate health insurance companies and provide government-funded health coverage for everyone in the state would cost $400 billion and require significant tax increases, legislative analysts said Monday. Much of the cost would be offset by existing state, federal and private spending on health coverage, the analysis found, but total healthcare costs would increase by an estimated $50 billion to $100 billion a year. That's a massive sum in a state where the entire general fund budget is $125 billion. State Sen. Ricardo Lara, a Democrat, said he'll propose a mechanism for raising the necessary tax revenue soon. The California Nurses Association, which is the driving force behind the bill, has commissioned a study to look at options. The concept known as single-payer has energized liberals who are pushing Democratic lawmakers to approve the measure. The nursing union and other backers say eliminating insurance company profits and administrative costs would allow for more spending on patient care. Employers, business groups and health plans warned that the tax increases would crush businesses and make it harder for them to expand their workforce in California. "The impact on employers I think is going to be absolutely astounding,"Republican state Sen. Jim Nielsen said in a Senate Appropriations Committee hearing on the bill Monday. "How can you possibly say this is going to be fiscally prudent for the state of California, not a burden for the state?" SB562 would guarantee health coverage with no out-of-pocket costs for all California residents, including people living in the country illegally. The state would contract with hospitals, doctors and other healthcare providers and pay the bills for all residents similar to the way the federal government covers seniors through Medicare. The measure envisions using all public money spent on healthcare — from Medicare, Medicaid, federal public health funds and "Obamacare" subsidies. That's enough to cover about half of the $400 billion cost, according to the legislative analysis. The rest would come from higher taxes on businesses, residents or both. It would take a 15% payroll tax to raise enough money, the analysis said. Two-thirds of the Assembly and Senate must approve the tax increases required to fund it. If it were to clear the Legislature and be signed by Democratic Gov. Jerry Brown, who has expressed skepticism, it would need cooperation from President Donald Trump's administration to waive rules about federal Medicare and Medicaid dollars.
<reponame>achilex/MgDev /* Copyright (C) 2004-2011 by Autodesk, Inc. This library is free software; you can redistribute it and/or modify it under the terms of version 2.1 of the GNU Lesser General Public License as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ package org.osgeo.mapguide; import java.util.*; import java.io.*; public class MgLocalizer { protected static String english = "en"; protected static String localizationPath = ""; protected static Hashtable languages = new Hashtable(); public static void SetLocalizedFilesPath(String path) { localizationPath = path; } public static String Localize(String text, String locale, int os) { String fontSuffix = (os==0? "Windows": (os==1? "Macintosh": "Linux")); Hashtable sb = null; try { sb = GetStringBundle(locale); } catch (Exception e) { return ""; } int len = text.length(); for (int i = 0; i < len; ) { int pos1 = text.indexOf("__#", i); if (pos1 != -1) { int pos2 = text.indexOf("#__", pos1 + 3); if (pos2 != -1) { String id = text.substring(pos1 + 3, pos2); String locStr; locStr = (String)sb.get(id.equals("@font") || id.equals("@fontsize") ? id + fontSuffix : id); if (locStr == null) locStr = ""; int locLen = locStr.length(); String begin, end; if (pos1 > 0) begin = text.substring(0, pos1); else begin = ""; end = text.substring(pos2 + 3); text = begin + locStr + end; len = len - 6 - id.length() + locLen; i = pos1 + locLen; } else i = len; } else i = len; } return text; } public static String GetString(String id, String locale) { Hashtable sb = null; try { sb = GetStringBundle(locale); } catch (Exception e) { return ""; } String s = (String)sb.get(id); if (s == null) return ""; return s; } protected static Hashtable GetStringBundle(String locale) { if (locale.equals("")) locale = english; else locale = locale.toLowerCase(); if (!languages.containsKey(locale)) { BufferedReader in = null; try { File f = new File(localizationPath + locale); if (!f.exists()) { // requested locale is not supported, default to English if (languages.containsKey(english)) return (Hashtable)languages.get(english); f = new File(localizationPath + english); } in = new BufferedReader(new InputStreamReader(new FileInputStream(f), "UTF-8")); String line; Hashtable sb = new Hashtable(); while ((line = in.readLine()) != null) { line = line.trim(); if (line.equals("") || line.charAt(0) == '#') continue; int sep = line.indexOf('='); if (sep == -1) continue; String key = line.substring(0, sep).trim(); if (key.equals("")) continue; sb.put(key, line.substring(sep + 1).trim()); } languages.put(locale, sb); } catch (Exception e) { return null; } finally { if (in != null) { try { in.close(); } catch (Exception e) { } } } } return (Hashtable)languages.get(locale); } }
def project_stars(self): if self.trace_orbit_func is None: raise UserWarning( 'Need to explicitly set trace orbit function ' 'i.e. with mysynthdata.trace_orbit_func = trace_epicyclic_orbit') for star in self.table: mean_then = self.extract_data_as_array( table=star, colnames=[dim+'0' for dim in self.cart_labels], ) xyzuvw_now = self.trace_orbit_func(mean_then, times=star['age']) for ix, dim in enumerate(self.cart_labels): star[dim+'_now'] = xyzuvw_now[ix]
<filename>client/Gw2RestClient.py import requests import urllib class Gw2RestClient: def __init__(self): self.root_api_endpoint = "https://api.guildwars2.com" def validate_id_string(self): regexp = "([\d]+,?)*\d+" # TODO: complete regex validation def get_request(self, endpoint, arguments, api_key=None): complete_endpoint = self.root_api_endpoint + endpoint headers = None if(api_key is not None): headers = {"Authorization": "Bearer {}".format(api_key)} get_response = requests.get(complete_endpoint, params=arguments, headers=headers) if(get_response.status_code == 200): return get_response.json() def get_file_list(self, ids=None): ep_files = "/v2/files" args = {"ids": "all" if ids is None else ids} files_data = self.get_request(ep_files, args) return files_data def get_characters(self, api_key, char_name=None): ep = "/v2/characters" safe_char_name = "" if(char_name is not None): safe_char_name = urllib.parse.quote(char_name) char_data = self.get_request(ep + "/" + safe_char_name, None, api_key) return char_data def get_dailies(self, tomorrow: bool=False): ep_today = "/v2/achievements/daily" ep_tomorrow = ep_today + "/tomorrow" dailies_data = self.get_request(ep_tomorrow if tomorrow else ep_today, None) return dailies_data def get_masteries(self, ids, lang=None): ep_masteries = "/v2/masteries" args = {"ids": ids} if(lanf is not None): args["lang"] = lang masteries_data = self.get_request(ep_masteries, args) return masteries_data def get_achievements(self, ids, lang=None): ep_daily_details = "/v2/achievements" args = {"ids": ids} if(lang is not None): args["lang"] = lang daily_details = self.get_request(ep_daily_details, args) return daily_details def get_items(self, ids, lang=None): ep_items = "/v2/items" args = {"ids": ids} if(lang is not None): args["lang"] = lang items = self.get_request(ep_items, args) return items def get_itemstats(self, ids, lang=None): ep_itemstats = "/v2/itemstats" args = {"ids": ids} if(lang is not None): args["lang"] = lang itemstats_data = self.get_request(ep_itemstats, args) return itemstats_data def get_titles(self, ids, lang=None): ep_titles = "/v2/titles" args = {"ids": ids} if(lang is not None): args["lang"] = lang titles = self.get_request(ep_titles, args) return titles def get_skills(self, ids, lang=None): ep_skills = "/v2/skills" args = {"ids": ids} if(lang is not None): args["lang"] = lang skills = self.get_request(ep_skills, args) return skills def get_skins(self, ids, lang=None): ep_skins = "/v2/skins" args = {"ids": ids} if(lang is not None): args["lang"] = lang skins = self.get_request(ep_skins, args) return skins def get_masteries(self, ids, lang=None): ep_masteries = "/v2/masteries" args = {"ids": ids} if(lang is not None): args["lang"] = lang masteries = self.get_request(ep_masteries, args) return masteries def get_minis(self, id, lang=None): ep_minis = "/v2/minis" args = {"ids": ids} if(lang is not None): args["lang"] = lang minis_data = self.get_request(ep_minis, args) return minis_data def get_guild_id(self, name): ep_guild_search = "/v2/guild/search" # the argument "name" will be automatically url-encoded args = {"name": name} guild_id = self.get_request(ep_guild_search, args) return guild_id def get_guild(self, id, api_key): ep_guild = "/v2/guild/{}" guild_data = self.get_request(ep_guild.format(id), None, api_key) return guild_data def get_guild_upgrades(self, ids, lang=None): ep_guild_upgrades = "/v2/guild/upgrades" args = {"ids": ids} if(lang is not None): args["lang"] = lang upgrades_data = self.get_request(ep_guild_upgrades, args) return upgrades_data def get_guild_log(self, id, api_key, nb_lines=None): ep_guild_log = "/v2/guild/{}/log" log_data = self.get_request(ep_guild_log.format(id), None, api_key) if(nb_lines is not None): return log_data[:nb_lines] return log_data
<gh_stars>1-10 # -*- coding: utf-8 -*- """ Functions necessary for fitting SEIR to data """ import datetime as dt import numpy as np import pandas as pd from scipy.optimize import least_squares from scipy import stats import os import datetime from datetime import timedelta import multiprocessing as mp import pickle import json from collections import defaultdict from SEIRcity.model import SEIR_model_publish_w_risk from SEIRcity import param as param_module from SEIRcity import get_scenarios, utils from .defaults import DEFAULT_FIT_VAR_NAMES, DEFAULT_FIT_GUESS, DEFAULT_FIT_BOUNDS from ..simulate import simulate_one def fitting_workflow(config, out_fp=None): """Recapitulation of fit_to_data.fitting_workflow from branch parameter_fitting. Main handler for fitting. """ # get YAML params #config = param_module.aggregate_params_and_data(yaml_fp=yaml_fp) # get list of params to float, as well as guesses and bounds, # from the config YAML fit_var_names = config.get("fit_var_names", DEFAULT_FIT_VAR_NAMES) fit_guess = config.get("fit_guess", DEFAULT_FIT_GUESS) fit_bounds = config.get("fit_bounds", DEFAULT_FIT_BOUNDS) # TODO: validation on fit_var_* data formats # get hosp data as pandas df case_data = pd.read_csv(config['hosp_data_fp']) # get a list of Scenario instances. similar to gather_params scenarios_tup = get_scenarios.get_scenarios(config=config) # assert that there is only one Scenario in the list if len(scenarios_tup) > 1: # print(scenarios_tup) raise ValueError('{} parameter '.format(len(scenarios_tup)) + 'sets generated for fitting, but only one is ' + 'allowed. Please check the config file.') else: scenario = scenarios_tup[0] scenario.inject() scenario['config'] = config # Kelly's addition to workflow data_start_date = dt.datetime.strptime(np.str(case_data['date'][0]), '%Y-%m-%d') data_pts = case_data['hospitalized'].values date_begin = dt.datetime.strptime(np.str(scenario['time_begin_sim']), '%Y%m%d') + \ dt.timedelta(weeks=scenario['shift_week']) if date_begin > data_start_date: sim_begin_idx = (date_begin - data_start_date).days case_data_values = data_pts[sim_begin_idx:] comparison_offset = 0 else: comparison_offset = (data_start_date - date_begin).days case_data_values = data_pts # run the solver, returning dictionary containing error # and fitted values solution = fit_to_data( fit_var_names=fit_var_names, fit_guess=fit_guess, fit_bounds=fit_bounds, sim_func=simulate_one, #SEIR_model_publish_w_risk, scenario=scenario, data=case_data_values, offset=comparison_offset) # pretty logging for var_name in solution.keys(): print("{}: {}".format(var_name, solution[var_name])) # write solution to a tiny CSV if out_fp is not None: print("Writing fitted values to: {}".format(out_fp)) as_df = pd.DataFrame([solution]) as_df.to_csv(out_fp, index=False) return solution def fit_to_data(fit_var_names, fit_guess, fit_bounds, sim_func, scenario, data, offset): """Wrapper around scipy.optimize.least_squares""" # Ensure that there are guess and bounds values # for each floating parameter utils.assert_has_keys(fit_guess, fit_var_names) utils.assert_has_keys(fit_bounds, fit_var_names) utils.assert_has_keys(scenario, fit_var_names) # Flatten guess and bounds arrays into x0 and bounds # args, respectively x0 = list() bounds_lst = list() for var_name in fit_var_names: x0.append(fit_guess[var_name]) bounds_lst.append(fit_bounds[var_name]) # least_squares needs bounds in the format # [[lower1, lower2], [upper1, upper2]], not # [[lower1, upper1], [lower2, upper2]] bounds = np.stack(bounds_lst, axis=1) # define x_scale: same as multipying beta0 by 100 x_scale = np.ones_like(x0) if 'beta0' in fit_var_names: beta_idx = fit_var_names.index('beta0') x_scale[beta_idx] = 0.01 # call scipy.optimize.least_squares soln_full = least_squares( fun=calc_residual, x0=x0, #x_scale=x_scale, #xtol=1e-8, # default bounds=bounds, args=(fit_var_names, sim_func, scenario, data, offset)) # convert fitted values to dictionary soln_lst = list(soln_full['x']) soln_dict = dict({ name: val for name, val in zip(fit_var_names, soln_lst) }) # get the final error soln_dict['final_error'] = soln_full['fun'] # Calculate final rmsd and nrmsd soln_dict['final_rmsd'] = rmsd_t(soln_dict['final_error']) soln_dict['final_nrmsd_t'] = nrmsd_t(soln_dict['final_rmsd'], data) return soln_dict def calc_residual(fit_var, fit_var_names, sim_func, scenario, data, comp_offset): """Callback function for fit_to_data""" assert len(fit_var) == len(fit_var_names), \ "length of fit_var: {}, but expected {}".format(len(fit_var), len(fit_var_names)) assert hasattr(scenario, 'n_age'), "Scenario instance has no attribute 'n_age'" # Make sure beta0 is array, not float, before running model function scenario['beta0'] = scenario['beta0'] * np.ones(scenario['n_age']) # For each variable parameter in fit_var, update the corresponding key in the scenario for var_idx in range(len(fit_var_names)): var_name = fit_var_names[var_idx] scenario[var_name] = fit_var[var_idx] # Special treatment for beta0 if var_name == 'beta0': scenario[var_name] = fit_var[var_idx] * np.ones(scenario['n_age']) for var in fit_var_names: print('Variable {} = {}'.format(var, scenario[var])) # filter to only the params needed for model function #scenario_final = filter_params(scenario) sim_args = {'scenario': scenario} # run the model function #S, E, Ia, Iy, Ih, R, D, E2Iy, E2I, Iy2Ih, H2D, SchoolCloseTime, \ # SchoolReopenTime = \ comp_stack = sim_func(**sim_args) Ih = comp_stack[7] fit_compt = Ih.sum(axis=1).sum(axis=1)[ range(0, scenario['total_time'] * scenario['interval_per_day'], scenario['interval_per_day'])] # TODO: explore ways to make the fitting flexible to extend to other compartments #fit_compt = hosp_error(Ih, data, scenario=scenario) return fit_compt[comp_offset: comp_offset + len(data)] - data def hosp_error(hosp_model, hosp_observed, scenario): fit_compt = hosp_model.sum(axis=1).sum(axis=1)[ range(0, scenario['total_time'] * scenario['interval_per_day'], scenario['interval_per_day'])] return fit_compt[:len(hosp_observed)] - hosp_observed def rmsd_t(error): """Root mean squared deviation for time series""" return sum([i**2 for i in error])/len(error) def nrmsd_t(rmsd, data): """Normalised root mean squared deviation""" return rmsd/(max(data) - min(data)) def filter_params(param_dict): assert isinstance(param_dict['beta0'], np.ndarray), \ "beta0 is not a numpy ndarray: beta0 == {}".format(param_dict['beta0']) core_param_keys = { 'metro_pop', 'school_calendar', 'c_reduction_date', 'c_reduction', 'beta0', 'phi', 'sigma', 'gamma', 'eta', 'mu', 'omega', 'tau', 'nu', 'pi', 'n_age', 'n_risk', 'total_time', 'interval_per_day', 'shift_week', 'time_begin', 'time_begin_sim', 'initial_state', 'trigger_type', 'close_trigger', 'reopen_trigger', 'monitor_lag', 'report_rate', 'deterministic', 'config', 't_offset'} # grab only the pars needed for the SEIR model utils.assert_has_keys(param_dict, core_param_keys) drop_keys = set(param_dict.keys()).difference(core_param_keys) for key in drop_keys: param_dict.pop(key) return param_dict
/** * @author Deivid Ferreira * */ @SpringBootTest public class FuncionarioServiceTest extends PontoInteligenteAbstractTests { @MockBean private FuncionarioRepository repository; @Autowired private FuncionarioService service; @Before public void setUp() { BDDMockito.given(this.repository.save(Mockito.any(Funcionario.class))) .willReturn(new Funcionario()); BDDMockito.given(this.repository.findById(Mockito.anyLong())) .willReturn(Optional.of(new Funcionario())); BDDMockito.given(this.repository.findByEmail(Mockito.anyString())) .willReturn(Optional.of(new Funcionario())); BDDMockito.given(this.repository.findByCpf(Mockito.anyString())) .willReturn(Optional.of(new Funcionario())); } @Test public void testPersistirFuncionario() { Funcionario funcionario = this.service.persistir(new Funcionario()); assertNotNull(funcionario); } @Test public void testBuscarFuncionarioPorId() { Optional<Funcionario> funcionario = this.service.buscaPorId(1L); assertTrue(funcionario.isPresent()); } @Test public void testBuscarFuncionarioPorEmail() { Optional<Funcionario> funcionario = this.service.buscarPorEmail(EMAIL); assertTrue(funcionario.isPresent()); } @Test public void testBuscarFuncionarioPorCpf() { Optional<Funcionario> funcionario = this.service.buscarPorEmail(CPF); assertTrue(funcionario.isPresent()); } }
// SetCACertificate gets which certificate the listener is using when spoofing TLS func (listener *ProxyListener) GetCACertificate() *tls.Certificate { listener.mtx.Lock() defer listener.mtx.Unlock() return listener.caCert }
• Former sworn enemies’ lobbyists hard at work expanding Israeli, Saudi influence across region By Richard Walker For the next six months Israel and its former enemy, Saudi Arabia, will use every dirty trick their intelligence services can devise to wreck the potential for a United States-led nuclear deal with Iran. There will be more Israeli threats of military action against Iran and potential bombings inside Iran’s nuclear facilities by Israeli and Saudi proxies. The powerful Israeli lobby, working with Congress and the U.S. media, will also be tasked with persuading the American people any international deal with Iran involving the U.S., Russia, France and Britain will be a disaster. Before the November 24, 2013 agreement with Iran, which set a six-month window to establish a permanent arrangement to ensure Iran’s nuclear program would be for civilian purposes, there were rumors Israel and Saudi Arabia were discussing military action against Iran. The Sunday Times of London blew the whistle on meetings in Vienna, where talks with Iran were taking place, between acolytes of the Saudi intelligence chief, Prince Bandar bin Sultan and Tim Pardo, his Mossad counterpart. The Times claimed plans to use Saudi air space to attack Iran were discussed. The Saudis were quick to deny the report, fearing a backlash in the Arab world they dominate and in the global Islamic community. But the prospect of potential military action by Israel and the Saudis was not the only threat being reported. The Iranian Fars news agency and media outlets in Israel carried reports Israel was preparing new cyber-attacks against Iran’s nuclear facilities of the kind used in the past. The most obvious attack was the one several years ago when a worm called Stuxnet, designed by Mossad and the Central Intelligence Agency, was unleashed on Iran’s nuclear facilities. This time, Israel is expected to use an even more powerful cyber-tool. Should the U.S. and its international partners strike a permanent nuclear deal with Iran in six months time, relations between Washington and Teheran would be mended, effectively ending Israel’s potential to use military force to destroy the Iranian regime. That much was clear in a recent statement by former Israeli security official, Major General Giora Eiland. But while Israel will, as Israeli Prime Minister Benjamin Netanyahu has promised, direct Mossad to focus on Iran in the coming months, the major Israeli strategy will be to turn the American public against a deal with Iran. That much was obvious in recent comments by Netanyahu’s finance minister, Yair Lapid. “We have six months, at the end of which we need to be in a situation in which the Americans listen to us the way they used to listen to us in the past,” said Lapid, whose views were shared by Yoel Guzanksy, a former Israeli national security advisor on Iran’s nuclear program. Of course, the way Israel shapes American public opinion is by using Congress, which has been bought and paid for by the Zionist lobby in the U.S., especially by powerful groups like the American Israel Public Affairs Committee (AIPAC), which has massive financial backing. Professor James Petras, who has written extensively about what he terms the “Zionist Power Configuration,” or ZPC, believes Israel’s war with Iran “would not amount to much more than its cyber sabotage, the periodic assassinations of Iranian scientists using its paid agents among Iranian terrorist groups and non-stop brow-beating from Israeli politicians and their amen crowd,” were it not for Israel’s capacity to manipulate the U.S. political system. If one accepts his analysis, the prospect of a deal with Iran will be in jeopardy over the coming months as Israel ratchets up a campaign to derail the process. He had this to say in a lengthy article on his website: “The ZPC has purchased the alliance of U.S. Congress people and Senators on a massive scale: Of 435 members of the U.S. House of Representatives (sic), 219 have received payments from the ZPC in exchange for their votes on behalf of the state of Israel. Corruption is even more rampant among the 100 U.S. Senators, 94 of whom have accepted pro-Israel PAC and Super PAC money for their loyalty to Israel. The ZPC showers money on both Republicans and Democrats, thus securing incredible (in this era of Congressional deadlock), near unanimous (‘bipartisan’) votes in favor of the ‘Jewish State,’ including its war crimes, like the bombing of Gaza and Lebanon as well as the annual $3 billion plus U.S. tax-payer tribute to Tel Aviv. At least 50 U.S. Senators have each collected between $100 thousand and $1 million in ZPC money over the past decades. In exchange, they have voted for over $100 billion in tribute payments to Israel…in addition to other ‘services and payments.’ The members of the U.S. Congress are cheaper: 25 legislators have received between $238,000 and $50,000, while the rest got peanuts. Regardless of the amount, the net result is the same: Congressional member pick up their script from their Zionist mentors in the PACs, Super PACs and AIPAC and back all of Israel’s wars in the Middle East and promote U.S. aggression on behalf of Israel.”
package no.hials.vr; import com.google.gson.Gson; import com.oculusvr.capi.Hmd; import static com.oculusvr.capi.OvrLibrary.ovrTrackingCaps.*; import com.oculusvr.capi.OvrQuaternionf; import com.oculusvr.capi.OvrVector3f; import com.oculusvr.capi.TrackingState; import java.io.IOException; import java.net.InetSocketAddress; import java.net.UnknownHostException; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Scanner; import java.util.logging.Level; import java.util.logging.Logger; import org.java_websocket.WebSocket; import org.java_websocket.handshake.ClientHandshake; import org.java_websocket.server.WebSocketServer; /** * WebSocket server that provides tracking info Dependencies are: JOVR, GSON and * Java_WebSockets * * @author <NAME> */ public class OculusWS { private static final int port = 8888; private static long id = 0; private static SensorData latestData = new SensorData(0, 0, 0, 0, 0, 0, 0, 0); private static boolean run = true; /** * Program starting point * * @param args the command line arguments * @throws java.net.UnknownHostException */ public static void main(String[] args) throws UnknownHostException { Hmd.initialize(); try { Thread.sleep(500); } catch (InterruptedException e) { throw new IllegalStateException(e); } Hmd hmd = Hmd.create(0); if (hmd == null) { throw new IllegalStateException("Unable to initialize HMD"); } hmd.configureTracking(ovrTrackingCap_Orientation | ovrTrackingCap_MagYawCorrection | ovrTrackingCap_Position, 0); Thread t1 = new Thread(new SensorFetcher(hmd)); t1.start(); OculusSocket oculusSocket = new OculusSocket(port); oculusSocket.start(); System.out.println("Press 'q' to quit.."); System.out.println(""); Scanner sc = new Scanner(System.in); while (run) { if (sc.nextLine().trim().equals("q")) { run = false; } } try { oculusSocket.stop(); } catch (IOException | InterruptedException ex) { Logger.getLogger(OculusWS.class.getName()).log(Level.SEVERE, null, ex); } try { t1.join(); } catch (InterruptedException ex) { Logger.getLogger(OculusWS.class.getName()).log(Level.SEVERE, null, ex); } hmd.destroy(); Hmd.shutdown(); } private static class OculusSocket extends WebSocketServer { private final Gson gson = new Gson(); public OculusSocket(int port) throws UnknownHostException { super(new InetSocketAddress(port)); System.out.println("Websocket server running... Listning on port " + port); } @Override public void onOpen(WebSocket ws, ClientHandshake ch) { DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); Date date = new Date(); System.out.println(""); System.out.println(dateFormat.format(date) + " : " + ws.getRemoteSocketAddress() + " connected!"); System.out.println(""); } @Override public void onClose(WebSocket ws, int i, String string, boolean bln) { DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); Date date = new Date(); System.out.println(dateFormat.format(date) + " : " + ws.getRemoteSocketAddress() + " disconnected!"); } @Override public void onError(WebSocket ws, Exception excptn) { DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); Date date = new Date(); System.out.println(dateFormat.format(date) + " : " + ws.getRemoteSocketAddress() + " error!"); } @Override public void onMessage(WebSocket ws, String string) { ws.send(gson.toJson(latestData.asArray())); } } private static class SensorFetcher implements Runnable { private final Hmd hmd; public SensorFetcher(Hmd hmd) { this.hmd = hmd; } @Override public void run() { while (run) { TrackingState sensorState = hmd.getSensorState(Hmd.getTimeInSeconds()); OvrVector3f pos = sensorState.HeadPose.Pose.Position; OvrQuaternionf quat = sensorState.HeadPose.Pose.Orientation; double px = pos.x; double py = pos.y; double pz = pos.z; double qx = quat.x; double qy = quat.y; double qz = quat.z; double qw = quat.w; latestData = new SensorData(id++, px, py, pz, qx, qy, qz, qw); //System.out.println(latestData); try { Thread.sleep(1); } catch (InterruptedException ex) { Logger.getLogger(OculusWS.class.getName()).log(Level.SEVERE, null, ex); } } } } private static class SensorData { private final long id; private final double px, py, pz, qx, qy, qz, qw; public SensorData(long id, double px, double py, double pz, double qx, double qy, double qz, double qw) { this.id = id; this.px = px; this.py = py; this.pz = pz; this.qx = qx; this.qy = qy; this.qz = qz; this.qw = qw; } public long getId() { return id; } public double[] asArray() { return new double[]{id, px, py, pz, qx, qy, qz, qw}; } @Override public String toString() { return String.format("Position: %.3f %.3f %.3f | Quat: %.3f %.3f %.3f %.3f", px, py, pz, qx, qy, qz, qw); } } }
By: Producer/Director — Alfonso Pozzo. MLB Network My History: I’ve been producing documentaries for 17 years now. I worked for MLB Productions- the in-house production company for Major League Baseball, for quite some time. We have now moved over to MLB Network. I’ve personally directed and been lead producer on about 10 documentaries the past few years and worked on dozens more. It’s always been a passion of mine to do sports and TV at the same time. In addition to long-form docs, I used to do a weekly magazine show, so I’ve done it all in terms of baseball production. I love the storytelling aspect of it. The narrative element sincerely appeals to me. Assembling a Team: As the producer, when we do these shows, we take the idea from conception all the way to delivery. Whether we pitch the idea or were given the idea; we create the concept of the show, put together a treatment and then once it gets greenlit, we see it all the way through. That ends up including a lot of the writing — whether it’s the writing based off the original premise, or the final script that will fall into the hands of a celebrity or former player. Usually, I will write it and then we have another writer polish it up. We put together a team of five to six guys per project with one person leading the charge. I’m working on one right now on Cuban baseball. It’s taken most of this year. I have a staff of six who are helping me and have come on and off the set during the season. The Production Process: The first thing I draw up an outline and figure out the exact story I’d like to tell. We usually do one hour shows. It involves it being split up into six acts. You figure out if you want to tell a linear story or things out of sequence. I am a guy who likes to work in groups so we usually bounce ideas back and forth. You then put together who your main players are. With The Curious Case of the Chicago Cubs show, we knew we needed to get the players, the coaches, the front office guys and the fans. You want to tell the story from both a fan and player perspective. The complicated part is figuring out when you can get everyone, given their busy schedules. That’s the part I really enjoy, determining the best time for everyone. We knew there were certain players we had to be ready for when they came in to play Chicago. That was our only chance. It’s playing this game where there are a lot of moving parts. It can be frustrating, but also very rewarding when you get someone. It’s usually within a very small window. We are not given a lot of time to do it. It’s complicated, but you discover new and interesting people to talk to who have a very unique perspective. Timeline: We create these films pretty quickly. From beginning to end, the whole thing gets turned around in about three months. Once all the content is in house, it takes about six weeks to two months to put it all together. That includes editing, voice-over, audio-mixing and delivery. We work in a very fast-paced environment. There are exceptions, like the Cuban baseball project I am working on now. It has taken up most of this year, though I have taken significant breaks. As a whole, this year we’ve done 11 of these shows. Considering we are a small group of 10–15 guys, that’s a pretty large amount. Cubs (October 2015): With the Cubs documentary, it was my baby and I took it from start to finish. When it comes to the Cubs, people are just very passionate about them. It’s different than any other teams. Especially with last year being the year where they really showed signs of success under the current group of stars and front office. People were very excited to talk about it. When we reached out to guys like Eddie Vedder and George Will, there was no hesitation to speak to us at all. The Cubs are a different phenomenon than any other team. Mostly based on the fact that they had gone so long without a title. People like to talk about it. Cub’s fans have a very unique perspective. It was very interesting to get the insight from every side. It’s a story that’s been told and that we all knew, but the fact that these people were willing to stick with their team is very inspiring. How the fans were able to remain so loyal and keep the faith for so long, should be an inspiration to other teams. That was one of my biggest takeaways. I’ve worked on a ton of other shows, but nothing drew interest like our Cubs show. The Cubs were kind of lying in the woodwork there. Then good things started to happen. You may not understand it if you are not a sports fan, but it was such an incredible experience. I ask the players what they think is going to happen when they win and it’s always the hardest question to answer. It is funny, because they just don’t know. It hasn’t happened for a long time, so they have no idea what to expect. The Lasting Impact: A big part of it is demonstrating the emotion that a lot of these guys have. It’s about telling the human part of the story. At the end of the day, these are all human beings that are experiencing these things. It’s about humanizing everyone. People forget that ballplayers are regular people and they have feelings just like everyone else. That’s what the Cubs show was all about- the emotion of being a Cub fan and the roller-coaster they’ve endured. It’s been a really long-term thing. Now they are at a high, but for so long, they were at a low. You have to figure out a way to expose and uncover these emotions. The goal is to get it across on personal level and strike a chord with the viewer directly. Fox had been re-running The Curious Case of the Chicago Cubs throughout this year’s postseason. We also have another Cubs show in the works now that they have won the World Series. ~Alfonso Pozzo Check out The Curious Case of the Chicago Cubs HERE: Follow Alfonso Pozzo In collaboration with Jeff Gorra — Artist Waves. If you enjoyed, please recommend below. Follow Artist Waves on: Medium, Facebook & Twitter.
import {createHash} from 'crypto'; import {writeFile} from 'fs'; import * as ical from 'ical-generator'; import {ISink} from './ISink'; import {IEvent} from '../core/IEvent'; const sha256 = (x) => createHash('sha256').update(x, 'utf8').digest('hex'); // ref. https://www.npmjs.com/package/ical-generator export class IcalSink implements ISink { private _cal = ical(); private _targetFile: string; constructor(targetFile: string) { this._targetFile = targetFile; } createEvent(event: IEvent): Promise<void> { // TODO better duplicate detection and resolve conflicts lol const eventId = sha256(JSON.stringify(event)).substr(0, 16); const icalEvent = this._cal.createEvent({ uid: eventId, start: event.start.toISOString(), end: event.end.toISOString(), timestamp: new Date(), summary: event.summary, description: event.description, }); return Promise.resolve(); } commit(): Promise<void> { return new Promise<void>((resolve, reject) => { writeFile(this._targetFile, this._cal.toString(), err => { if (err) return reject(err); resolve(); }); }); } }
The Macroeconomic Effects of Macroprudential Policy Central banks increasingly rely on macroprudential measures to manage the financial cycle. However, the effects of such policies on the core objectives of monetary policy to stabilise output and inflation are largely unknown. In this paper we quantify the effects of changes in maximum loan-to-value (LTV) ratios on output and inflation. We rely on a narrative identification approach based on detailed reading of policy-makers’ objectives when implementing the measures. We find that over a four year horizon, a 10 percentage point decrease in the maximum LTV ratio leads to a 1.1% reduction in output. As a rule of thumb, the impact of a 10 percentage point LTV tightening can be viewed as roughly comparable to that of a 25 basis point increase in the policy rate. However, the effects are imprecisely estimated and the effect is only present in emerging market economies. We also find that tightening LTV limits has larger economic effects than loosening them. At the same time, we show that changes in maximum LTV ratios have substantial effects on credit and house price growth. Using inverse propensity weights to rerandomise LTV actions, we show that these effects are likely causal.
<filename>src/ops/ingest_external_file.rs use crate::ffi; use crate::ffi_util::to_cpath; use crate::{handle::Handle, ColumnFamily, Error, IngestExternalFileOptions}; use std::ffi::CString; use std::path::Path; pub trait IngestExternalFile { fn ingest_external_file_full<P: AsRef<Path>>( &self, paths: Vec<P>, opts: Option<&IngestExternalFileOptions>, ) -> Result<(), Error>; /// Loads a list of external SST files created with SstFileWriter into the DB with default opts fn ingest_external_file<P: AsRef<Path>>(&self, paths: Vec<P>) -> Result<(), Error> { self.ingest_external_file_full(paths, None) } /// Loads a list of external SST files created with SstFileWriter into the DB fn ingest_external_file_opts<P: AsRef<Path>>( &self, paths: Vec<P>, opts: &IngestExternalFileOptions, ) -> Result<(), Error> { self.ingest_external_file_full(paths, Some(opts)) } } pub trait IngestExternalFileCF { fn ingest_external_file_cf_full<P: AsRef<Path>>( &self, cf: Option<&ColumnFamily>, paths: Vec<P>, opts: Option<&IngestExternalFileOptions>, ) -> Result<(), Error>; /// Loads a list of external SST files created with SstFileWriter into the DB for given Column Family /// with default opts fn ingest_external_file_cf<P: AsRef<Path>>( &self, cf: &ColumnFamily, paths: Vec<P>, ) -> Result<(), Error> { self.ingest_external_file_cf_full(Some(cf), paths, None) } /// Loads a list of external SST files created with SstFileWriter into the DB for given Column Family fn ingest_external_file_opts<P: AsRef<Path>>( &self, cf: &ColumnFamily, paths: Vec<P>, opts: &IngestExternalFileOptions, ) -> Result<(), Error> { self.ingest_external_file_cf_full(Some(cf), paths, Some(opts)) } } impl<T> IngestExternalFile for T where T: IngestExternalFileCF, { fn ingest_external_file_full<P: AsRef<Path>>( &self, paths: Vec<P>, opts: Option<&IngestExternalFileOptions>, ) -> Result<(), Error> { self.ingest_external_file_cf_full(None, paths, opts) } } impl<T> IngestExternalFileCF for T where T: Handle<ffi::rocksdb_t> + super::Write, { fn ingest_external_file_cf_full<P: AsRef<Path>>( &self, cf: Option<&ColumnFamily>, paths: Vec<P>, opts: Option<&IngestExternalFileOptions>, ) -> Result<(), Error> { let paths_v: Vec<CString> = paths .iter() .map(|path| { to_cpath( &path, "Failed to convert path to CString when IngestExternalFile.", ) }) .collect::<Result<Vec<_>, _>>()?; let cpaths: Vec<_> = paths_v.iter().map(|path| path.as_ptr()).collect(); let mut default_opts = None; let ief_handle = IngestExternalFileOptions::input_or_default(opts, &mut default_opts)?; unsafe { match cf { Some(cf) => ffi_try!(ffi::rocksdb_ingest_external_file_cf( self.handle(), cf.handle(), cpaths.as_ptr(), paths_v.len(), ief_handle )), None => ffi_try!(ffi::rocksdb_ingest_external_file( self.handle(), cpaths.as_ptr(), paths_v.len(), ief_handle )), }; Ok(()) } } }
Microsoft wants so very much to be open that it's created a brand new subsidiary to shoulder the work. Called Microsoft Open Technologies, Inc., the company will be run by a longtime Microsoft standards player, Jean Paoli. The point is to "advance the company’s investment in openness – including interoperability, open standards and open source," Paoli said in a blog post announcing the spinoff. Microsoft didn't much like open source when it first started getting mainstream attention over a decade ago, but in recent years, the company has realized that it needs to cooperate with open source technologies – especially in the data center and on mobile devices – or risk being left behind. In recent years, Microsoft has contributed code and even hosted open-source projects. Last month it emerged as a top contributor to the Linux project. With the subsidiary, Microsoft seems to think that staffers will be nimbler and less hampered by management on the product development side. In the past, critics have accused the company of gaming standards bodies to give its products an edge. "This structure will make it easier and faster to iterate and release open source software, participate in existing open source efforts, and accept contributions from the community," Paoli said. "Over time the community will see greater interaction with the open standards and open source worlds." Critics may still be skeptical of Microsoft's intentions, but the company has made some real steps toward openness, says Mike Cherry, an analyst with the research firm Directions, on Microsoft. Whether the new company will really help things remains to be seen. "At the end of the day we have to wait to see some action," he says. According to his LinkedIn Profile, Paoli has been "involved in the XML community" since before there was XML. (He worked on a non-Internet precursor language called SGML.) He leads a team that works on all kinds of open standards and software, including HTML5, HTTP 2.0, Node.js, and MongoDB. Microsoft couldn't immediately be reached for comment on its new company.
// Copy will create a copy/clone of the runtime. // // Copy is useful for saving some processing time when creating many similar // runtimes. // // This implementation is alpha-ish, and works by introspecting every part of the runtime // and reallocating and then relinking everything back together. Please report if you // notice any inadvertent sharing of data between copies. func (self *Otto) Copy() *Otto { return &Otto{ runtime: self.runtime.clone(), } }
// Move attempts to make a pseudo-legal move. The attempted move is assumed to be // pseudo-legal and generated from the position. Returns false if not legal. func (p *Position) Move(m Move) (*Position, bool) { ret := *p turn, piece, ok := p.Square(m.From) if !ok { return nil, false } ret.xor(m.From, turn, piece) if m.IsCapture() { ret.xor(m.To, turn.Opponent(), m.Capture) } if m.IsPromotion() { piece = m.Promotion } ret.xor(m.To, turn, piece) switch m.Type { case EnPassant: capture, _ := m.EnPassantCapture() ret.xor(capture, turn.Opponent(), Pawn) case KingSideCastle, QueenSideCastle: for _, sq := range safeCastlingSquares(turn, m.Type) { if p.IsAttacked(turn, sq) { return nil, false } } from, to, _ := m.CastlingRookMove() ret.xor(from, turn, Rook) ret.xor(to, turn, Rook) } ret.enpassant, _ = m.EnPassantTarget() ret.castling &^= m.CastlingRightsLost() if ret.IsChecked(turn) { return nil, false } return &ret, true }
/// Efficiently concatenate two strings. /** This is a special case of concatenate(), needed because dependency * management does not let us use that function here. */ [[nodiscard]] inline std::string cat2(std::string_view x, std::string_view y) { std::string buf; auto const xs{std::size(x)}, ys{std::size(y)}; buf.resize(xs + ys); x.copy(buf.data(), xs); y.copy(buf.data() + xs, ys); return buf; }
def detect(self, rgb_image, depth_image=None): hsv_image = cv2.cvtColor(rgb_image, cv2.COLOR_RGB2HSV) lower = np.array([136, 87, 111], np.uint8) upper = np.array([180, 255, 255], np.uint8) color_mask = cv2.inRange(hsv_image, self.lower, self.upper) color_mask = cv2.dilate(color_mask, self.kernel) if self.debug_topics is True: self.pub.publish(self.bridge.cv2_to_imgmsg(color_mask)) x, y, w, h = cv2.boundingRect(color_mask) xmin = x ymin = y xmax = xmin+w ymax = ymin+h if depth_image is not None: x = depth_image.shape[1]-1 if x > depth_image.shape[1] else x y = depth_image.shape[0]-1 if y > depth_image.shape[0] else y depth = depth_image[int(y)][int(x)]/1000.0 if math.isnan(depth) or depth == 0.0: depth = None else: depth = None mask = color_mask[int(ymin):int(ymax), int(xmin):int(xmax)] object_detection = Detection(int(xmin), int(ymin), int(xmin+w), int(ymin+h), self.color+"_thing", 1.0, mask=mask, depth=depth) if object_detection.bbox.area() > 100: return [object_detection] else: return []
The Drosophila GAGA Factor Is Required for Dosage Compensation in Males and for the Formation of the Male-Specific-Lethal Complex Chromatin Entry Site at 12DE Drosophila melanogaster males have one X chromosome, while females have two. To compensate for the resulting disparity in X-linked gene expression between the two sexes, most genes from the male X chromosome are hyperactivated by a special dosage compensation system. Dosage compensation is achieved by a complex of at least six proteins and two noncoding RNAs that specifically associate with the male X. A central question is how the X chromosome is recognized. According to a current model, complexes initially assemble at ∼35 chromatin entry sites on the X and then spread bidirectionally along the chromosome where they occupy hundreds of sites. Here, we report that mutations in Trithorax-like (Trl) lead to the loss of a single chromatin entry site on the X, male lethality, and mislocalization of dosage compensation complexes.
/** Calculates the median for the given vector */ double calcMed( vector<double> vec) { double med = 0; if (vec.size() == 0) { std::cout << "Warning: calcMed() given vector of size 0!" << std::endl; med = 0; } else { sort(vec.begin(), vec.end()); int size = vec.size(); if (size % 2 == 0) { med = (vec.at(size / 2) + vec.at(size / 2 - 1)) / 2.0; } else { med = vec.at((size - 1) / 2); } } return med; }
from .dynamics import Dynamics,IntegratorControlSpace from .objective import ObjectiveFunction #from scipy.interpolate import RegularGridInterpolator class OptimalControlProblem: """A standardized class for an optimal control problem. Attributes: x0 (array): the initial state. dynamics (IntegratorControlSpace): a controlSpace with a fixed timestep dt. objective (ObjectiveFunction): the optimality criterion goal (None, array, or callable): either no terminal condition (None); a terminal state (array), or a function term(x) > 0 iff x is a terminal state. stateChecker (callable, optional): a function f(x) > 0 iff x is a valid state controlChecker (callable): a function f(x,u) > 0 stating whether u is a valid control at state x. """ def __init__(self,x0,dynamics,objective,goal=None,stateChecker=None,controlChecker=None,controlSampler=None,dt=None): self.x0 = x0 self.dynamics = dynamics if isinstance(dynamics,Dynamics): if dt is None: raise ValueError("If a Dynamics is passed as the `dynamics` object, timestep `dt` must also be provided") self.dynamics = IntegratorControlSpace(dynamics,dt) self.objective = objective self.goal = goal self.stateChecker = stateChecker self.controlChecker = controlChecker self.controlSampler = controlSampler self.dt = dt def isPointToPoint(self): return hasattr(self.goal,'__iter__') def stateValid(self,x): return self.stateChecker is None or self.stateChecker(x) def controlValid(self,x,u): return self.controlChecker is None or self.controlChecker(x,u) class ControlSampler: def sample(self,state): """Returns a list of controls that should be used at the given state""" raise NotImplementedError() class LookaheadPolicy: """Converts a value function into a 1-step lookahead policy.""" def __init__(self,problem,valueFunction,goal=None): self.problem = problem self.dynamics = problem.dynamics self.controlSampler = problem.controlSampler self.objective = problem.objective if goal is None: self.goal = problem.goal else: self.goal = goal self.valueFunction = valueFunction def __call__(self,x): bestcontrol = None bestcost = float('inf') us = self.controlSampler.sample(x) for u in us: xnext = self.dynamics.nextState(x,u) if self.problem.stateValid(xnext): cost = self.objective.incremental(x,u) v = self.valueFunction(xnext) #print "Value of going from",x,"control",u,"to",xnext,"is",cost,"+",v,"=",cost+v if v + cost < bestcost: bestcost = v + cost bestcontrol = u if self.goal is None or (callable(self.goal) and self.goal(x)): #check whether to terminate tcost = self.objective.terminal(x) if tcost <= bestcost or self.goalabsorbing: #print("Better to terminate, cost,",tcost) return None return bestcontrol def rollout_policy(dynamics,x,control,dt,numSteps): """Returns a state trajectory and control trajectory of length numSteps+1 and numSteps, respectively. control can either be a callable policy (closed loop) or a list of length at least numSteps (open loop). A control of None means to terminate. """ if isinstance(dynamics,Dynamics): if dt is None: raise ValueError("If a Dynamics is passed as the `dynamics` object, timestep `dt` must also be provided") dynamics = IntegratorControlSpace(dynamics,dt) xs = [x] us = [] if callable(control): while len(xs) <= numSteps: u = control(xs[-1]) if u is None: break us.append(u) xnext = dynamics.nextState(xs[-1],u) #print("After",xs[-1],"control",u,"for time",dt,"result is",xnext) xs.append(xnext) else: assert len(control) >= numSteps while len(xs) <= numSteps: u = control[len(xs)-1] if u is None: break us.append(u) xnext = dynamics.nextState(xs[-1],u) xs.append(xnext) return xs,us
Coffee: So delicious, and yet so mysterious. Is it a naturally occurring earth-bound substance? Or could it perhaps be the work of ancient aliens? Our feature series is less funny now that this is around half of ViceTV’s schtick, but still we ask you to void your mind of all preconceived notions, as our Paranormal Theories columnist Bixby Klendathu delves deep into the mysteries that surround coffee’s origin. In a previous screed for Sprudge, we revealed genetic and anthropological evidence of the extraterrestrial origin of coffee, and its role in early proto-human history. These, however, are not the only lines of evidence that begin to unravel the mystery of coffee’s history, chemistry, and crypto-utility among the ancients. And important questions remain, including—most critically—is coffee still a tool of extraterrestrial control of the human species? My investigative team has been working on revealing new evidence, and we’re excited to share our conclusive findings. Since it is well-known and easily proven that the secret knowledge of human proto-history has been concealed and archived by the secret societies (Freemasons, Knights Templar, etc.), the examination of Masonic rituals, symbols, and teachings have led to huge and explosive findings. If coffee is an ancient substance developed by secret intelligence in ancient Sumer-Babylon-Egypt we would expect to see abundant Masonic symbology in the coffee trade. Our investigation incontrovertibly proves that this is so. Exhibit one: the logo of leading Third Wave coffee company Intelligentsia Coffee. An examination of their corporate logo reveals “the all-seeing eye of Horus”—the classic Masonic/Egyptian symbol—embedded in what looks to be a cup levitated by wings. This eye looks up at a five-pointed star, another important Masonic symbol. Portland coffee company Stumptown Coffee Roasters also has secret, sacred Masonic symbology embedded in their logo: their “horseshoe” icon is familiar to initiates of the secret rite, and the term “good luck” along with an illustration of a handshake (perhaps symbolizing human-god/alien interaction?) feature strongly on their label. Finally, fast-expanding (fueled by intergalactic technologies??) San Franciscan coffee company Blue Bottle Coffee is an obvious reference to the arcane Masonic Blue Flask, embossed with imagery of Freemasonry. For what secret purpose is this bottle made? This evidence shows conclusively that iconic Third Wave coffee companies have close connections to secret Masonic ancient knowledge. Here is what we know: humans were engineered in ancient times by visitors from a planet known only to them as “Nibiru,” by the visitors who mixed alien DNA with ape-DNA from Earth. Coffee (KHWH) was developed as a performance enhancer/emotional control substance for the overseer aliens to administer to proto-humans while they worked in the ancient Ethiopian mines controlled by the “Annunaki” overlord-alien-God-angels. Just as we have descended from the genetically modified alien-apes, we have brought with us our ancient mind-control substance, we call it “coffee.” KAAL-D (“Kaldi”) is presumed to be the Annunaki scientist who performed this genetic graft, with assistance from the “goat-faced” aliens, and also the greys. QUESTION: ARE THE COFFEE COMPANIES IN ON THIS SECRET? You will notice that a very large number of “enlightened” coffee companies have bird or wing logos. Is this a reference to the airborne Annunaki/alien/angel visitors who created coffee in the first place? Is the eye of Horus/star/horseshoe/handshake a symbolic representation of the overlords/ dark star Nibiru/DNA/connection story? It seems so. WHAT IS THE MESSAGE? Our research has revealed a great deal of coded information on coffee bags, websites, coffee shop chalkboards, etc. This falls into two main categories: CATEGORY ONE: GEOGRAPHIC COORDINATES Some coffee companies transmit map-clues in their very names (Equator Coffees & Teas, 49th Parallel Roasters). Many others use specific farm names, GPS information, and, most tantalizingly, FARM ALTITUDE on their coffee descriptions. For what possible purpose would farm altitude data be except to communicate geographic landing-site KHWH information to embedded alien agents? Or perhaps hasten the coming Extraction Operation (“extraction” being a term of variable usage) by forcing coffee cultivation further up our mountain chains (themselves crafted by the magnetic forces of the Dark Star)? CATEGORY TWO: DOSAGE/LOT INFORMATION Remembering that KHWH (coffee) is a genetically-engineered performance/mood enhancing substance, Annunaki overlords must monitor dosage and lot information. Special priest-scientists (Q Graders/”cuppers”) assign 1–100 numbers to each coffee along with hidden codes taken from a special, colorful mandala, or “flavor wheel”. THIS IS ENCODED DATA. Several sources cite psychic mind-control properties in flavor descriptions that entice human subjects to consume KHWH (Example: 87 point lemon-jasmine-molasses). We ask concerned citizens to collect and share coffee-label data with us so we can continue to compile and translate the secret Annunaki codex we feel is being transmitted DAILY in specialty coffee shops around the world. The harvest is night, equatorial and otherwise, and only by gathering data points and unraveling the codex will we able to prepare and staff accordingly for the coming rush. Bixby Klendathu is a coffee enthusiast, Akkadian language scholar, and ardent UFO disclosure advocate. He contributes to a number of publications from his home in Pahrump, Nevada. Read more Bixby Klendathu on Sprudge.
package org.ovirt.engine.core.bll; import java.io.File; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.concurrent.TimeUnit; import javax.annotation.PostConstruct; import javax.ejb.ConcurrencyManagement; import javax.ejb.ConcurrencyManagementType; import javax.ejb.EJB; import javax.ejb.Local; import javax.ejb.Singleton; import javax.ejb.Startup; import javax.ejb.TransactionAttribute; import javax.ejb.TransactionAttributeType; import javax.interceptor.ExcludeClassInterceptors; import javax.interceptor.Interceptors; import org.apache.commons.collections.KeyValue; import org.apache.commons.lang.exception.ExceptionUtils; import org.ovirt.engine.core.bll.context.CommandContext; import org.ovirt.engine.core.bll.interfaces.BackendInternal; import org.ovirt.engine.core.bll.job.ExecutionContext; import org.ovirt.engine.core.bll.job.ExecutionHandler; import org.ovirt.engine.core.bll.job.JobRepositoryCleanupManager; import org.ovirt.engine.core.bll.job.JobRepositoryFactory; import org.ovirt.engine.core.bll.session.SessionDataContainer; import org.ovirt.engine.core.common.action.LoginUserParameters; import org.ovirt.engine.core.common.action.LogoutUserParameters; import org.ovirt.engine.core.common.action.VdcActionParametersBase; import org.ovirt.engine.core.common.action.VdcActionType; import org.ovirt.engine.core.common.action.VdcReturnValueBase; import org.ovirt.engine.core.common.businessentities.VDSStatus; import org.ovirt.engine.core.common.config.Config; import org.ovirt.engine.core.common.config.ConfigValues; import org.ovirt.engine.core.common.interfaces.BackendLocal; import org.ovirt.engine.core.common.interfaces.ErrorTranslator; import org.ovirt.engine.core.common.interfaces.ITagsHandler; import org.ovirt.engine.core.common.interfaces.VDSBrokerFrontend; import org.ovirt.engine.core.common.job.JobExecutionStatus; import org.ovirt.engine.core.common.queries.AsyncQueryResults; import org.ovirt.engine.core.common.queries.ConfigurationValues; import org.ovirt.engine.core.common.queries.GetConfigurationValueParameters; import org.ovirt.engine.core.common.queries.VdcQueryParametersBase; import org.ovirt.engine.core.common.queries.VdcQueryReturnValue; import org.ovirt.engine.core.common.queries.VdcQueryType; import org.ovirt.engine.core.compat.DateTime; import org.ovirt.engine.core.compat.Guid; import org.ovirt.engine.core.compat.StringHelper; import org.ovirt.engine.core.dal.VdcBllMessages; import org.ovirt.engine.core.dal.dbbroker.DbFacade; import org.ovirt.engine.core.dal.dbbroker.generic.DBConfigUtils; import org.ovirt.engine.core.dal.job.ExecutionMessageDirector; import org.ovirt.engine.core.searchbackend.BaseConditionFieldAutoCompleter; import org.ovirt.engine.core.utils.ErrorTranslatorImpl; import org.ovirt.engine.core.utils.ThreadLocalParamsContainer; import org.ovirt.engine.core.utils.ThreadLocalSessionCleanerInterceptor; import org.ovirt.engine.core.utils.ejb.BeanProxyType; import org.ovirt.engine.core.utils.ejb.BeanType; import org.ovirt.engine.core.utils.ejb.EjbUtils; import org.ovirt.engine.core.utils.log.Log; import org.ovirt.engine.core.utils.log.LogFactory; import org.ovirt.engine.core.utils.timer.SchedulerUtil; import org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl; // Here we use a Singleton bean // The @Startup annotation is to make sure the bean is initialized on startup. // @ConcurrencyManagement - we use bean managed concurrency: // Singletons that use bean-managed concurrency allow full concurrent access to all the // business and timeout methods in the singleton. // The developer of the singleton is responsible for ensuring that the state of the singleton is synchronized across all clients. @Local({ BackendLocal.class, BackendInternal.class }) @Interceptors({ ThreadLocalSessionCleanerInterceptor.class }) @Singleton @Startup @TransactionAttribute(TransactionAttributeType.SUPPORTS) @ConcurrencyManagement(ConcurrencyManagementType.BEAN) public class Backend implements BackendInternal, BackendRemote { @SuppressWarnings("unused") @EJB private SchedulerUtil scheduler; private ITagsHandler mTagsHandler; private ErrorTranslator errorsTranslator; private ErrorTranslator _vdsErrorsTranslator; private DateTime _startedAt; private static boolean firstInitialization = true; public static BackendInternal getInstance() { return EjbUtils.findBean(BeanType.BACKEND, BeanProxyType.LOCAL); } private void InitHandlers() { mTagsHandler = HandlersFactory.createTagsHandler(); BaseConditionFieldAutoCompleter.TagsHandler = mTagsHandler; VmHandler.Init(); VdsHandler.Init(); VmTemplateHandler.Init(); } private VDSBrokerFrontend _resourceManger; @Override @ExcludeClassInterceptors public VDSBrokerFrontend getResourceManager() { return _resourceManger; } /** * This method is called upon the bean creation as part of the management Service bean lifecycle. */ @PostConstruct public void create() { checkDBConnectivity(); Initialize(); } private static void checkDBConnectivity() { boolean dbUp = false; long expectedTimeout = System.currentTimeMillis() + DbFacade.getInstance().getOnStartConnectionTimeout(); long waitBetweenInterval = DbFacade.getInstance().getConnectionCheckInterval(); while (!dbUp && System.currentTimeMillis() < expectedTimeout) { try { dbUp = DbFacade.getInstance().CheckDBConnection(); try { Thread.sleep(waitBetweenInterval); } catch (InterruptedException e) { log.warn("Failed to wait between connection polling attempts. " + "Original exception is: " + ExceptionUtils.getMessage(e)); } } catch (RuntimeException ex) { log.error("Error in getting DB connection. The database is inaccessible. " + "Original exception is: " + ExceptionUtils.getMessage(ex)); } } if (!dbUp) { throw new IllegalStateException("Could not obtain connection to the database." + " Please make sure that DB is up and accepting connections, and " + "restart the application."); } } @Override public DateTime getStartedAt() { return _startedAt; } /** * Initializes internal data * <exception>VdcBLL.VdcBLLException */ @Override public void Initialize() { log.infoFormat("Start time: {0}", new Date()); // When getting a proxy to this bean using JBoss embedded, the initialize method is called for each method // invocation on the proxy, as it is called by setup method which is @PostConstruct - the initialized flag // makes sure that initialization occurs only once per class (which is ok, as this is a @Service) if (firstInitialization) { // In case of a server termination that had uncompleted compensation-aware related commands // we have to get all those commands and call compensate on each compensate(); firstInitialization = false; } // initialize configuration utils to use DB Config.setConfigUtils(new DBConfigUtils()); _resourceManger = new VDSBrokerFrontendImpl(); log.infoFormat("VDSBrokerFrontend: {0}", new Date()); CpuFlagsManagerHandler.InitDictionaries(); log.infoFormat("CpuFlagsManager: {0}", new Date()); // ResourceManager res = ResourceManager.Instance; // Initialize the AuditLogCleanupManager AuditLogCleanupManager.getInstance(); log.infoFormat("AuditLogCleanupManager: {0}", new Date()); TagsDirector.getInstance().init(); log.infoFormat("TagsDirector: {0}", new Date()); IsoDomainListSyncronizer.getInstance(); log.infoFormat("IsoDomainListSyncronizer: {0}", new Date()); InitHandlers(); log.infoFormat("InitHandlers: {0}", new Date()); final String AppErrorsFileName = "bundles/AppErrors.properties"; final String VdsErrorsFileName = "bundles/VdsmErrors.properties"; errorsTranslator = new ErrorTranslatorImpl(AppErrorsFileName, VdsErrorsFileName); log.infoFormat("ErrorTranslator: {0}", new Date()); _vdsErrorsTranslator = new ErrorTranslatorImpl(VdsErrorsFileName); log.infoFormat("VdsErrorTranslator: {0}", new Date()); // initialize the JobRepository object and finalize non-terminated jobs log.infoFormat("Mark uncompleted jobs as {0}: {1}", JobExecutionStatus.UNKNOWN.name(), new Date()); initJobRepository(); // initializes the JobRepositoryCleanupManager log.infoFormat("JobRepositoryCleanupManager: {0}", new Date()); JobRepositoryCleanupManager.getInstance().initialize(); // initialize the AutoRecoveryManager log.infoFormat("AutoRecoveryManager: {0}", new Date()); AutoRecoveryManager.getInstance().initialize(); log.infoFormat("ExecutionMessageDirector: {0}", new Date()); initExecutionMessageDirector(); Integer sessionTimoutInterval = Config.<Integer> GetValue(ConfigValues.UserSessionTimeOutInterval); // negative value means session should never expire, therefore no need to clean sessions. if (sessionTimoutInterval > 0) { SchedulerUtilQuartzImpl.getInstance().scheduleAFixedDelayJob(SessionDataContainer.getInstance(), "cleanExpiredUsersSessions", new Class[] {}, new Object[] {}, sessionTimoutInterval, sessionTimoutInterval, TimeUnit.MINUTES); } // Set start-up time _startedAt = DateTime.getNow(); int vmPoolMonitorIntervalInMinutes = Config.<Integer> GetValue(ConfigValues.VmPoolMonitorIntervalInMinutes); SchedulerUtilQuartzImpl.getInstance().scheduleAFixedDelayJob(new VmPoolMonitor(), "managePrestartedVmsInAllVmPools", new Class[] {}, new Object[] {}, vmPoolMonitorIntervalInMinutes, vmPoolMonitorIntervalInMinutes, TimeUnit.MINUTES); try { File fLock = new File(Config.<String> GetValue(ConfigValues.SignLockFile)); if (fLock.exists()) { if (!fLock.delete()) { log.error("Cleanup lockfile failed to delete the locking file."); } } } catch (SecurityException se) { log.error("Cleanup lockfile failed!", se); } } private void initJobRepository() { try { JobRepositoryFactory.getJobRepository().finalizeJobs(); } catch (Exception e) { log.error("Failed to finalize running Jobs", e); } } private void initExecutionMessageDirector() { try { ExecutionMessageDirector.getInstance().initialize(ExecutionMessageDirector.EXECUTION_MESSAGES_FILE_PATH); } catch (RuntimeException e) { log.error("Failed to initialize ExecutionMessageDirector", e); } } /** * Handles compensation in case of uncompleted compensation-aware commands resulted from server failure. */ private static void compensate() { // get all command snapshot entries List<KeyValue> commandSnapshots = DbFacade.getInstance().getBusinessEntitySnapshotDAO().getAllCommands(); for (KeyValue commandSnapshot : commandSnapshots) { // create an instance of the related command by its class name and command id CommandBase<?> cmd = CommandsFactory.CreateCommand(commandSnapshot.getValue().toString(), (Guid) commandSnapshot.getKey()); if (cmd != null) { cmd.compensate(); log.infoFormat("Running compensation on startup for Command : {0} , Command Id : {1}", commandSnapshot.getValue(), commandSnapshot.getKey()); } else { log.errorFormat("Failed to run compensation on startup for Command {0} , Command Id : {1}", commandSnapshot.getValue(), commandSnapshot.getKey()); } } } @Override @ExcludeClassInterceptors public VdcReturnValueBase runInternalAction(VdcActionType actionType, VdcActionParametersBase parameters) { return runActionImpl(actionType, parameters, true, null); } @Override public VdcReturnValueBase RunAction(VdcActionType actionType, VdcActionParametersBase parameters) { return runActionImpl(actionType, parameters, false, null); } /** * Executes an action according to the provided arguments. * @param actionType * The type which define the action. Correlated to a concrete {@code CommandBase} instance. * @param parameters * The parameters which are used to create the command. * @param runAsInternal * Indicates if the command should be executed as an internal action or not. * @param context * The required information for running the command. * @return The result of executing the action */ private VdcReturnValueBase runActionImpl(VdcActionType actionType, VdcActionParametersBase parameters, boolean runAsInternal, CommandContext context) { VdcReturnValueBase returnValue = null; switch (actionType) { case AutoLogin: returnValue = new VdcReturnValueBase(); returnValue.setCanDoAction(false); returnValue.getCanDoActionMessages().add(VdcBllMessages.USER_NOT_AUTHORIZED_TO_PERFORM_ACTION.toString()); return returnValue; default: { // Evaluate and set the correlationId on the parameters, fails on invalid correlation id returnValue = ExecutionHandler.evaluateCorrelationId(parameters); if (returnValue != null) { return returnValue; } CommandBase<?> command = CommandsFactory.CreateCommand(actionType, parameters); command.setInternalExecution(runAsInternal); command.setContext(context); ExecutionHandler.prepareCommandForMonitoring(command, actionType, runAsInternal); returnValue = command.ExecuteAction(); returnValue.setCorrelationId(parameters.getCorrelationId()); return returnValue; } } } public VdcReturnValueBase EndAction(VdcActionType actionType, VdcActionParametersBase parameters) { return endAction(actionType, parameters, null); } @Override public VdcReturnValueBase endAction(VdcActionType actionType, VdcActionParametersBase parameters, CommandContext context) { CommandBase<?> command = CommandsFactory.CreateCommand(actionType, parameters); command.setContext(context); return command.EndAction(); } @Override @ExcludeClassInterceptors public VdcQueryReturnValue runInternalQuery(VdcQueryType actionType, VdcQueryParametersBase parameters) { return runQueryImpl(actionType, parameters, false); } @Override public VdcQueryReturnValue RunQuery(VdcQueryType actionType, VdcQueryParametersBase parameters) { return runQueryImpl(actionType, parameters, true); } private static VdcQueryReturnValue runQueryImpl(VdcQueryType actionType, VdcQueryParametersBase parameters, boolean isPerformUserCheck) { if (isPerformUserCheck) { String sessionId = addSessionToContext(parameters); if (StringHelper.isNullOrEmpty(sessionId) || SessionDataContainer.getInstance().getUser(sessionId, parameters.getRefresh()) == null) { VdcQueryReturnValue returnValue = new VdcQueryReturnValue(); returnValue.setSucceeded(false); returnValue.setExceptionString(VdcBllMessages.USER_IS_NOT_LOGGED_IN.toString()); return returnValue; } } QueriesCommandBase<?> command = CommandsFactory.CreateQueryCommand(actionType, parameters); command.setInternalExecution(!isPerformUserCheck); command.Execute(); return command.getQueryReturnValue(); } @Override public void RunAsyncQuery(VdcQueryType actionType, VdcQueryParametersBase parameters) { addSessionToContext(parameters); QueriesCommandBase<?> command = CommandsFactory.CreateQueryCommand(actionType, parameters); command.Execute(); } private static String addSessionToContext(VdcQueryParametersBase parameters) { String sessionId = parameters.getHttpSessionId(); boolean isAddToContext = true; if (StringHelper.isNullOrEmpty(sessionId)) { sessionId = parameters.getSessionId(); } // This is a workaround for front end // Where no session, try to get Id of session which was attached to // request if (StringHelper.isNullOrEmpty(sessionId)) { sessionId = ThreadLocalParamsContainer.getHttpSessionId(); isAddToContext = false; } if (!StringHelper.isNullOrEmpty(sessionId) && isAddToContext) { ThreadLocalParamsContainer.setHttpSessionId(sessionId); } return sessionId; } @Override public ArrayList<VdcReturnValueBase> RunMultipleActions(VdcActionType actionType, ArrayList<VdcActionParametersBase> parameters) { return runMultipleActionsImpl(actionType, parameters, false); } @Override @ExcludeClassInterceptors public ArrayList<VdcReturnValueBase> runInternalMultipleActions(VdcActionType actionType, ArrayList<VdcActionParametersBase> parameters) { return runMultipleActionsImpl(actionType, parameters, true); } public ArrayList<VdcReturnValueBase> runMultipleActionsImpl(VdcActionType actionType, ArrayList<VdcActionParametersBase> parameters, boolean isInternal, ExecutionContext executionContext) { String sessionId = ThreadLocalParamsContainer.getHttpSessionId(); if (!StringHelper.isNullOrEmpty(sessionId)) { for (VdcActionParametersBase parameter : parameters) { if (StringHelper.isNullOrEmpty(parameter.getSessionId())) { parameter.setSessionId(sessionId); } } } MultipleActionsRunner runner = MultipleActionsRunnersFactory.CreateMultipleActionsRunner(actionType, parameters, isInternal); runner.setExecutionContext(executionContext); return runner.Execute(); } @Override @ExcludeClassInterceptors public ArrayList<VdcReturnValueBase> runInternalMultipleActions(VdcActionType actionType, ArrayList<VdcActionParametersBase> parameters, ExecutionContext executionContext) { return runMultipleActionsImpl(actionType, parameters, true, executionContext); } private ArrayList<VdcReturnValueBase> runMultipleActionsImpl(VdcActionType actionType, ArrayList<VdcActionParametersBase> parameters, boolean isInternal) { return runMultipleActionsImpl(actionType, parameters, isInternal, null); } @ExcludeClassInterceptors public ErrorTranslator getErrorsTranslator() { return errorsTranslator; } @Override @ExcludeClassInterceptors public ErrorTranslator getVdsErrorsTranslator() { return _vdsErrorsTranslator; } /** * Login in to the system * @param parameters * The parameters. * @return user if success, else null // // */ @Override public VdcReturnValueBase Login(LoginUserParameters parameters) { switch (parameters.getActionType()) { case AutoLogin: case LoginAdminUser: { CommandBase<?> command = CommandsFactory.CreateCommand(parameters.getActionType(), parameters); return command.ExecuteAction(); } default: { return NotAutorizedError(); } } } private static VdcReturnValueBase NotAutorizedError() { VdcReturnValueBase returnValue = new VdcReturnValueBase(); returnValue.setCanDoAction(false); returnValue.getCanDoActionMessages().add(VdcBllMessages.USER_NOT_AUTHORIZED_TO_PERFORM_ACTION.toString()); return returnValue; } @Override public VdcReturnValueBase Logoff(LogoutUserParameters parameters) { return RunAction(VdcActionType.LogoutUser, parameters); } /** * @param vdsId * @return */ public VDSStatus PowerUpVDS(int vdsId) { return VDSStatus.Up; } /** * @param vdsId * @return */ public VDSStatus ShutDownVDS(int vdsId) { return VDSStatus.Down; } @Override public VdcQueryReturnValue RunPublicQuery(VdcQueryType actionType, VdcQueryParametersBase parameters) { switch (actionType) { case GetDomainList: case GetLicenseProperties: case RegisterVds: case CheckDBConnection: return runQueryImpl(actionType, parameters, false); case GetConfigurationValue: { GetConfigurationValueParameters configParameters = (GetConfigurationValueParameters) parameters; if (configParameters.getConfigValue() == ConfigurationValues.VdcVersion || configParameters.getConfigValue() == ConfigurationValues.ProductRPMVersion) { return runQueryImpl(actionType, parameters, false); } VdcQueryReturnValue returnValue = new VdcQueryReturnValue(); returnValue.setSucceeded(false); returnValue.setExceptionString(VdcBllMessages.USER_CANNOT_RUN_QUERY_NOT_PUBLIC.toString()); return returnValue; } default: { VdcQueryReturnValue returnValue = new VdcQueryReturnValue(); returnValue.setSucceeded(false); returnValue.setExceptionString(VdcBllMessages.USER_CANNOT_RUN_QUERY_NOT_PUBLIC.toString()); return returnValue; } } } public VdcReturnValueBase RunUserAction(VdcActionType actionType, VdcActionParametersBase parameters) { if (StringHelper.isNullOrEmpty(parameters.getHttpSessionId())) { return NotAutorizedError(); } return RunAction(actionType, parameters); } public VdcQueryReturnValue RunUserQuery(VdcQueryType actionType, VdcQueryParametersBase parameters) { return runQueryImpl(actionType, parameters, true); } public ArrayList<VdcReturnValueBase> RunUserMultipleActions(VdcActionType actionType, ArrayList<VdcActionParametersBase> parameters) { for (VdcActionParametersBase parameter : parameters) { if (StringHelper.isNullOrEmpty(parameter.getHttpSessionId())) { ArrayList<VdcReturnValueBase> returnValues = new ArrayList<VdcReturnValueBase>(); for (int i = 0; i < parameters.size(); i++) { returnValues.add(NotAutorizedError()); } return returnValues; } } return runInternalMultipleActions(actionType, parameters); } @Override public VdcReturnValueBase RunAutoAction(VdcActionType actionType, VdcActionParametersBase parameters) { return RunAction(actionType, parameters); } @Override public VdcQueryReturnValue RunAutoQuery(VdcQueryType actionType, VdcQueryParametersBase parameters) { return runInternalQuery(actionType, parameters); } @Override public AsyncQueryResults GetAsyncQueryResults() { return BackendCallBacksDirector.getInstance().GetAsyncQueryResults(); } private static final Log log = LogFactory.getLog(Backend.class); @Override @ExcludeClassInterceptors public VdcReturnValueBase runInternalAction(VdcActionType actionType, VdcActionParametersBase parameters, CommandContext context) { return runActionImpl(actionType, parameters, true, context); } }
<reponame>FGtatsuro/myatcoder import sys input = sys.stdin.readline sys.setrecursionlimit(10 ** 7) n = int(input()) ans = 0 for i in range(1, n+1): j = n // i ans += (j * (j+1) * i) // 2 print(ans)
THE Ministry of Defence has secretly warned that lawyers and UK ministers will need to be mobilised in response to the threat to Trident posed by the SNP. It fears the SNP could jeopardise the UK's nuclear weapons programme. In an internal report summarising the main risks to Westminster's plans to keep submarine-launched, nuclear-tipped Trident missiles on the Clyde, the MoD describes the SNP's anti-nuclear stance as a "potential threat". However, the SNP government has reiterated its promise to get rid of Trident through independence, and anti-nuclear groups say its future is now in the balance. The SNP's long-standing policy, backed by the Scottish Parliament, has been to remove the missiles from the Clyde. Launching the Yes campaign for the independence referendum last month, the SNP leader and First Minister, Alex Salmond, promised to defend Scotland "without the obscenity of nuclear weapons". The MoD has not previously admitted to taking the SNP's opposition seriously, but an internal "risk register" drawn up by senior officials points out that the MoD will need to comply with Scottish planning law when renewing the facilities at Faslane. "The SNP have suggested they will exploit environmental legislation against basing Trident in Scotland," summarises the MoD report. "Potential threat to continued deterrent operations and support from Faslane/Coulport." In order to "mitigate" this, the MoD says it will need "engagement of Scottish legal expertise to advise on issues and strategy". It also promises to "ensure continued ministerial and cross-Whitehall engagement on the political issue". One example of such political engagement came last week, when UK defence ministers warned that Scotland might have to help meet the "gargantuan" costs of removing Trident. Nick Harvey, the Liberal Democrat armed forces minister, suggested that Faslane could become an English military stronghold in Scotland, similar to the US's Guantanamo Bay naval base in Cuba. The MoD released its comments on the SNP last week because it was ordered to do so by the UK Information Commissioner, Christopher Graham, after an appeal by anti-nuclear campaigners. The risk register is dated October 2009, but is believed to still be current. Peter Burt of the Nuclear Information Service, which obtained the register, argued that it was "far from guaranteed" Trident would be replaced. "The MoD is clearly concerned about the costs of the programme and worried its contractors won't be able to deliver new submarines," he said. "Ministers in London have been talking to their lawyers and planning to soft-soap Scotland's political leaders to prevent the Scottish government from scuppering Trident." An independent Scotland would be the "death knell" for Trident, Burt maintained. But even if Scotland didn't vote for independence, it could still stymie the nuclear programme. "Devo-max and even the current devolved arrangements could allow the government plenty of opportunity to ruin London's ambitions for developing nuclear weapons," he said. The Scottish Government stressed that independence is the best way to get rid of Trident. "While the Scottish Government and devolved parliament are strongly opposed," said a spokesman, "independence is the only constitutional option which gives Scotland the powers to have Trident removed from Scottish waters." The MoD reiterated that the UK Government is committed to maintaining a submarine-based nuclear deterrent. "There are no plans to move the deterrent from HM Naval Base Clyde," said a spokesman. "The Defence Nuclear Executive Board's risk register identifies any potential issue that may have implications for the UK's nuclear deterrent and it is only right the MoD considers what mitigations might be appropriate." A UK Government spokesman said: "For national security reasons, we need to understand all the issues around defence in the event of independence, including all policy options and their legality. "However, we believe that the nations of our country are stronger together and that the majority of Scots believe this too. We don't anticipate that separation will take place."
<filename>dbservice/etcd/etcd_client_test.go // Copyright 2019 Hewlett Packard Enterprise Development LP package etcd import ( "fmt" "testing" "time" "github.com/stretchr/testify/assert" ) func TestDBClientSuite(t *testing.T) { // TODO: Uncomment this to run integration tests // _TestAll(t) } func _TestAll(t *testing.T) { _TestDBClientSuite1(t) _TestDBClientSuite2(t) // TestDBClientSuiteLockUnlock(t) } func _TestDBClientSuiteLockUnlock(t *testing.T) { key := "mylock" // Create DB Client endPoints := []string{fmt.Sprintf("%s:%s", "localhost", DefaultPort)} dbClient, err := NewClient(endPoints, DefaultVersion) if err != nil { t.Errorf("NewClient() error = %v", err) return } defer dbClient.CloseClient() // Check the lock status. This must be in 'UNLOCKED' state locked, err := dbClient.IsLocked(key) if err != nil { t.Errorf("Failed to check if the key '%s' is locked, err: %s", key, err.Error()) } assert.Equal(t, false /* unlocked */, locked) // Acquire the lock lck, err := dbClient.WaitAcquireLock(key, 30) if err != nil { t.Errorf("Failed to lock key '%s', err: %s", key, err.Error()) } //time.Sleep(10 * time.Second) // Check the lock status. This must be in 'LOCKED' state locked, err = dbClient.IsLocked(key) if err != nil { t.Errorf("Failed to check if the key '%s' is locked, err: %s", key, err.Error()) } assert.Equal(t, true /* locked */, locked) // Try to acquire lock and expect error lck1, err := dbClient.AcquireLock(key, 30) assert.Nil(t, lck1) assert.NotNil(t, err) // Release the lock assert.Nil(t, dbClient.ReleaseLock(lck)) // Check the lock status. This must be in 'UNLOCKED' stat locked, err = dbClient.IsLocked(key) if err != nil { t.Errorf("Failed to check if the key '%s' is locked, err: %s", key, err.Error()) } assert.Equal(t, false /* unlocked */, locked) } func _TestDBClientSuite1(t *testing.T) { // Create DB Client endPoints := []string{fmt.Sprintf("%s:%s", "localhost", DefaultPort)} dbClient, err := NewClient(endPoints, DefaultVersion) if err != nil { t.Errorf("NewClient() error = %v", err) return } defer dbClient.CloseClient() key := "TestFoo1" value := "TestBar" // Put err = dbClient.Put(key, value) if err != nil { t.Errorf("PUT error = %v", err) return } // Get gotVal, err := dbClient.Get(key) if err != nil { t.Errorf("GET error = %v", err) return } assert.Equal(t, value, *gotVal, fmt.Sprintf("Get() = Expected: %v, Got: %v", value, *gotVal)) // Delete err = dbClient.Delete(key) if err != nil { t.Errorf("DELETE error = %v", err) return } // Get again gotVal, err = dbClient.Get(key) if err != nil { t.Errorf("GET error = %v", err) return } assert.Nil(t, gotVal, fmt.Sprintf("Get() = Expected: nil, Got: %v", gotVal)) // Put with lease expiry of 5 seconds err = dbClient.PutWithLeaseExpiry("SUN", value, 5) if err != nil { t.Errorf("PUT error = %v", err) return } // Sleep for 6 seconds for the lease to expiry time.Sleep(6 * time.Second) // Get - Check if the key is being removed gotVal, err = dbClient.Get(key) if err != nil { t.Errorf("GET error = %v", err) return } assert.Nil(t, gotVal, fmt.Sprintf("Get() = Expected: nil, Got: %v", gotVal)) } func _TestDBClientSuite2(t *testing.T) { key := "TestFoo2" value := "TestBar" // Put err := Put(key, value) if err != nil { t.Errorf("PUT error = %v", err) return } // Get gotVal, err := Get(key) if err != nil { t.Errorf("GET error = %v", err) return } assert.Equal(t, value, *gotVal, fmt.Sprintf("Get() = Expected: %v, Got: %v", value, *gotVal)) // Delete err = Delete(key) if err != nil { t.Errorf("DELETE error = %v", err) return } // Get again gotVal, err = Get(key) if err != nil { t.Errorf("GET error = %v", err) return } assert.Nil(t, gotVal, fmt.Sprintf("Get() = Expected: nil, Got: %v", gotVal)) }
def update_stations_list(cur_stations_list, arch_stations_file): cur_df = pd.DataFrame(cur_stations_list) cur_df[['longitude', 'latitude']] = cur_df[['longitude', 'latitude']].astype(str) if cur_df.shape != (0, 0): cur_df.drop_duplicates(subset=['station_mac'], inplace=True) try: arch_df = pd.read_csv(arch_stations_file, converters={'latitude': str, 'longitude': str}) except: cur_df.to_csv(arch_stations_file, index=False) arch_df = pd.read_csv(arch_stations_file, converters={'latitude': str, 'longitude': str}) newcome_data = pd.merge(left=arch_df, right=cur_df, how='right', on=['station_mac', 'latitude', 'longitude'], suffixes=['_arch', '_cur'], indicator=True) data2append = newcome_data.query("_merge=='right_only'").sort_values(by='station_mac').dropna(axis=1).drop( labels='_merge', axis=1) if data2append.shape[0] == 0: return "There are no new stations in the search area", 0 else: order = data2append.columns.tolist() order.sort() data2append = data2append[order] data2append.to_csv(path_or_buf=arch_stations_file, mode='a', header=False, index=False) return data2append['station_mac'].tolist(), data2append.shape[0] else: pass
TAXONOMIC REVISION AND NUMERICAL ANALYSIS OF HIBISCUS L. IN EGYPT The present study undertakes a survey, taxonomical revision and numerical analysis of the genus Hibiscus L. in Egypt including wild and cultivated species. The taxonomic treatment based on collecting of fresh material from the studied species, in addition to the investigation of the herbarium specimens as well as information from the literature. Eleven species of Hibiscus were recorded, of which five wild species (H. diversifolius Jacq., H. micranthus L. f., H. vitifolius L., H. sabdariffa L. and H. trionum L.) and six cultivated species (H. cannabinus L., H. mutabilis L., H. rosa-sinensis L., H. schizopetalus (Dyer) Hook. f., H. syriacus L. and H. tiliaceus L.). An identification key to the species of Hibiscus is constructed. For each species, valid name, synonyms, morphological descriptions based on the examination of herbarium specimens and fresh materials as well as distribution, type specimen, habitat, selected specimens and economic importance are provided. The numerical analysis based on thirty six morphological characters including vegetative, flowers and fruits parts of the studied species. SPSS Statistics version 22 used to get morphometric analysis. The numerical analysis revealed two main clusters. The first cluster included 3 species, viz. H. micranthus L. f., H. vitifolius L. and H. trionum L. The second cluster included two groups: group (a) viz. H. diversifolius Jacq., H. syriacus L., and H. tiliaceus L., and group (b) viz. Hibiscus cannabinus L., H. mutabilis L., H. rosa-sinensis L., H. sabdariffa L. and H. schizopetalus (Dyer) Hook. f. INTRODUCTION The Genus Hibiscus L. belongs to the family Malvaceae Juss. which considered as one of the important families consists of about 111 genera and about 1800 species of herbs, shrubs and/or trees, distributed all over the world especially in warm temperate and tropical regions (Mabberley, 1997). Hibiscus L. is a polymorphic and a large genus in Malvaceae. It contains about 300 species of annual or perennial herbs, shrubs or trees distributed in tropical and subtropical regions (Mabberley, 1997). It occurs in various habitats, from grasslands to savannas, forests, and marshes (Wilson, 1999). The name Hibiscus L. was validated by Linnaeus in "Species Plantarum" (1753). Hibiscus is derived from the Greek name ibiskos, said to be derived from the sacred Ibis, to which bird one species of the genus was consecrated in ancient Egypt. The genus was monographed by Hochreutiner (1900), who recognized 197 species, and divided the genus into 12 sections. Since 1900, there had no revision for all the genus, except some taxonomic studies which treated with a certain sections as Bombicella (Fryxell, 1980) and Furcaria (Wilson, 1994(Wilson, , 1999. Since that time few genera separated from Hibiscus as Abelmoschus, Alyogyne, Radyera, and Wercklea (Fryxell, 1997). In addition some species accepted as new Hibiscus species or some genera were emerged in it. Hibiscus species have been widely used in several formulae in traditional medicine (Ling et al 2009), and also the species are widely Taxonomic treatments The present study based upon the morphological investigation of about 110 herbarium specimens in the major herbaria in Egypt (CAIM: Herbarium of Flora & Phytotaxonomy researches department, CAI: Cairo University Herbarium). In addition to fresh specimens collected during the field trips. About 35 herbarium specimens were prepared and deposited in CAIM. The dimensions and characters of leaves, flowers parts (including pedicel, epicalyx, calyx, corolla and staminal column), fruits and seeds were measured. The identification of the collected specimens was performed by using the appropriate floras of Egypt and adjacent floras (Masters, 1868; Bailey, 1947Bailey, , 1949Andrews, 1956;Cullen, 1967;Webb, 1968;Täckhlom, 1974;Abedin, 1979;Townsend, 1980;Zohary, 1987;Boulos, 2000) and other books about cultivated plants. In addition they compared with previously determined herbarium sheets and scientific illustrations. Nomenclature of studied species and their synonyms was updated according to the online sources (www.Tropicos.org; www.theplantlist.org). Identification key was constructed to differentiate between the studied species. Accepted scientific names with their citations, synonyms, descriptions, distributions, type specimens and habitats are provided for all species. From the herbarium specimens examined, 1 to 3 selected specimens are chosen to represent each species. Economic importance includes uses in Egypt and other countries. The phytogeographical regions for the wild species in Egypt, according to Boulos (2009) (Fig. 1). Numerical analysis For the numerical analysis, thirty six morphological characters were used ( Table 1). The characters were converted into binary states and multi-states (interval) code. Morphometric analysis of quantitative data related to the characters were done using SPSS Statistics version 22. The data matrix was subjected to cluster analysis using UPGMA (Unweighted pair group method with arithmetic mean) and a dendrogram was constructed to show the relationship among the species. Petioles to 3 cm long, with a line of crisped hairs above and scattered strigose hairs. Stipules subulate, 3-4 mm long, strigose-ciliate, more or less persistent. Flowers 3-4 cm across, solitary, axillary, creamy or yellow, each petal with a dark purplish basal blotch. Peduncles 2.5-5 cm long, stellate-tomentose and with scattered strigose hairs. Epicalyx 9-12 segments, quite free, linear, strigose. Calyx membranous, about 1.2 cm long, inflated and very accrescent about 2 cm in fruit, strigose with large, usually geminate, tuberculate-based, strigose hairs along the conspicuous green to purplish veins, teeth deltoid, acute. Petals broadly rounded-obovate, 1.5-2.5 cm long, about twice as long as the calyx teeth. Staminal column about 4mm, included, with clavate hairs, bearing filaments almost throughout its length. Ovary 5-loculed with about 8-10-ovulate. Capsule subglobose, concealed within the bladdery calyx, apex acute, margin wingless, covered with long shining unicellular hairs and shorter white papillate hairs. Seeds triangular-reniform, 2.75 mm long, dark brown, minutely pitted, white-pustulose. Erect annual herb, about 0.7-2 (-4) m, simple or much branched, glabrous or almost so in its vegetative parts but the stem, branches, petioles and peduncles with scattered upwardly-directed curved spines. Leaves roundish-acuminate in outline, the AUJASCI, Arab Univ. J. Agric. Sci., 22(1), 2082 lowest entire or obscurely trilobed, the upper digitate to the petiole into 3-7 narrowly elliptic to linearlanceolate segments, all sharply serrate, glabrous or sparsely strigose. Flowers solitary and axillary, sometimes pseudo-racemose. Epicalyx 7-10 segments, linear to linear-lanceolate, about 2 cm, setose-margined and sometimes finely hairy below. Calyx accrescent about 2.5 cm in fruit, the lobes long-acuminate from a triangular base, rigid and subspinose in the acumen, setose especially along the margins, each lobe with prominent median and lateral nerves bearing a woolly tomentum at least below, the median nerve bearing a swollen gland at about the middle. Petals 4-8 cm long, yellow, each with purplish spot at the base. Staminal column short, included, bearing filaments almost throughout its length. Capsule subglobose, apex acuminate, margin wingless, about 2 cm long, with long simple silky hairs above a shorter indumentums. Seeds about 5 mm, deltoid-reniform, minutely pitted, with scattered simple and stellate hairs. Type: A specimen cultivated at Uppsala, probably of Indian origin. Distribution: Native of tropical Africa and Asia. Cultivated in parts of S. E. Europe, S. W. Asia and other tropical and subtropical parts of the world. In Egypt, the species is cultivated as a fiber crop. Habitat: Cultivated. Specimens selected: Botanical section, Giza, 28.9.1931, Khattab, 971(CAIM); Giza, 19.10.1954, Khattab, 915 (CAIM); Botanical section, Giza, 24.9.1962, Khattab, s.n. (CAIM). Economic importance: it is cultivated for its fiber which suitable for making string, binder twine, fishing net wrapping cloth. The leaves are edible and sometimes used as spinach. Arabic name: Til, Teel. , Fl. Guatimal. 28 (1840). 11. Annual or short-lived perennial herb, erect, about 0.7-2 m tall. Stems simple or much branched, reddish, glabrous to stellate-hairy. Leaves roundish to elliptic in outline, the uppermost digitate, 3-7 lobed or reduced to a single lobe, lobes elliptic to elliptic-lanceolate, more or less regularly crenateserrate, acute, glabrous or almost so. Petiole to 20 cm long. Stipules 6-8 mm long, subulate. Flowers 3-4 cm across, solitary, axillary, sometimes pseudoracemose by suppression of the upper leaves. Epicalyx 8-10 segments, lanceolate-acuminate to oblong, about 1.5 cm long, setose, crimson-red. Calyx 1.5-2 cm long, 0.5 cm broad, accrescent in fruit, the lobes lanceolate-acuminate, becoming enlarged and fleshy in fruit, crimson-red, each with prominent median and lateral nerves, the former with a stomashaped gland at about the middle. Petals 3.5-4.5 cm long, yellow with a deep purplish spot at the base. Staminal column short, included, bearing filaments almost throughout its length. Capsule ovoid, apex acuminate, margin wingless, about 2-2.5 cm, glabrous or appressed pubescent, 5-valves. Seeds many, 4 mm, reniform, minutely pitted, with lines and tufts of stellate hairs. Type: From Ceylon. Distribution: Native of tropical and subtropical regions of the world. The species is widely cultivated in southern Egypt and the Oases, and escape from cultivation. Habitat: cultivated and escaped in irrigated alluvial soil. Specimens selected: Kharga Oasis, 20.11.1965, Khattab, 914 (CAIM); El-Zarabi, Abu Tig (N), 26.11.1993, A. Abd El-Mogali, 1570 (CAIM); Aswan Botanic Garden, 27.10.1995, Hafiez Rofaeel, 29096 (CAIM). Economic importance: The leaves are eaten in salads, the fleshy calyx and capsules made into jam and are used in the preparation of a refreshing drink or other forms of preserve. The fibers of the stems are fairly tough and used for cord, binder twine, sackcloth. The medicinal value of the plant is recognized as diuretic, antiscorbutic and as a remedy for gastric complaints and hypertension (AboZid and Mohamed, 2011), the flowers, fruits and seeds all being used for this purpose. Arabic name: Karkadeh. Numerical analysis The UPGMA dendrogram of the genus Hibiscus (Figure 2) clearly discriminated 11 species producing two main clusters at the level 25 of average taxonomic distance. The first cluster (I) comprises 3 species viz. H. micranthus, H. vitifolius and H. Taxonomic treatments ` Egypt is predominantly arid desert, with little effective rainfall, at most 200 mm y -1 and unequally distributed and on limited areas. Nile River is the main source for cultivation. Aridity and water shortage are the main constraint and major limiting factors facing growing and spreading the desert flora in Egypt. H. micranthus and H. vitifolius grow on desertic habitat (rocky hillsides and stony wadis), while other wild species grow in mesic habitat (moist lands and canal banks). H. vitifolius and H. diversifolius are mono-regional species which grow in GE and N phytogeographical region respectively. While other wild species found in more than one phytogeographical region. The cultivated species widely spreading in Egypt as ornamental plants specially H. rosa-sinensis and its cultivars. They grow in welldrained clay, silt, yellow soil and also in reclaimed soil. Anthropogenic activities have influenced the natural flora and vegetation of Egypt from several decades, weather impacted on the natural vegetation or the cultivated species escaped and naturalized. H. cannabinus and H. sabdariffa are cultivated in Egypt for its fiber and fleshy calyx respectively, also they are considered as escaped from cultivation. Numerical analysis The dendrogram of the genus Hibiscus (Fig. 2) clearly discriminated 11 species producing two main clusters at the level 25 of average taxonomic distance. Cluster (I) comprises 3 species viz. H. micranthus, H. vitifolius and H. trionum was separating by owing different characters: stem and petioles covered with stellate, villose, strigose hairs respectively; adaxial and abaxial leaf surface strigose, pubescent, and hairy. H. micranthus splitting from others by having leaves 1-3.5 cm long; epicalyx filiform; calyx less than 3-4 mm long; corolla less than 3 cm diameter; petals 5-6 mm long; seeds covered by long cottony hairs. The second cluster (II) divided into two groups. The first group (IIa) comprises 3 species viz. H. syriacus, H. diversifolius and H. tiliaceus which splitting from other species in cluster II by stipules shape, epicalyx segments shape and texture, and fruit texture. But H. tiliaceus separating at level distance 12 by its specialist characters: tree; stipules foliaceous, oblong ovate, 11-30 mm long; leaves margin entire; Capsule densely stellate hairy, 10 locules. The second group (IIb) comprises 5 species H. cannabinus, H. mutabilis, H. rosa-sinensis, H. sabdariffa and H. schizopetalus. Absolute similarity values of all 11 species ranged from 0.02 to 0.83 (Table 3). Hibiscus schizopetalus was found to be closely related to Hibiscus rosa-sinensis in dendrogram tree, which showed the maximum similarity value (0.83). H. sabdariffa and H. cannabinus showed similarity value (0.57), therefore, it was found to be closely related in dendrogram tree, which further supports the monograph of Hochreutiner (1900) Conclusion: Morphological characters and identification keys as classical taxonomy are still important, in addition numerical analysis required to clarify the taxonomic relationships between studied species.
<reponame>weeping-shadow/Hidden-Mod package io.github.weeping_shadow.hidden.mixin.accessors; import net.minecraft.network.packet.s2c.play.BlockUpdateS2CPacket; import net.minecraft.util.math.BlockPos; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.gen.Accessor; @Mixin(BlockUpdateS2CPacket.class) public interface BlockUpdateS2CPacketAccessor { @Accessor("pos") BlockPos getPos(); }
// Test description: // - Attach texture containing solid color to framebuffer. // - Draw full screen quad covering the entire viewport. // - Multiple assignments are made to the output color for fragments on the right vertical half of the screen. // - A single assignment is made to the output color for fragments on the left vertical centre of the screen. // - Values are calculated using the sum of the passed in uniform color and the previous framebuffer color. // - Compare resulting surface with reference. class MultipleAssignmentTestCase : public FramebufferFetchTestCase { public: MultipleAssignmentTestCase (Context& context, const char* name, const char* desc, deUint32 format); ~MultipleAssignmentTestCase (void) {} IterateResult iterate (void); private: glu::ProgramSources genShaderSources (void); tcu::TextureLevel genReferenceTexture (const tcu::Vec4& fbColor, const tcu::Vec4& uniformColor); }
/** * Checks the keys in the Map on the model against a Set to ensure there are no values in the * Map that aren't also in the Set */ protected void checkAttributesMap( MessageContext context, String basePath, Set<String> swappableAttributes, Map<String, Attribute> attributesToCopy) { for (final String attribute : attributesToCopy.keySet()) { if (!swappableAttributes.contains(attribute)) { final MessageBuilder messageBuilder = new MessageBuilder(); messageBuilder.error(); messageBuilder.source(basePath + "[" + attribute + "].value"); messageBuilder.code("x.is.not.a.valid.attribute"); messageBuilder.arg(attribute); final MessageResolver errorMessage = messageBuilder.build(); context.addMessage(errorMessage); } } }
<reponame>wanghy0411/recite-words<gh_stars>0 package org.noodle.service.dictionary; import org.noodle.bean.dictionary.DictionarySaveRequest; import org.noodle.beans.NoodleException; import org.noodle.orm.mapper.DictionaryMapper; import org.noodle.orm.mapper.UserDictionaryMapper; import org.noodle.orm.mapper.UserInfoMapper; import org.noodle.orm.model.UserDictionary; import org.noodle.orm.model.UserInfo; import org.noodle.service.NoodlePostService; import org.noodle.util.id.SnowFlake; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.Assert; import org.springframework.util.StringUtils; import javax.annotation.Resource; /** * 字典保存服务 * @author wanghy */ @Service("dictionary.save") public class DictionarySaveService implements NoodlePostService<DictionarySaveRequest, Object> { @Resource private DictionaryMapper dictionaryMapper; @Resource private UserDictionaryMapper userDictionaryMapper; @Resource private UserInfoMapper userInfoMapper; @Resource private SnowFlake snowFlake; @Override public Class<DictionarySaveRequest> getRequestClass() { return DictionarySaveRequest.class; } @Transactional(propagation = Propagation.REQUIRED, rollbackFor = {Exception.class,NoodleException.class,RuntimeException.class}) @Override public Object execute(DictionarySaveRequest request) throws NoodleException { Assert.notNull(request.getDictionary(), "传入的字典对象不能为空"); Assert.isTrue(request.getDictionary().getId()>0, "请传入有效的id"); Assert.isTrue(StringUtils.hasText(request.getDictionary().getName()), "字典名称不能为空"); Assert.isTrue(StringUtils.hasText(request.getDictionary().getValidFlag()), "有效标志不能为空"); Assert.isTrue("YN".contains(request.getDictionary().getValidFlag()), "有效标志只能为Y/N"); Assert.isTrue(StringUtils.hasText(request.getDictionary().getPublicFlag()), "公用标志不能为空"); Assert.isTrue("YN".contains(request.getDictionary().getPublicFlag()), "公用标志只能为Y/N"); if ("Y".equals(request.getDictionary().getPublicFlag())) { UserInfo userInfo = userInfoMapper.selectByPrimaryKey(request.getUserId()); if (userInfo.getAdminFlag()==0) { throw new IllegalArgumentException("只有管理员才可设置公用字典"); } } int updateCount = dictionaryMapper.updateByPrimaryKey(request.getDictionary()); if (updateCount==0) { dictionaryMapper.insert(request.getDictionary()); //新字典则保存用户选定字典表 UserDictionary userDictionary = new UserDictionary(); userDictionary.setId(snowFlake.nextId()); userDictionary.setUserId(request.getUserId()); userDictionary.setDictionaryId(request.getDictionary().getId()); userDictionaryMapper.insert(userDictionary); } return null; } }
The future of digital platforms: Conditions of platform overthrow Are the digital platforms that we know here to stay? Both empirical insights and theoretical works suggest digital platform stability. Digital platforms such as Airbnb, Netflix and Taobao have experienced tremendous success, and the theoretical works on modularity and multisided markets depict competitive platform landscapes as controlled by a hegemonic platform leader. However, platform history chronicles multiple cases of leadership shifts in platform ecosystems. In this paper, we coin these situations “platform overthrows” and uncover the relevant strategies for both a challenger to conduct a platform overthrow and for a platform leader to resist it. To do so we conducted an inductive protocol to re-interpret 27 already-published cases of platform overthrow attempts. Our results suggest that, during a platform overthrow attempt, both players articulate functional expansion and technical genericity. Accordingly, we formulate propositions that account for the strategies at play during a platform overthrow attempt. We discuss these results regarding the digital platform literature on competition and conclude that the study of platform overthrow can yield useful insights on the future of digital platforms.
// This function will be invoked when a Client-Library has detected an error. // Before Client-Library routines return CS_FAIL, this handler will be called with additional error information. CS_RETCODE clientmsg_callback(CS_CONTEXT *context, CS_CONNECTION *conn, CS_CLIENTMSG *emsgp) { sdblib::error << "client library error: severity(" << emsgp->severity << ") number(" << emsgp->msgnumber << ") origin(" << emsgp->msgnumber << ") layer(" << emsgp->msgnumber << ") "; std::string text{emsgp->msgstring}; std::replace(text.begin(), text.end(),'\n', ' '); std::transform(text.begin(), text.end(), text.begin(), ::tolower); sdblib::error << text; if (emsgp->osstringlen > 0) { std::string text{emsgp->osstring}; std::replace(text.begin(), text.end(),'\n', ' '); std::transform(text.begin(), text.end(), text.begin(), ::tolower); sdblib::error << " operating system error number(" << emsgp->osnumber << ") " << text; } sdblib::error << sdblib::endl << sdblib::flush; return CS_SUCCEED; }
<gh_stars>1000+ package kubernetesdiscovery import ( "time" "k8s.io/apimachinery/pkg/types" "github.com/tilt-dev/tilt/pkg/apis" "github.com/tilt-dev/tilt/pkg/apis/core/v1alpha1" ) // nsKey is a tuple of Cluster metadata and the K8s namespace being watched. // // If multiple clusters are are in use, it's possible to watch the same namespace // in both, so the namespace name alone is not sufficient. Similarly, a Cluster // object can change, so there might be multiple revisions active at once. type nsKey struct { cluster clusterKey namespace string } func newNsKey(cluster *v1alpha1.Cluster, ns string) nsKey { return nsKey{ cluster: newClusterKey(cluster), namespace: ns, } } // uidKey is a tuple of Cluster metadata and the UID being watched. // // If multiple clusters are are in use, it's possible (albeit very unlikely) to // watch the same UID in both, so the UID alone is not sufficient. Similarly, a // Cluster object can change, so there might be multiple revisions active at // once. type uidKey struct { cluster clusterKey uid types.UID } func newUIDKey(cluster *v1alpha1.Cluster, uid types.UID) uidKey { return uidKey{ cluster: newClusterKey(cluster), uid: uid, } } type clusterKey struct { name types.NamespacedName revision time.Time } func newClusterKey(cluster *v1alpha1.Cluster) clusterKey { rev := time.Time{} if cluster.Status.ConnectedAt != nil { rev = cluster.Status.ConnectedAt.Time } return clusterKey{ name: apis.Key(cluster), revision: rev, } }
On the surface, the sight of “Make America Nazi-Free Again” offending some Americans should be a combination of frightening and disgusting. However, anyone with a passing knowledge of current events in America, and the integrity to dig past a thin fairy dusting of BS, can see why many, non-Nazi Americans would take great offense to the game’s slogan. Clearly it’s a rip on Donald Trump’s “Make America Great Again!” I don’t think I need to point that out. What I do need to point out is the utterly disgusting tactic that America’s far Left has begun using to slander hundreds of millions of good, honest Americans: The Nazi Card. A flavor of the month variation of the Racist Card, anything the Left does not like, they label Nazi. Even Jews aren’t exempt from this treatment. Ben Shapiro is probably the most relevant/famous Orthodox Jew in America today. He’s a straightforward man, follows his religion faithfully, and has targeted, and been targeted by, the Alt-Right’s Nazis more than any public figure in the past few years. Mr. Shapiro gives speeches around the country about justice, personal responsibility, individuality, the upside of capitalism, small government, and other concepts that are kryptonite to the Nazi brand of fascism. After all, anyone that knows jack about fascism knows its core tenets forsake justice and individuality in the name of putting the country and its pervasive, authoritarian government first. Yet the Left sees this Jewish American speak out against racism, and labels him a Nazi fascist, on top of making many attempts to silence him and those who like him. These attempts vary in degree of seriousness, but they’d all fit well in the Nazi playbook: Posting signs and graffiti about how he’s not welcome in their community, disrupting traffic, organizing acts of violence in the streets, destroying property, attacking people with bike locks, forcing businesses to close early, and what may be seen as conspiracy to commit murder against right wing Americans they lure into ambushes. Antifa continues its transformation into Nazi-like fascists by the word’s very definition. They’re even trying to silence Jews now. It’s not limited to Ben Shapiro either, water-brained Antifa sympathizers have also taken to slandering Charles Barkley, and really any black non-Democrat in America, as a “Black White Supremacist.” Though acts like this should surprise no one, as these idiots have led the charge for the Left, which now demonizes any citizen that is not a proud Democrat. Don’t want to get caught up in this escalating flustercuck of increasingly fake news and desperate attacks coming from both sides of the media? Screw you stupid Boogie-wannabe centrists! You think Hillary Clinton was a bad candidate, just because she threw Bill Clinton’s sexual assault victims under the bus in front of the nation, undermined the democratic process in the 2016 primaries to beat Bernie Sanders, destroyed evidence crucial to a federal investigation in a Tom-Brady-blatant manner, may have willingly left Americans to die in a foreign country, and has been a notoriously bad liar since the 1990’s? You have a terrible case of Misogyny! You remotely agree with Republicans on any topic? I’LL SUCKER PUNCH YOU GODDAMN NAZIS! And therein lies the problem. Since the 2016 presidential election, the Left has been painting half of America as Nazis for the crime of disagreeing with them, then loudly proclaiming their intent to commit acts of street violence against all they feel meet their arbitrary criteria for being labeled Nazis. These Antifa-loving morons can’t even define fascism, nor can they identify Nazis for that matter, it’s just a word they apply to everyone they dislike. To top it all off, they brag about being Communists, the only non-religious, ideological group in history to be canonically worse than Nazis and all of the other fascists combined. Gamers have loved killing Nazis for decades, they’re just taking offense to being called Nazis. I sincerely doubt many gamers are complaining about the prospect of murdering actual Nazis to reclaim America from Germany’s second great f*%k up. (Remember, Marx came before Hitler chronologically.) It probably has more to do with the fact the new, highly politicized slogan plays into the relentless slander and potential physical violence many of them have had to endure from the Left. Is there a Neo-Nazi presence in America? Yes, but it’s pathetically small. According to CNN’s report on the SPLC’s findings, there are more African-American hate groups in America (193) than Neo-Nazis (99) or White Nationalists (100). Blacks only make up 12% of America’s population and they have more hate groups than the Neo Nazis. If anything, it’s just another case of black people embarrassing Nazis at things they think they’re good at, and this time they didn’t even need Jesse Owens to upstage Hitler in his own capital. Seriously though, it highlights how insignificantly small and unpopular the Neo-Nazis are as a group. The largest Neo-Nazi group in America, the National Socialist Movement, is 400 members strong and spread over 32 states. (You can search it yourself if you don’t want to take my numbers, I’m not linking to these shit stains’ websites.) That means there are between 400 and 39,600 Neo-Nazis in total in the US. That may sound like a huge scary number on its own, but you have to consider the sheer size of America: That’s just 0.01% of America’s 323 million citizens. An ant beneath my shoe would offer more resistance than the entire American Neo-Nazi presence could. America can easily crush any Neo-Nazis that were to become violent. The current claims of rising Nazis in America are greatly inflated by jackasses that scream “Nazi! Racist! Misogynist! Bigot!” at anyone that disagrees with them, regardless of the words’ actual definitions. Do I blame the people marketing Wolfenstein 2: The New Colossus for taking this low hanging fruit of controversy? Hell no! They’ve stumbled ass-backwards upon the literal greatest marketing push of the millennium, as current events have lined up perfectly with the well established Wolfenstein lore of “What if the Nazis won?” Wolfenstein 2: The New Colossus is going to be all over social media, gaming sites, and “real” news sites until its release. Have I mentioned gamers love killing actual Nazis? Should they be afraid of chasing off too many potential customers? Not really. Wolfenstein 2: The New Colossus is the next installment of Wolfenstein’s “New Order Series,” which has reinvigorated the franchise and recaptured the spirit of the most important first person shooter of all time. I honestly doubt many among its traditional target audience will be turned off enough by the game’s politicization to actually skip it. After all, there are few things gamers love more than killing actual Nazis. I do however, blame the media for the dishonest way in which it is presenting many non-Nazis’ frustration with the “Make America Nazi-Free Again” slogan. I hope we can all grow up a bit and someday reflect on this disgusting misrepresentation of an issue as one of the traditional media’s death throes. Advertisements
SPINNING AND BRANCHED CYCLIC COVERS OF KNOTSC A necessary and suucient algebraic condition is given for a Z-torsion-free simple 2q-knot, q 3, to be the r-fold branched cyclic cover of a knot. This result is then used to give a necessary and suucient algebraic condition on a simple (2q ?1)-knot for its spun knot to be the r-fold branched cyclic cover of a knot. Finally we give examples for q 5 of a simple (2q ? 1)-knot which is not the 2r-fold branched cyclic cover of any knot although its spun knot is.
/** * Initializes motors, servos, lights and sensors from a given hardware map * * @param ahwMap Given hardware map */ public void init(HardwareMap ahwMap, Telemetry telemetry) { hwMap = ahwMap; this.telemetry = telemetry; /* * eg: Initialize the hardware variables. Note that the strings used here as * parameters to 'get' must correspond to the names assigned during the robot * configuration step (using the FTC Robot Controller app on the phone). */ this.blinkin = hwMap.get(RevBlinkinLedDriver.class, "blinkin"); motorFrontLeft = hwMap.get(DcMotorEx.class, "motorFrontLeft"); motorFrontRight = hwMap.get(DcMotorEx.class, "motorFrontRight"); motorMiddle= hwMap.get(DcMotorEx.class, "motorMiddle"); motorMiddleSwivel = hwMap.get(DcMotorEx.class, "motorMiddleSwivel"); duckSpinner = hwMap.get(DcMotor.class, "duckSpinner"); motorFrontLeft.setDirection(DcMotor.Direction.REVERSE); motorFrontRight.setDirection(DcMotor.Direction.FORWARD); duckSpinner.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER); motorFrontRight.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE); motorFrontLeft.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE); motorMiddle.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.FLOAT); motorMiddleSwivel.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.FLOAT); /* * driveLeft.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE); * driveRight.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE); if * (this.currentBot == RobotType.BigWheel) { * driveLeft.setDirection(DcMotorSimple.Direction.FORWARD); * driveRight.setDirection(DcMotorSimple.Direction.REVERSE); } else { * driveLeft.setDirection(DcMotorSimple.Direction.REVERSE); * driveRight.setDirection(DcMotorSimple.Direction.FORWARD); } */ moveMode = MoveMode.still; BNO055IMU.Parameters parametersIMU = new BNO055IMU.Parameters(); parametersIMU.angleUnit = BNO055IMU.AngleUnit.DEGREES; parametersIMU.accelUnit = BNO055IMU.AccelUnit.METERS_PERSEC_PERSEC; parametersIMU.loggingEnabled = true; parametersIMU.loggingTag = "baseIMU"; imu = hwMap.get(BNO055IMU.class, "baseIMU"); imu.initialize(parametersIMU); Constants.ALLIANCE_INT_MOD = Math.abs(Constants.ALLIANCE_INT_MOD); chassisLengthSensor = this.hwMap.get(DistanceSensor.class, "distLength"); dashboard = FtcDashboard.getInstance(); }
Evaluation of Novel Probiotic Bacillus Strains Based on Enzyme Production and Protective Activity Against Salmonellosis . Probiotic strains of Bacillus spp. are used in industrial poultry production because of their ability to produce enzymes enhancing the absorption of nutrients and to reduce the risk of Salmonella spp. infection. The aim of this study was to isolate native potential probiotic Bacillus spp. with the ability to produce enzymes and adhere to intestinal epithelial cells in order to prevent Salmonella Typhimurium infection. First, 25 samples of chicken feces were collected from 7 industrial poultry farms in Golestan province located in Northern Iran. Bacillus species from samples were isolated on nutrient agar. These strains were evaluated for the ability of producing amylase and phytase and their probiotic characteristics such as bile salt, acid and antibiotic resistance, the ability to attach to intestinal epithelial cells and inhibit Salmonella Typhimurium invasion. Then selected isolates were identified based on 16S rDNA . Results showed that from 86 isolated, 4 Bacillus strains had desirable characteristics such as the ability to produce phytase and amylase and having suitable probiotics features. We identified K03, K02, and K20 isolates as Bacillus tequilensis and K20 as Bacillus subtilis . Bacillus tequilensis K03 showed the highest attachment ability to intestinal epithelium cells and could inhibited Salmonella Typhimurium attachment. INTRODUCTION C hicken intestinal infections result in decreased production, increased mortality and cause decline in food economics and safety (Natsos et al., 2016). Using probiotics can improve feed conversion ratio (FCR) by preventing intestinal diseases in chicken (Papatsiros et al., 2013;Knarreborg et al., 2008). The World Health Organization (WHO) defined probiotics as "live micro-organisms that when administered in adequate amounts, confer a health benefit on the host" (Jorgen, 2005). The characteristics of a bacteria that could be identified as probiotic are: non-pathogenic, resistant to gastric acidity and bile salts while passing through the digestive system, having the ability to produce digestive enzymes, facilitative for the digestion and absorption of nutrients, competitive with important pathogenic bacteria such as Salmonella spp. in attachment to intestinal epithelium cells, and being able to neutralize internal toxins (Gaggìa et al., 2010). Among the probiotics used in chicken diets, the Bacillus spp. can withstand environmental conditions and survive for a long time by producing spores (Nicholson, 2002). It has been shown that species of the genus Bacillus, in addition to naturally occurring in soil, are found at high levels in chicken feces (Nicholson, 2002). The bacteria can remain stable in the gastrointestinal tract of the chicken and have probiotic beneficial effects (Nicholson, 2002). Some of the Bacillus spp. is capable of producing biofilm in animal intestines helping the bacteria to resist changes and stresses and also to protect the intestine against attachment of the pathogenic bacteria such as Salmonella spp. to the intestinal epithelial cells (Thirabunyanon and Thongwittaya, 2012). The Bacillus spp. have many applications by producing enzymes such as α-amylase and phytase (Lee et al., 2012). These enzymes can decompose anti-nutrient agents in food, increase nutrient bioavailability, break down some chemical bonds, strengthen the indigenous enzymes and finally increase production efficiency (Lee et al., 2012). The major source of phosphorus in plant-derived foods, especially in cereal grains, is phytate phosphate (Askelson et al., 2014). It accounts for 50 to 80 percent of total phosphorus in grain and legumes, respectively (Askelson et al., 2014). Phytase can help releasing the phosphorus in chicken's intestinal track and making it available for absorption (Askelson et al., 2014). Starch is the most abundant combination of carbohydrates in cereals, such as wheat and corn (Latorre et al., 2016). The presence of amylase producing bacteria in broiler diets helps the digestion of insoluble starch (Latorre et al., 2016). The Salmonella spp. is one of the major foodborne pathogen in poultry industry which also causes infection in humans (Mouttotou et al., 2017). Using probiotics capable to attach to intestinal epithelial cells and compete with Salmonella spp. is a safe alternative method to antibiotic therapy (Thirabunyanon and Thongwittaya, 2012). The purpose of this study was to isolate and identify potential native and suitable probiotic Bacillus spp. bacteria in Golestan province of Iran with the ability to produce enzymes and high affinity to intestinal epithelial cells. These selected native probiotic Bacillus spp. bacteria could be used in poultry diets to improve the production quality, reduce antibiotic usage, lower the incidence of various related diseases and to prevent Salmonella Typhimurium infection in human and poultry. MATERIALS AND METHODS Sampling and Isolation of Bacillus strains Twenty five samples of chicken feces were collected from 7 farms located in Golestan province in Northern Iran, with the capacity of rearing 20,000 chicken each farm. These farms were under windowless management with full automatic feeding system and were not using any kind of antibiotics in their diet. The specimens were collected in peptone water and were transferred to the laboratory within 2h under sterile condition. In order to omit vegetative and non-spore forming bacteria, samples were put in 90˚C bain-marie for 30 minutes. Bacillus isolates were insulated on nutrient agar (QueLab-393506, Canada) plates, after 48 hours of incubation at 37˚C. Isolates were evaluated by Gram staining, sporulation staining, catalase and hemolysis tests (Barbosa et al., 2005). Determination of α-amylase enzyme activity All Bacillus strains were grown in tryptic soy broth (TSB, Merck-105459-0500, Germany) at 37˚C for 24 hours. Then 10 µl with 10 8 cfu/mL of each strain were J HELLENIC VET MED SOC 2018, 69(4) ΠΕΚΕ 2018, 69(4) placed at the center of starch agar (Merck-1.01252.1000, Germany). After incubation, the α-amylase producer strain was selected by starch solubilisation zone around the colony (Latorre et al., 2016). Amylase activity was measured by DNS method. The reaction mixture containing 1% soluble starch, 0.1 M Tris/HCl buffer (pH 8.5), 0.5 ml enzyme solution was incubated at 37˚C for 30 minutes. The reaction was stopped by the addition of 3,5-dinitrosalicylic acid (DNS) then heated for 10 minutes in boiling water and cooled in 4˚C. For estimating the enzyme activity, glucose standard curve was drown (Nwokoro and Anthonia, 2015). Determination of phytase enzyme activity The ability to produce phytase enzyme was screened by using phytase specific medium (PSM). The pure cultures were placed at the center of PSM agar and incubated at 37˚C for 62 h. After incubation, the strains with the ability to produce phytase enzyme were selected by a clear zone around the colony (Kumar et al., 2013). For phytase activity measurement, 0.1 ml of enzyme solution, 0.9 ml of 2 mM sodium phytate and 0.1M Tris-HCl buffer (pH 7) were used. Incubation was done at 37˚C for 10 minutes. The reaction was stopped by adding 0.75 ml of 5% tricholoroaccetic acid. The released phosphate was measured by adding 1.5 ml of color reagent containing 2.5% ammonium molybdate solution, 5.5% sulfuric acid and 2.5% ferrous sulfate solution (Demirkan et al., 2014). Bile salts and acid resistance Resistance of selected bacteria to bile salts and acid were measured according to Razmgah et al. (2016) and Cenci et al. (2006) respectively. Antibiotic resistance of Bacillus strains (MIC method) The antibiotic resistance pattern of selected Bacillus strains was determined according to Sorokulova et al. (2008). Attachment and invasion assay of Bacillus spp. and Salmonella Typhimurium to the intestinal epithelial cells Cells of the intestinal epithelial cell line (Caco2) were cultured in dulbecco´s modified Eagle´s minimal medi-um (DMEM; Sigma-Aldrich, USA) adding 10% fetal calf serum inactivated by heating at 56ºC for 30 min, 1% (v/v) L-glutamine and 1% Streptomycin (10 mg/ml and 10-103 IU/ml). Cells were incubated in 5% CO 2 at 37ºC and attachment and colonization tests were done according to Thirabunyanon and Thongwittaya (2012). The ability of Bacillus spp. to inhibit Salmonella Typhimurium attachment to Caco-2 cells was assayed by two methods of exclusion and competition, after Caco-2 monolayers at 90% confluence in a 12-well plate were washed twice with PBS (phosphate buffered saline, pH 7.4) (Zhang et al., 2010). In the exclusion assay, Caco-2 monolayers were inoculated with 300 µl of Bacillus spp. suspension (10 7 CFU/well) in DMEM medium and incubated in 5% CO 2 at 37ºC for 1 h then 100 µl of Salmonella Typhimurium suspension (10 7 CFU/well) in DMEM medium was added. Finally incubation was done in 5% CO 2 at 37ºC for 1 h. Molecular identification based on 16S rDNA The DNA of selected Bacillus strains was extracted using the lysozyme enzyme digestion according to Araújo et al. (2004). For amplification of a 1500 bp fragment from 16S rDNA region was performed with universal primers, 27F-5 / -AGAGTTTGATCCTGGCT-CAG-3 / and 1492R-5 / -ACGGCTACCTTGTTAC-GACTT -3 / .The 25 μl PCR reaction mixture consisted of 200 ng template DNA, 2.5 μl of PCR 10x Buffer, 200 μM dNTP, 1.5 mM MgCl 2 , 10 pmol of each primers and 1 unit of Taq DNA polymerase enzyme and distilled water. Amplification cycling included primary denaturation at 94 °C for 5 minutes, followed by 30 cycles of denaturation at 94 °C for 45 seconds, annealing of primer at 58 °C for 1 minute, extension at 72 °C for 30 seconds, and final extension at 94 °C for 5 minutes. Then, the PCR products were electrophoresed on 1.5% agarose gel. The 100 bp molecular weight marker (Sina-Clon, Tehran, Iran) was used as a molecular marker. After purification of the PCR product from the agarose gel, the samples were sent for sequencing to Bioneer Company (Daejeon, Republic of South Korea) (Araújo et al., 2004). Phytase enzyme assay Four Bacillus strains of K03, K02, K20 and K10 showed a clear zone in plate assay. Percent of dissolution capacity of phosphorus was investigated in these strains (Equation 4). The standard curve was drown by standard phytase (Figure 3) and the linear regression equation (Equation 5) was prepared and the rate of phytase production by strains (Equation 6) was calculated ( Table 2). Statistical and phylogenetic analysis Data obtained from sequencing were edited by bioinformatic software of Chromas Pro. and saved in FASTA format. Then GenBank of EzTaxon database was used to identify the bacteria (Chun et al., 2007). The phylogenetic tree was drawn by MEGA 5 software and neighbor-joining method (Saitou et al., 1987., Tamura et al., 2011. The statistical data analysis was done using GraphPad Prism v7.03 statistical software for selected Bacillus strains. Isolation of Bacillus spp. Spore-forming bacteria were selected by heat treatment of chicken feces. Thirty-four pure colonies were selected for further analysis. These strains were named K1_K34. All of the isolates were catalase-positive, oxidase-positive and non-hemolytic. α-amylase enzyme assay K03 strain was the only isolate with a significant zone of clearance on starch agar and the ability to produce α-amylase enzyme (Figure 1). Using the equation, the percentage of starch solution by selected Bacillus strain was calculated. Also, by drawing the standard curve (Figure 2), the linear regression equation (Equation 2) was used to calculate the production of α-amylase by the strain (Equation 3) (Table 1). % soluble starch = (OD control-OD sample) / OD control * 100 (Equation 1). Y = 0.0001234 * X + 0.05034 (Equation 2). Where Y = OD supernatant, X = starch concentration remain. X-total starch: starch concentration consumption All strains of Bacillus-producing enzymes grew in pH 2, pH 4 and pH7 (Table 3). Antibiotic resistance analysis Bacillus strains were sensitive to all antibiotics listed by EFSA in 2012 (Table 4). Adhesion capability of Bacillus spp. to intestinal epithelial cells The adhesion ability of Bacillus spp. to intestinal epithelial cells is shown in Figure 5. Affinity ranged between 1.3-1.9 log CFU/well among the isolates. K03 strain showed the highest adherence ability to intestinal epithelial cells (Figure 6). Tolerance to bile salts and acid All strains which produced enzymes, were resistant to bile salts. Among these strains, the 2 strains of K03 and K20 showed the highest resistance to bile (Figure 4). showed more inhibitory strength than the others in both methods of exclusion and competition assay (Table 5). Phylogenetic identification of Bacillus starins The analysis of 16S rDNA gene similarity showed K10 strain had the highest similarity to Bacillus subtilis and K03, K02 and K20 strains closely belonged to Bacillus tequilensis (Figure 7). Both strains are probiotic bacteria (Thirabunyanon and Thongwittaya, 2012;Parveen et al., 2016). DISCUSSION In vivo models of probiotic applications of Bacillus spp. have shown that these bacteria can enhance the absorption of food and have protective effects against infections (Ouwehand et al., 2002). In this study Bacillus strains were isolated from chicken feces with the specific ability of enzyme production and inhibition of invasive Salmonella Typhimurium. Inhibitory capability of Bacillus spp. against Salmonella typhimurium adherence to intestinal epithelial cells The results showed that all the selected Bacillus spp. have inhibitory effects on the attachment of Salmonella Typhimurium to Caco-2 cells. Among them K03 strain to produce phytase, cellulase, xylanase enzymes and had the most compatibility with intestinal conditions. The results of the present study showed that all strains of Bacillus-producing enzymes were able to withsand bile salts with a concentration of 0.03% and acidic conditions (pH 2.0, 4.0), which were consistent with mentioned studies. Khusro and Aarti (2015) isolated the strains of amylase producing Bacillus from chicken feces. The 16S rDNA identification showed that 5 strains that had the ability to produce amylase enzyme were closer to Bacillus tequilensis, Bacillus subtilis and Bacillus licheniformis, which were further selected to optimize the production of amylase enzyme. In this investigation, phylogenetic studies showed isolated Bacillus strain had the highest relationship with Bacillus subtilis and Bacillus tequilensis. Thirabunyanon and Thongwittaya (2012) reported that among 117 bacilli isolated from chicken intestines, 10 isolates had inhibitatory abilities against 7 pathogenic bacteria, including Salmonella spp. and also had the ability to attach to Caco-2 cells in a variety of conditions ranging from 2.8-4.9 logCFU/ well. In the present study a novel probiotic Bacillus tequilensis K03 had the highest attachment ability to Caco-2 cells and showed the highest inhibition of Salmonella Typhimurium, up to 53% compared to control. According to Kizerwetter-Swida and Binek (2006) the bacteria with a high attachment ability to the Caco-2 cell has a higher ability to inhibit pathogenic bacterial attachments. These results are consistent with a study done by Jankowska and Laubitz (2008) that found a new probiotic bacteria belonged to Bacillus tequilensis FR9 acquired from chicken digestive tract, which was capable of inhibiting Listeria monocytogenes. CONCLUSION In the present study, we isolated a novel starin of Bacillus tequilensis K03 from chicken feces that was a potent producer of amylase and phytase with efficient protection activity against Salmonella Typhimurium infection in vitro. It was resistant to bile and acidic environment of intestinal track. Further investigation is needed, to evaluate its in vivo use as a native probiotic in chicken diets in order to improve the production Khusro et al. (2017) isolated α-amylase producing Bacillus strains from chicken, and increased the amount of amylase enzyme production to 136.71 IU/ml by optimizing the culture conditions. Latorre et al. (2016) isolated 31 strains of Bacillus from chicken, which could produce amylase, phytase, protease and lipase enzyme. In the current study, 4 Bacillus isolates from chicken feces with the ability to produce phytase enzyme were isolated. From these strains K03 was also able to produce amylase enzyme. Among them the K10 strain had the highest ability to produce phytase enzyme at 22.33 ± 1.2 IU/ml and K03 strain was the superior bacterium in production of 4.56 ± 1.1 U/ml phytase and 36.7 ± 1.3 U/ml α-amylase enzymes. Seeber et al. (2015) reported that among 69 Bacillus isolated from broiler chickens, only three isolates were able to tolerate bile salts with a concentration of 0.037% and acidic conditions (pH 2.0). Mingmongkolchai and Panbangred (2017) isolated 187 Bacillus strains from fresh milk of cattles, pigs and calves, and reported that 7 strains had the ability
package memmetrics import ( "time" "github.com/FoxComm/vulcand/Godeps/_workspace/src/github.com/mailgun/timetools" . "github.com/FoxComm/vulcand/Godeps/_workspace/src/gopkg.in/check.v1" ) type CounterSuite struct { clock *timetools.FreezedTime } var _ = Suite(&CounterSuite{}) func (s *CounterSuite) SetUpSuite(c *C) { s.clock = &timetools.FreezedTime{ CurrentTime: time.Date(2012, 3, 4, 5, 6, 7, 0, time.UTC), } } func (s *CounterSuite) TestCloneExpired(c *C) { cnt, err := NewCounter(3, time.Second, CounterClock(s.clock)) c.Assert(err, IsNil) cnt.Inc(1) s.clock.Sleep(time.Second) cnt.Inc(1) s.clock.Sleep(time.Second) cnt.Inc(1) s.clock.Sleep(time.Second) out := cnt.Clone() c.Assert(out.Count(), Equals, int64(2)) }
from sncosmo.photdata import PHOTDATA_ALIASES # Generate docstring: table of aliases # Descriptions for docstring only. _photdata_descriptions = { 'time': 'Time of observation in days', 'band': 'Bandpass of observation', 'flux': 'Flux of observation', 'fluxerr': 'Gaussian uncertainty on flux', 'zp': 'Zeropoint corresponding to flux', 'zpsys': 'Magnitude system for zeropoint', 'fluxcov': 'Covariance between observations (array; optional)' } _photdata_types = { 'time': 'float', 'band': 'str', 'flux': 'float', 'fluxerr': 'float', 'zp': 'float', 'zpsys': 'str', 'fluxcov': 'ndarray' } lines = [ '', ' '.join([10 * '=', 60 * '=', 50 * '=', 50 * '=']), '{0:10} {1:60} {2:50} {3:50}' .format('Column', 'Acceptable aliases (case-independent)', 'Description', 'Type') ] lines.append(lines[1]) for colname in PHOTDATA_ALIASES: alias_list = ', '.join([repr(a) for a in PHOTDATA_ALIASES[colname]]) line = '{0:10} {1:60} {2:50} {3:50}'.format( colname, alias_list, _photdata_descriptions[colname], _photdata_types[colname]) lines.append(line) lines.extend([lines[1], '']) __doc__ = '\n'.join(lines)
// GetRegionFromCtx gets the region from the context. func (rm *MockRegionManager) GetRegionFromCtx(ctx *kvrpcpb.Context) (RegionCtx, *errorpb.Error) { ctxPeer := ctx.GetPeer() if ctxPeer != nil { _, err := rm.GetStoreAddrByStoreID(ctxPeer.GetStoreId()) if err != nil { return nil, &errorpb.Error{ Message: "store not match", StoreNotMatch: &errorpb.StoreNotMatch{}, } } } rm.mu.RLock() ri := rm.regions[ctx.RegionId] rm.mu.RUnlock() if ri == nil { return nil, &errorpb.Error{ Message: "region not found", RegionNotFound: &errorpb.RegionNotFound{ RegionId: ctx.GetRegionId(), }, } } if rm.isEpochStale(ri.getRegionEpoch(), ctx.GetRegionEpoch()) { return nil, &errorpb.Error{ Message: "stale epoch", EpochNotMatch: &errorpb.EpochNotMatch{ CurrentRegions: []*metapb.Region{{ Id: ri.meta.Id, StartKey: ri.meta.StartKey, EndKey: ri.meta.EndKey, RegionEpoch: ri.getRegionEpoch(), Peers: ri.meta.Peers, }}, }, } } return ri, nil }
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from argparse import Namespace import os import re import unittest from pathlib import Path from tqdm import tqdm from typing import List, Dict, Optional import torch from fairseq.checkpoint_utils import load_model_ensemble_and_task from fairseq.scoring.wer import WerScorer from fairseq.scoring.bleu import SacrebleuScorer from fairseq import utils import zipfile S3_BASE_URL = "https://dl.fbaipublicfiles.com/fairseq" class TestFairseqSpeech(unittest.TestCase): @classmethod def download(cls, base_url: str, out_root: Path, filename: str): url = f"{base_url}/{filename}" path = out_root / filename if not path.exists(): torch.hub.download_url_to_file(url, path.as_posix(), progress=True) return path def _set_up(self, dataset_id: str, s3_dir: str, data_filenames: List[str]): self.use_cuda = torch.cuda.is_available() self.root = Path.home() / ".cache" / "fairseq" / dataset_id self.root.mkdir(exist_ok=True, parents=True) os.chdir(self.root) self.base_url = ( s3_dir if re.search("^https:", s3_dir) else f"{S3_BASE_URL}/{s3_dir}" ) for filename in data_filenames: self.download(self.base_url, self.root, filename) def set_up_librispeech(self): self._set_up( "librispeech", "s2t/librispeech", [ "cfg_librispeech.yaml", "spm_librispeech_unigram10000.model", "spm_librispeech_unigram10000.txt", "librispeech_test-other.tsv", "librispeech_test-other.zip", ], ) def set_up_ljspeech(self): self._set_up( "ljspeech", "s2/ljspeech", [ "cfg_ljspeech_g2p.yaml", "ljspeech_g2p_gcmvn_stats.npz", "ljspeech_g2p.txt", "ljspeech_test.tsv", "ljspeech_test.zip", ], ) def set_up_sotasty_es_en(self): self._set_up( "sotasty_es_en", "s2t/big/es-en", [ "cfg_es_en.yaml", "spm_bpe32768_es_en.model", "spm_bpe32768_es_en.txt", "sotasty_es_en_test_ted.tsv", "sotasty_es_en_test_ted.zip", ], ) def set_up_mustc_de_fbank(self): self._set_up( "mustc_de_fbank", "https://dl.fbaipublicfiles.com/joint_speech_text_4_s2t/must_c/en_de", [ "config.yaml", "spm.model", "dict.txt", "src_dict.txt", "tgt_dict.txt", "tst-COMMON.tsv", "tst-COMMON.zip", ], ) def download_and_load_checkpoint( self, checkpoint_filename: str, arg_overrides: Optional[Dict[str, str]] = None, strict: bool = True, ): path = self.download(self.base_url, self.root, checkpoint_filename) _arg_overrides = arg_overrides or {} _arg_overrides["data"] = self.root.as_posix() models, cfg, task = load_model_ensemble_and_task( [path.as_posix()], arg_overrides=_arg_overrides, strict=strict ) if self.use_cuda: for model in models: model.cuda() return models, cfg, task, self.build_generator(task, models, cfg) def build_generator( self, task, models, cfg, ): return task.build_generator(models, cfg) @classmethod def get_batch_iterator(cls, task, test_split, max_tokens, max_positions): task.load_dataset(test_split) return task.get_batch_iterator( dataset=task.dataset(test_split), max_tokens=max_tokens, max_positions=max_positions, num_workers=1, ).next_epoch_itr(shuffle=False) @classmethod def get_wer_scorer( cls, tokenizer="none", lowercase=False, remove_punct=False, char_level=False ): scorer_args = { "wer_tokenizer": tokenizer, "wer_lowercase": lowercase, "wer_remove_punct": remove_punct, "wer_char_level": char_level, } return WerScorer(Namespace(**scorer_args)) @classmethod def get_bleu_scorer(cls, tokenizer="13a", lowercase=False, char_level=False): scorer_args = { "sacrebleu_tokenizer": tokenizer, "sacrebleu_lowercase": lowercase, "sacrebleu_char_level": char_level, } return SacrebleuScorer(Namespace(**scorer_args)) @torch.no_grad() def base_test( self, ckpt_name, reference_score, score_delta=0.3, dataset="librispeech_test-other", max_tokens=65_536, max_positions=(4_096, 1_024), arg_overrides=None, strict=True, score_type="wer", ): models, _, task, generator = self.download_and_load_checkpoint( ckpt_name, arg_overrides=arg_overrides, strict=strict ) if not self.use_cuda: return batch_iterator = self.get_batch_iterator( task, dataset, max_tokens, max_positions ) if score_type == "bleu": scorer = self.get_bleu_scorer() elif score_type == "wer": scorer = self.get_wer_scorer() else: raise Exception(f"Unsupported score type {score_type}") progress = tqdm(enumerate(batch_iterator), total=len(batch_iterator)) for batch_idx, sample in progress: sample = utils.move_to_cuda(sample) if self.use_cuda else sample hypo = task.inference_step(generator, models, sample) for i, sample_id in enumerate(sample["id"].tolist()): tgt_str, hypo_str = self.postprocess_tokens( task, sample["target"][i, :], hypo[i][0]["tokens"].int().cpu(), ) if batch_idx == 0 and i < 3: print(f"T-{sample_id} {tgt_str}") print(f"H-{sample_id} {hypo_str}") scorer.add_string(tgt_str, hypo_str) print(scorer.result_string() + f" (reference: {reference_score})") self.assertAlmostEqual(scorer.score(), reference_score, delta=score_delta) def postprocess_tokens(self, task, target, hypo_tokens): tgt_tokens = utils.strip_pad(target, task.tgt_dict.pad()).int().cpu() tgt_str = task.tgt_dict.string(tgt_tokens, "sentencepiece") hypo_str = task.tgt_dict.string(hypo_tokens, "sentencepiece") return tgt_str, hypo_str def unzip_files(self, zip_file_name): zip_file_path = self.root / zip_file_name with zipfile.ZipFile(zip_file_path, "r") as zip_ref: zip_ref.extractall(self.root / zip_file_name.strip(".zip"))
Pelistega ratti sp. nov. from Rattus norvegicus of Hainan island. Two strains (NLN63T and NLN82) of Gram-stain-negative, oxidase- and catalase-positive, bacilli-shaped organisms were isolated from the faecal samples of two separate Rattus norvegicus in Baisha county of Hainan Province, Southern PR China. Phylogenetic analysis based on the near full-length 16S rRNA sequences revealed that strain NLN63T belongs to the genus Pelistega, having maximum similarity to Pelistega suis CCUG 64465T (97.1 %), Pelistega europaea CCUG 39967T (96.2 %) and Pelistega indica DSM 27484T (96.2 %), respectively. The phylogenomic tree built on 553 core genes from genomes of 20 species in the genus Pelistega and other adjacent genera further confirmed that strains NLN63T and NLN82 form a distinct subline and exhibit specific phylogenetic affinity with P. europaea CCUG 39967T. In digital DNA-DNA hybridization analyses, strain NLN63T showed low estimated DNA reassociation values (21.4-22.6 %) with the type strains of the species in the genus Pelistega. The DNA G+C contents of strains NLN63T and NLN82 were 37.3 and 37.1 mol%, respectively. Strain NLN63T had a unique MALDI-TOF MS profile, contained Q-8 as the major quinone and C16 : 0, summed feature 8 (C18 : 1  ω7c/C18 : 1  ω6c or both) and summed feature 3 (C16 : 1  ω7c/C16 : 1  ω6c or both) as the dominant fatty acids. Based upon these polyphasic characterization data obtained from the present study, a novel species of the genus Pelistega, Pelistega ratti sp. nov., is proposed with NLN63T (=GDMCC 1.1697T=JCM 33788T) as the type strain.
/** * Have existing Limelight user to add to this project * * @param invitedPerson_Limelight_UserId * @param invitedPersonAccessLevel * @param projectId * @param webserviceResult * @throws Exception */ private void addExistingUserToProjectUsingProjectId( int invitedPersonUserId, int invitedPersonAccessLevel, int projectId, UserSession userSession, HttpServletRequest httpServletRequest, WebserviceResult webserviceResult ) throws Exception { Integer userMgmtUserId = userDAO.getUserMgmtUserIdForId( invitedPersonUserId ); if ( userMgmtUserId == null ) { String msg = "Failed to get userMgmtUserId for Limelight user id: " + invitedPersonUserId; log.error( msg ); throw new LimelightInternalErrorException( msg ); } UserMgmtGetUserDataRequest userMgmtGetUserDataRequest = new UserMgmtGetUserDataRequest(); userMgmtGetUserDataRequest.setUserId( userMgmtUserId ); UserMgmtGetUserDataResponse userMgmtGetUserDataResponse = userMgmtCentralWebappWebserviceAccess.getUserData( userMgmtGetUserDataRequest ); if ( ! userMgmtGetUserDataResponse.isSuccess() ) { String msg = "Failed to get Full user data from User Mgmt Webapp for Limelight user id: " + invitedPersonUserId + ", userMgmtUserId: " + userMgmtUserId; log.error( msg ); throw new LimelightInternalErrorException( msg ); } if ( ! userMgmtGetUserDataResponse.isEnabled() ) { log.warn( "AddExistingUserToProjectService: user is disabled: " + invitedPersonUserId ); throw new Limelight_WS_BadRequest_InvalidParameter_Exception(); } UserDTO userDTO = userDAO.getForId( invitedPersonUserId ); existingUser_Insert_ProjectUserDTO(invitedPersonUserId, invitedPersonAccessLevel, projectId, webserviceResult, userDTO, userMgmtGetUserDataResponse, userSession, httpServletRequest ); }
<filename>tests/SkLinearBitmapPipelineTest.cpp<gh_stars>1-10 /* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include <algorithm> #include <array> #include <tuple> #include <vector> #include "SkLinearBitmapPipeline.h" #include "SkColor.h" #include "SkNx.h" #include "SkPoint.h" #include "SkPM4f.h" #include "Test.h" #include "SkLinearBitmapPipeline_tile.h" DEF_TEST(LBPBilerpEdge, reporter) { } static SkString dump(SkScalar cut, Span prefix, Span remainder) { SkPoint prefixStart; SkScalar prefixLen; int prefixCount; std::tie(prefixStart, prefixLen, prefixCount) = prefix; SkPoint remainderStart; SkScalar remainderLen; int remainderCount; std::tie(remainderStart, remainderLen, remainderCount) = remainder; return SkStringPrintf("cut: %f prefix: (%f, %f), %f, %d - remainder: (%f, %f), %f, %d", cut, prefixStart.fX, prefixStart.fY, prefixLen, prefixCount, remainderStart.fX, remainderStart.fY, remainderLen, remainderCount); } static void check_span_result( skiatest::Reporter* reporter, Span span, SkScalar dx, SkScalar cut, SkPoint start, SkScalar len, int count) { SkPoint originalStart; SkScalar originalLen; int originalCount; std::tie(originalStart, originalLen, originalCount) = span; Span prefix = span.breakAt(cut, dx); SkPoint prefixStart; SkScalar prefixLen; int prefixCount; std::tie(prefixStart, prefixLen, prefixCount) = prefix; REPORTER_ASSERT_MESSAGE(reporter, prefixStart == start, dump(cut, prefix, span)); REPORTER_ASSERT_MESSAGE(reporter, prefixLen == len, dump(cut, prefix, span)); REPORTER_ASSERT_MESSAGE(reporter, prefixCount == count, dump(cut, prefix, span)); SkPoint expectedRemainderStart; SkScalar expectedRemainderLen; int expectedRemainderCount; if (prefix.isEmpty()) { expectedRemainderStart = originalStart; expectedRemainderLen = originalLen; expectedRemainderCount = originalCount; } else { expectedRemainderStart = SkPoint::Make(originalStart.fX + prefixLen + dx, originalStart.fY); expectedRemainderLen = originalLen - prefixLen - dx; expectedRemainderCount = originalCount - prefixCount; } if (!span.isEmpty()) { SkPoint remainderStart; SkScalar remainderLen; int remainderCount; std::tie(remainderStart, remainderLen, remainderCount) = span; // Remainder span REPORTER_ASSERT_MESSAGE(reporter, expectedRemainderStart == remainderStart, dump(cut, prefix, span)); REPORTER_ASSERT_MESSAGE(reporter, expectedRemainderLen == remainderLen, dump(cut, prefix, span)); REPORTER_ASSERT_MESSAGE(reporter, expectedRemainderCount == remainderCount, dump(cut, prefix, span)); } } DEF_TEST(LBPSpanOps, reporter) { { SkScalar dx = 1.0f; SkPoint start = SkPoint::Make(-5, -5); Span span{start, 9.0f, 10}; check_span_result(reporter, span, dx, 0.0f, start, 4.0f, 5); check_span_result(reporter, span, dx, -6.0f, SkPoint::Make(0, 0), 0.0f, 0); check_span_result(reporter, span, dx, -5.0f, SkPoint::Make(0, 0), 0.0f, 0); check_span_result(reporter, span, dx, -4.0f, SkPoint::Make(-5, -5), 0.0f, 1); check_span_result(reporter, span, dx, 4.0f, SkPoint::Make(-5, -5), 8.0f, 9); check_span_result(reporter, span, dx, 5.0f, SkPoint::Make(-5, -5), 9.0f, 10); check_span_result(reporter, span, dx, 6.0f, SkPoint::Make(-5, -5), 9.0f, 10); } { SkScalar dx = -1.0f; SkPoint start = SkPoint::Make(5, 5); Span span{start, -9.0f, 10}; check_span_result(reporter, span, dx, 0.0f, start, -5.0f, 6); check_span_result(reporter, span, dx, -6.0f, SkPoint::Make(5, 5), -9.0f, 10); check_span_result(reporter, span, dx, -5.0f, SkPoint::Make(5, 5), -9.0f, 10); check_span_result(reporter, span, dx, -4.0f, SkPoint::Make(5, 5), -9.0f, 10); check_span_result(reporter, span, dx, 4.0f, SkPoint::Make(5, 5), -1.0f, 2); check_span_result(reporter, span, dx, 5.0f, SkPoint::Make(5, 5), 0.0f, 1); check_span_result(reporter, span, dx, 6.0f, SkPoint::Make(0, 0), 0.0f, 0); } } DEF_TEST(LBPBilerpSpanOps, reporter) { } template <typename XTiler, typename YTiler> static bool compare_tiler_case( XTiler& xTiler, YTiler& yTiler, Span span, skiatest::Reporter* reporter) { Span originalSpan = span; std::vector<SkPoint> listPoints; std::vector<SkPoint> spanPoints; struct Sink { void SK_VECTORCALL pointListFew(int n, Sk4s xs, Sk4s ys) { SkASSERT(0 < n && n < 4); if (n >= 1) storePoint({xs[0], ys[0]}); if (n >= 2) storePoint({xs[1], ys[1]}); if (n >= 3) storePoint({xs[2], ys[2]}); } void SK_VECTORCALL pointList4(Sk4s xs, Sk4s ys) { storePoint({xs[0], ys[0]}); storePoint({xs[1], ys[1]}); storePoint({xs[2], ys[2]}); storePoint({xs[3], ys[3]}); } void pointSpan(Span span) { span_fallback(span, this); } void storePoint(SkPoint pt) { fPoints->push_back({SkScalarFloorToScalar(X(pt)), SkScalarFloorToScalar(Y(pt))}); } std::vector<SkPoint>* fPoints; }; Sink listSink = {&listPoints}; Sink spanSink = {&spanPoints}; SkPoint start; SkScalar length; int count; std::tie(start, length, count) = span; SkScalar dx = length / (count - 1); Sk4f xs = Sk4f{X(start)} + Sk4f{0.0f, dx, 2 * dx, 3 * dx}; Sk4f ys = Sk4f{Y(start)}; while (count >= 4) { Sk4f txs = xs; Sk4f tys = ys; xTiler.tileXPoints(&txs); yTiler.tileYPoints(&tys); listSink.pointList4(txs, tys); xs = xs + 4.0f * dx; count -= 4; } if (count > 0) { xTiler.tileXPoints(&xs); yTiler.tileYPoints(&ys); listSink.pointListFew(count, xs, ys); } std::tie(start, length, count) = originalSpan; SkScalar x = X(start); SkScalar y = yTiler.tileY(Y(start)); Span yAdjustedSpan{{x, y}, length, count}; bool handledSpan = xTiler.maybeProcessSpan(yAdjustedSpan, &spanSink); if (handledSpan) { auto firstNotTheSame = std::mismatch( listPoints.begin(), listPoints.end(), spanPoints.begin()); if (firstNotTheSame.first != listSink.fPoints->end()) { auto element = std::distance(listPoints.begin(), firstNotTheSame.first); SkASSERT(element >= 0); std::tie(start, length, count) = originalSpan; ERRORF(reporter, "Span: {%f, %f}, %f, %d", start.fX, start.fY, length, count); ERRORF(reporter, "Size points: %d, size span: %d", listPoints.size(), spanPoints.size()); if ((unsigned)element >= spanPoints.size()) { ERRORF(reporter, "Size points: %d, size span: %d", listPoints.size(), spanPoints.size()); // Mismatch off the end ERRORF(reporter, "The mismatch is at position %d and has value %f, %f - it is off the end " "of the other.", element, X(*firstNotTheSame.first), Y(*firstNotTheSame.first)); } else { ERRORF(reporter, "Mismatch at %d - points: %f, %f - span: %f, %f", element, listPoints[element].fX, listPoints[element].fY, spanPoints[element].fX, spanPoints[element].fY); } SkFAIL("aha"); } } return true; } template <typename XTiler, typename YTiler> static bool compare_tiler_spans(int width, int height, skiatest::Reporter* reporter) { XTiler xTiler{width}; YTiler yTiler{height}; INFOF(reporter, "w: %d, h: %d \n", width, height); std::array<int, 8> interestingX {{-5, -1, 0, 1, width - 1, width, width + 1, width + 5}}; std::array<int, 8> interestingY {{-5, -1, 0, 1, height - 1, height, height + 1, height + 5}}; std::array<int, 6> interestingCount {{1, 2, 3, 4, 5, 10}}; std::array<SkScalar, 7> interestingScale {{0.0f, 1.0f, 0.5f, 2.1f, -2.1f, -1.0f, -0.5f}}; for (auto scale : interestingScale) { for (auto startX : interestingX) { for (auto count : interestingCount) { for (auto y : interestingY) { Span span{ SkPoint::Make((SkScalar)startX, (SkScalar)y), (count-1.0f) * scale, count}; if (!compare_tiler_case(xTiler, yTiler, span, reporter)) { return false; } } } } } return true; } template <typename XTiler, typename YTiler> static void test_tiler(skiatest::Reporter* reporter) { std::array<int, 6> interestingSize {{1, 2, 3, 4, 5, 10}}; for (auto width : interestingSize) { for (auto height : interestingSize) { if (!compare_tiler_spans<XTiler, YTiler>(width, height, reporter)) { return; } } } } /* DEF_TEST(LBPStrategyClampTile, reporter) { #if 0 ClampStrategy tiler{SkSize::Make(1, 1)}; Span span{SkPoint::Make(0, -5), 1.0f, 2}; compare_tiler_case<ClampStrategy>(tiler, span, reporter); #else test_tiler<XClampStrategy, YClampStrategy>(reporter); #endif } DEF_TEST(LBPStrategyRepeatTile, reporter) { #if 0 RepeatStrategy tiler{SkSize::Make(3, 1)}; Span span{SkPoint::Make(-5, -5), 20 * 2.1f, 100}; compare_tiler_case<RepeatStrategy>(tiler, span, reporter); #else test_tiler<XRepeatStrategy, YRepeatStrategy>(reporter); #endif } */
import React, { FunctionComponent, SyntheticEvent, useContext, useEffect, useRef, useState, } from 'react' import PaymentMethodContext from '#context/PaymentMethodContext' import { CardElement, Elements, useElements, useStripe, } from '@stripe/react-stripe-js' import { StripeCardElementOptions, StripeElementLocale, } from '@stripe/stripe-js' import { PaymentMethodConfig } from '#reducers/PaymentMethodReducer' import { PaymentSourceProps } from './PaymentSource' import Parent from './utils/Parent' import OrderContext from '#context/OrderContext' import { setCustomerOrderParam } from '#utils/localStorage' export type StripeConfig = { containerClassName?: string hintLabel?: string name?: string options?: StripeCardElementOptions [key: string]: any } type StripePaymentFormProps = { options?: StripeCardElementOptions templateCustomerSaveToWallet?: PaymentSourceProps['templateCustomerSaveToWallet'] } const defaultOptions = { style: { base: { fontSize: '16px', color: '#424770', '::placeholder': { color: '#aab7c4', }, }, invalid: { color: '#9e2146', }, }, hidePostalCode: true, } const StripePaymentForm: FunctionComponent<StripePaymentFormProps> = ({ options = defaultOptions, templateCustomerSaveToWallet, }) => { const ref = useRef<null | HTMLFormElement>(null) const { setPaymentSource, paymentSource, currentPaymentMethodType, setPaymentMethodErrors, setPaymentRef, } = useContext(PaymentMethodContext) const { order } = useContext(OrderContext) const stripe = useStripe() const elements = useElements() useEffect(() => { if (ref.current && stripe && elements) { ref.current.onsubmit = () => onSubmit(ref.current as any, stripe, elements) setPaymentRef({ ref }) } return () => { setPaymentRef({ ref: { current: null } }) } }, [ref, stripe, elements]) const onSubmit = async ( event: SyntheticEvent<HTMLFormElement>, stripe: any, elements: any ): Promise<boolean> => { if (!stripe) return false const savePaymentSourceToCustomerWallet = // @ts-ignore event?.elements?.['save_payment_source_to_customer_wallet']?.checked if (savePaymentSourceToCustomerWallet) setCustomerOrderParam( 'savePaymentSourceToCustomerWallet', savePaymentSourceToCustomerWallet ) const cardElement = elements && elements.getElement(CardElement) if (cardElement) { const billingInfo = order?.billingAddress() const email = order?.customerEmail const billing_details = { name: billingInfo?.fullName, email, phone: billingInfo?.phone, address: { city: billingInfo?.city, country: billingInfo?.countryCode, line1: billingInfo?.line1, postal_code: billingInfo?.zipCode, state: billingInfo?.stateCode, }, } const { paymentMethod } = await stripe.createPaymentMethod({ type: 'card', card: cardElement, billing_details, }) // @ts-ignore if (paymentSource?.clientSecret) { const { error, paymentIntent } = await stripe.confirmCardPayment( // @ts-ignore paymentSource.clientSecret, { payment_method: { card: cardElement, billing_details, }, } ) if (error) { console.error(error) setPaymentMethodErrors([ { code: 'PAYMENT_INTENT_AUTHENTICATION_FAILURE', resource: 'paymentMethod', field: currentPaymentMethodType, message: error.message as string, }, ]) } else { if ( paymentIntent && paymentMethod && paymentSource && currentPaymentMethodType ) { try { await setPaymentSource({ paymentSourceId: paymentSource.id, paymentResource: currentPaymentMethodType, attributes: { options: { ...(paymentMethod as Record<string, any>), setup_future_usage: 'off_session', }, }, }) return true } catch (e) { return false } } } } } return false } return ( <form ref={ref} onSubmit={(e) => onSubmit(e, stripe, elements)}> <CardElement options={{ ...defaultOptions, ...options }} /> {templateCustomerSaveToWallet && ( <Parent {...{ name: 'save_payment_source_to_customer_wallet' }}> {templateCustomerSaveToWallet} </Parent> )} </form> ) } type StripePaymentProps = PaymentMethodConfig['stripePayment'] & JSX.IntrinsicElements['div'] & Partial<PaymentSourceProps['templateCustomerSaveToWallet']> & { show?: boolean publishableKey: string locale?: StripeElementLocale } const StripePayment: FunctionComponent<StripePaymentProps> = ({ publishableKey, show, options, locale = 'auto', ...p }) => { const [isLoaded, setIsLoaded] = useState(false) const [stripe, setStripe] = useState(null) const { containerClassName, templateCustomerSaveToWallet, fonts = [], ...divProps } = p useEffect(() => { if (show && publishableKey) { const { loadStripe } = require('@stripe/stripe-js') const getStripe = async () => { const res = await loadStripe(publishableKey, { locale, }) setStripe(res) setIsLoaded(true) } getStripe() } return () => { setIsLoaded(false) } }, [show, publishableKey]) return isLoaded && stripe ? ( <div className={containerClassName} {...divProps}> <Elements stripe={stripe} options={{ fonts }}> <StripePaymentForm options={options} templateCustomerSaveToWallet={templateCustomerSaveToWallet} /> </Elements> </div> ) : null } export default StripePayment
package com.solvd.carina.gui.ios.component; import com.qaprosoft.carina.core.foundation.webdriver.decorator.ExtendedWebElement; import com.solvd.carina.gui.common.component.base.BaseCategoryProduct; import com.solvd.carina.util.ContextSwitcher; import com.solvd.carina.util.Parser; import io.appium.java_client.functions.ExpectedCondition; import org.checkerframework.checker.nullness.compatqual.NullableDecl; import org.openqa.selenium.SearchContext; import org.openqa.selenium.WebDriver; import org.openqa.selenium.support.FindBy; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.List; import java.util.stream.Collectors; ; public class IOSCategoryProduct extends BaseCategoryProduct { private static final Logger LOGGER = LoggerFactory.getLogger(IOSCategoryProduct.class); @FindBy(xpath = "//a[@class='btn-blue add-to-basket']") private List<ExtendedWebElement> buttons; @FindBy(xpath = "//div[@class='product-card ']/descendant::div[@class='title']") private List<ExtendedWebElement> products; @FindBy(xpath = "//div[@class='price']") private List<ExtendedWebElement> productsPrices; @FindBy(xpath = "//div[@class='product-card ']/descendant::img") private List<ExtendedWebElement> productsImgRefs; private ContextSwitcher switcher = new ContextSwitcher(); public IOSCategoryProduct(WebDriver driver, SearchContext searchContext) { super(driver, searchContext); switcher.switchMobileContext(ContextSwitcher.View.WEB); } @Override public void addProductToBasket(int i) { buttons.get(i).click(); } @Override public List<String> getTitles() { List<String> titlesStr = products.stream().map(el -> el.getText()).collect(Collectors.toList()); titlesStr.stream().forEach(el -> LOGGER.info("Product: " + el)); return titlesStr; } @Override public List<Double> getPrices() { return productsPrices.stream().map(el -> Parser.parsePriceToDouble((el.getText()))).collect(Collectors.toList()); } @Override public void toTheProduct(int i) { productsImgRefs.get(i).click(); } }
/** * <code>GenerationalSCNGenerator</code> is an implementation of the {@link SCNGenerator} that handles mastership change * as monotonically increasing generation changes to create relay SCNs from local SCNs and host identifiers. * This SCN generator works on the following assumptions/approach: * <pre> * <li>The local SCN has the format : high 32 bits derived from file location reference of local SCN, low 32 bits is the offset * inside the file * </li> * <li> * The generated relay SCN has the format : high 16 bits derived from generation, next 16 bits derived from location reference of * local SCN, low 32 bits is the offset inside the file * </li> * <pre> * @author Regunath B * @version 1.0, 25 Mar 2015 */ public class GenerationalSCNGenerator implements SCNGenerator,InitializingBean { /** Logger for this class*/ private static final Logger LOGGER = LogFactory.getLogger(GenerationalSCNGenerator.class); /** Invariants for no current generation and host*/ private static final int NO_GENERATION = -1; private static final String NO_HOST = ""; /** The current generation*/ private int currentGeneration = NO_GENERATION; /** The current host identifier*/ private String currentHostId = NO_HOST; /** The checkpoint persistence provider*/ private CheckpointPersistenceProvider checkpointPersistenceProvider; /** The logical source name to identify the event stream*/ private String relayLogicalSourceName; /** * Interface method implementation. Checks for mandatory dependencies * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet() */ public void afterPropertiesSet() throws Exception { Assert.notNull(this.relayLogicalSourceName,"'relayLogicalSourceName' cannot be null. This SCN generator will not be initialized"); Assert.notNull(this.checkpointPersistenceProvider,"'checkpointPersistenceProvider' cannot be null. This SCN generator will not be initialized"); Checkpoint cp = this.checkpointPersistenceProvider.loadCheckpoint(Arrays.asList(this.relayLogicalSourceName)); if (cp != null) { this.currentGeneration = cp.getBootstrapSinceScn().intValue(); this.currentHostId = cp.getBootstrapServerInfo(); } } /** * * @see com.flipkart.aesop.runtime.producer.SCNGenerator#getSCN(long, java.lang.String) */ public long getSCN(long localSCN, String hostId) { if (!hostId.equalsIgnoreCase(this.currentHostId) || this.currentGeneration == NO_GENERATION) { this.currentHostId = hostId; this.currentGeneration += 1; // we'll use a databus client checkpoint with appropriate(overloaded meaning) fields to store the generation and host name Checkpoint cp = new Checkpoint(); cp.setConsumptionMode(DbusClientMode.BOOTSTRAP_SNAPSHOT); cp.setBootstrapSinceScn(Long.valueOf(this.currentGeneration)); cp.setBootstrapServerInfo(this.currentHostId); cp.setBootstrapStartScn(localSCN); cp.setTsNsecs(System.nanoTime()); try { this.checkpointPersistenceProvider.storeCheckpoint(Arrays.asList(this.relayLogicalSourceName),cp); } catch (IOException e) { LOGGER.error("Get SCN failed. Error storing checkpoint for : " + this.relayLogicalSourceName, e); // throw a Runtime exception so that the relay producer can handle it and stop generating more events throw new DatabusRuntimeException("Get SCN failed. Error storing checkpoint for : " + this.relayLogicalSourceName,e); } } long fileId = localSCN >> 32; long mask = (long)Integer.MAX_VALUE; long offset = localSCN & mask; long scn = this.currentGeneration; scn <<= 8; scn |= fileId; scn <<= 24; scn |= offset; return scn; } /** Setter/Getter methods */ public String getRelayLogicalSourceName() { return relayLogicalSourceName; } public void setRelayLogicalSourceName(String relayLogicalSourceName) { this.relayLogicalSourceName = relayLogicalSourceName; } public CheckpointPersistenceProvider getCheckpointPersistenceProvider() { return checkpointPersistenceProvider; } public void setCheckpointPersistenceProvider( CheckpointPersistenceProvider checkpointPersistenceProvider) { this.checkpointPersistenceProvider = checkpointPersistenceProvider; } }
package com.fincatto.nfe310.validadores.xsd; import com.fincatto.nfe310.FabricaDeObjetosFake; import com.fincatto.nfe310.NFeConfigFake; import com.fincatto.nfe310.assinatura.AssinaturaDigital; import org.junit.Assert; import org.junit.Test; public class XMLValidadorTest { @Test public void deveValidarLote() throws Exception { final String loteXml = FabricaDeObjetosFake.getNFLoteEnvio().toString(); final String loteXmlAssinado = new AssinaturaDigital(new NFeConfigFake()).assinarDocumento(loteXml); Assert.assertTrue(XMLValidador.validaLote(loteXmlAssinado)); } @Test public void deveValidarNota() throws Exception { final String notaXml = FabricaDeObjetosFake.getNFNota().toString(); final String notaXmlAssinada = new AssinaturaDigital(new NFeConfigFake()).assinarDocumento(notaXml); Assert.assertTrue(XMLValidador.validaNota(notaXmlAssinada)); } }
Metabolic flux interval analysis of CHO cells Based on a detailed metabolic network of CHO-320 cells built using available information gathered from published reports, the flux distribution can be evaluated using tools of positive linear algebra (in particular, the algorithm METATOOL devised in T. Pfeiffer and Schuster (1999); S. Schuster (1999)), and to study the influence of the interconnection level of the network as well as the availability of specific measurement information on this flux distribution. As this latter information is usually not sufficient to completely define the metabolic fluxes (i.e., the linear system of equations is underdetermined and an infinity of solution exists), it is of interest to compute the range of possible (non-negative) solutions. Interestingly, depending on the available measurements, the intervals obtained for the intracellular fluxes can be quite narrow, especially for the fluxes surrounding the central metabolism. In this study, the construction of the metabolic network and the selection of its structure (depending on the cell life cycle) are discussed with a view to the determination of the flux distribution. In addition, the sensitivity of the solution space to the availability of specific measurements is assessed.
<gh_stars>1000+ package stripe import ( "encoding/json" ) // SetupIntentCancellationReason is the list of allowed values for the cancelation reason. type SetupIntentCancellationReason string // List of values that SetupIntentCancellationReason can take. const ( SetupIntentCancellationReasonAbandoned SetupIntentCancellationReason = "abandoned" SetupIntentCancellationReasonFailedInvoice SetupIntentCancellationReason = "failed_invoice" SetupIntentCancellationReasonFraudulent SetupIntentCancellationReason = "fraudulent" SetupIntentCancellationReasonRequestedByCustomer SetupIntentCancellationReason = "requested_by_customer" ) // SetupIntentNextActionType is the list of allowed values for the next action's type. type SetupIntentNextActionType string // List of values that SetupIntentNextActionType can take. const ( SetupIntentNextActionTypeRedirectToURL SetupIntentNextActionType = "redirect_to_url" ) // List of Stripe products where this mandate can be selected automatically. type SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor string // List of values that SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor can take const ( SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsDefaultForInvoice SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor = "invoice" SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsDefaultForSubscription SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor = "subscription" ) // SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule is the list of allowed values // for payment_schedule on mandate_options. type SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule string // List of values that SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule can take. const ( SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentScheduleCombined SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule = "combined" SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentScheduleInterval SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule = "interval" SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentScheduleSporadic SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule = "sporadic" ) // SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType is the list of allowed values for // transaction_type on mandate_options. type SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType string // List of values that SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType can take. const ( SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionTypeBusiness SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType = "business" SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionTypePersonal SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType = "personal" ) // SetupIntentPaymentMethodOptionsACSSDebitVerificationMethod is the list of allowed values for // verification_method on acss_debit. type SetupIntentPaymentMethodOptionsACSSDebitVerificationMethod string // List of values that SetupIntentPaymentMethodOptionsACSSDebitVerificationMethod can take. const ( SetupIntentPaymentMethodOptionsACSSDebitVerificationMethodAutomatic SetupIntentPaymentMethodOptionsACSSDebitVerificationMethod = "automatic" SetupIntentPaymentMethodOptionsACSSDebitVerificationMethodInstant SetupIntentPaymentMethodOptionsACSSDebitVerificationMethod = "instant" SetupIntentPaymentMethodOptionsACSSDebitVerificationMethodMicrodeposits SetupIntentPaymentMethodOptionsACSSDebitVerificationMethod = "microdeposits" ) // SetupIntentPaymentMethodOptionsCardRequestThreeDSecure is the list of allowed values controlling // when to request 3D Secure on a SetupIntent. type SetupIntentPaymentMethodOptionsCardRequestThreeDSecure string // List of values that SetupIntentNextActionType can take. const ( SetupIntentPaymentMethodOptionsCardRequestThreeDSecureAny SetupIntentPaymentMethodOptionsCardRequestThreeDSecure = "any" SetupIntentPaymentMethodOptionsCardRequestThreeDSecureAutomatic SetupIntentPaymentMethodOptionsCardRequestThreeDSecure = "automatic" ) // SetupIntentStatus is the list of allowed values for the setup intent's status. type SetupIntentStatus string // List of values that SetupIntentStatus can take. const ( SetupIntentStatusCanceled SetupIntentStatus = "canceled" SetupIntentStatusProcessing SetupIntentStatus = "processing" SetupIntentStatusRequiresAction SetupIntentStatus = "requires_action" SetupIntentStatusRequiresConfirmation SetupIntentStatus = "requires_confirmation" SetupIntentStatusRequiresPaymentMethod SetupIntentStatus = "requires_payment_method" SetupIntentStatusSucceeded SetupIntentStatus = "succeeded" ) // SetupIntentUsage is the list of allowed values for the setup intent's usage. type SetupIntentUsage string // List of values that SetupIntentUsage can take. const ( SetupIntentUsageOffSession SetupIntentUsage = "off_session" SetupIntentUsageOnSession SetupIntentUsage = "on_session" ) // SetupIntentCancelParams is the set of parameters that can be used when canceling a setup intent. type SetupIntentCancelParams struct { Params `form:"*"` CancellationReason *string `form:"cancellation_reason"` } // SetupIntentConfirmParams is the set of parameters that can be used when confirming a setup intent. type SetupIntentConfirmParams struct { Params `form:"*"` MandateData *SetupIntentMandateDataParams `form:"mandate_data"` PaymentMethod *string `form:"payment_method"` PaymentMethodOptions *SetupIntentPaymentMethodOptionsParams `form:"payment_method_options"` ReturnURL *string `form:"return_url"` } // SetupIntentMandateDataCustomerAcceptanceOfflineParams is the set of parameters for the customer // acceptance of an offline mandate. type SetupIntentMandateDataCustomerAcceptanceOfflineParams struct { } // SetupIntentMandateDataCustomerAcceptanceOnlineParams is the set of parameters for the customer // acceptance of an online mandate. type SetupIntentMandateDataCustomerAcceptanceOnlineParams struct { IPAddress *string `form:"ip_address"` UserAgent *string `form:"user_agent"` } // SetupIntentMandateDataCustomerAcceptanceParams is the set of parameters for the customer // acceptance of a mandate. type SetupIntentMandateDataCustomerAcceptanceParams struct { AcceptedAt int64 `form:"accepted_at"` Offline *SetupIntentMandateDataCustomerAcceptanceOfflineParams `form:"offline"` Online *SetupIntentMandateDataCustomerAcceptanceOnlineParams `form:"online"` Type MandateCustomerAcceptanceType `form:"type"` } // SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsParams is the set of parameters for // mandate_options on acss_debit. type SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsParams struct { CustomMandateURL *string `form:"custom_mandate_url"` DefaultFor []*string `form:"default_for"` IntervalDescription *string `form:"interval_description"` PaymentSchedule *string `form:"payment_schedule"` TransactionType *string `form:"transaction_type"` } // SetupIntentPaymentMethodOptionsACSSDebitParams is the set of parameters for acss debit on // payment_method_options. type SetupIntentPaymentMethodOptionsACSSDebitParams struct { Currency *string `form:"currency"` MandateOptions *SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsParams `form:"mandate_options"` VerificationMethod *string `form:"verification_method"` } // SetupIntentMandateDataParams is the set of parameters controlling the creation of the mandate // associated with this SetupIntent. type SetupIntentMandateDataParams struct { CustomerAcceptance *SetupIntentMandateDataCustomerAcceptanceParams `form:"customer_acceptance"` } // SetupIntentPaymentMethodOptionsCardParams represents the card-specific options applied to a // SetupIntent. type SetupIntentPaymentMethodOptionsCardParams struct { MOTO *bool `form:"moto"` RequestThreeDSecure *string `form:"request_three_d_secure"` } // SetupIntentPaymentMethodOptionsParams represents the type-specific payment method options // applied to a SetupIntent. type SetupIntentPaymentMethodOptionsParams struct { ACSSDebit *SetupIntentPaymentMethodOptionsACSSDebitParams `form:"acss_debit"` Card *SetupIntentPaymentMethodOptionsCardParams `form:"card"` } // SetupIntentSingleUseParams represents the single-use mandate-specific parameters. type SetupIntentSingleUseParams struct { Amount *int64 `form:"amount"` Currency *string `form:"currency"` } // SetupIntentParams is the set of parameters that can be used when handling a setup intent. type SetupIntentParams struct { Params `form:"*"` Confirm *bool `form:"confirm"` Customer *string `form:"customer"` Description *string `form:"description"` MandateData *SetupIntentMandateDataParams `form:"mandate_data"` OnBehalfOf *string `form:"on_behalf_of"` PaymentMethod *string `form:"payment_method"` PaymentMethodOptions *SetupIntentPaymentMethodOptionsParams `form:"payment_method_options"` PaymentMethodTypes []*string `form:"payment_method_types"` ReturnURL *string `form:"return_url"` SingleUse *SetupIntentSingleUseParams `form:"single_use"` Usage *string `form:"usage"` } // SetupIntentListParams is the set of parameters that can be used when listing setup intents. // For more details see https://stripe.com/docs/api#list_payouts. type SetupIntentListParams struct { ListParams `form:"*"` Created *int64 `form:"created"` CreatedRange *RangeQueryParams `form:"created"` Customer *string `form:"customer"` PaymentMethod *string `form:"payment_method"` } // SetupIntentNextActionRedirectToURL represents the resource for the next action of type // "redirect_to_url". type SetupIntentNextActionRedirectToURL struct { ReturnURL string `json:"return_url"` URL string `json:"url"` } // SetupIntentNextActionUseStripeSDK represents the resource for the next action of type // "use_stripe_sdk". type SetupIntentNextActionUseStripeSDK struct{} // SetupIntentNextActionVerifyWithMicrodeposits represents the resource for the next action // of type "verify_with_microdeposits". type SetupIntentNextActionVerifyWithMicrodeposits struct { ArrivalDate int64 `json:"arrival_date"` HostedVerificationURL string `json:"hosted_verification_url"` } // SetupIntentNextAction represents the type of action to take on a setup intent. type SetupIntentNextAction struct { RedirectToURL *SetupIntentNextActionRedirectToURL `json:"redirect_to_url"` Type SetupIntentNextActionType `json:"type"` UseStripeSDK *SetupIntentNextActionUseStripeSDK `json:"use_stripe_sdk"` VerifyWithMicrodeposits *SetupIntentNextActionVerifyWithMicrodeposits `json:"verify_with_microdeposits"` } // SetupIntentPaymentMethodOptionsACSSDebitMandateOptions describe the mandate options for // acss debit associated with a setup intent. type SetupIntentPaymentMethodOptionsACSSDebitMandateOptions struct { CustomMandateURL string `json:"custom_mandate_url"` DefaultFor []SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor `json:"default_for"` IntervalDescription string `json:"interval_description"` PaymentSchedule SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule `json:"payment_schedule"` TransactionType SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType `json:"transaction_type"` } // SetupIntentPaymentMethodOptionsACSSDebit represents the ACSS debit-specific options applied // to a SetupIntent. type SetupIntentPaymentMethodOptionsACSSDebit struct { Currency string `json:"currency"` MandateOptions *SetupIntentPaymentMethodOptionsACSSDebitMandateOptions `json:"mandate_options"` VerificationMethod SetupIntentPaymentMethodOptionsACSSDebitVerificationMethod `json:"verification_method"` } // SetupIntentPaymentMethodOptionsCard represents the card-specific options applied to a // SetupIntent. type SetupIntentPaymentMethodOptionsCard struct { RequestThreeDSecure SetupIntentPaymentMethodOptionsCardRequestThreeDSecure `json:"request_three_d_secure"` } // SetupIntentPaymentMethodOptions represents the type-specific payment method options applied to a // SetupIntent. type SetupIntentPaymentMethodOptions struct { ACSSDebit *SetupIntentPaymentMethodOptionsACSSDebit `json:"acss_debit"` Card *SetupIntentPaymentMethodOptionsCard `json:"card"` } // SetupIntent is the resource representing a Stripe payout. // For more details see https://stripe.com/docs/api#payment_intents. type SetupIntent struct { APIResource Application *Application `json:"application"` CancellationReason SetupIntentCancellationReason `json:"cancellation_reason"` ClientSecret string `json:"client_secret"` Created int64 `json:"created"` Customer *Customer `json:"customer"` Description string `json:"description"` ID string `json:"id"` LastSetupError *Error `json:"last_setup_error"` LatestAttempt *SetupAttempt `json:"latest_attempt"` Livemode bool `json:"livemode"` Mandate *Mandate `json:"mandate"` Metadata map[string]string `json:"metadata"` NextAction *SetupIntentNextAction `json:"next_action"` Object string `json:"object"` OnBehalfOf *Account `json:"on_behalf_of"` PaymentMethod *PaymentMethod `json:"payment_method"` PaymentMethodOptions *SetupIntentPaymentMethodOptions `json:"payment_method_options"` PaymentMethodTypes []string `json:"payment_method_types"` SingleUseMandate *Mandate `json:"single_use_mandate"` Status SetupIntentStatus `json:"status"` Usage SetupIntentUsage `json:"usage"` } // SetupIntentList is a list of setup intents as retrieved from a list endpoint. type SetupIntentList struct { APIResource ListMeta Data []*SetupIntent `json:"data"` } // UnmarshalJSON handles deserialization of a SetupIntent. // This custom unmarshaling is needed because the resulting // property may be an id or the full struct if it was expanded. func (p *SetupIntent) UnmarshalJSON(data []byte) error { if id, ok := ParseID(data); ok { p.ID = id return nil } type setupIntent SetupIntent var v setupIntent if err := json.Unmarshal(data, &v); err != nil { return err } *p = SetupIntent(v) return nil }
Place-Based Policies and Agglomeration Economies: Firm-Level Evidence from Special Economic Zones in India This paper exploits time and geographic variation in the adoption of Special Economic Zones in India to assess the direct and spillover effects of the program. We combine geocoded firm-level data and geocoded SEZs using a concentric ring approach, thus creating a novel dataset of firms with their assigned SEZ status. To overcome the selection bias we employ inverse probability weighting with time-varying covariates in a difference-in-differences frame-work. Our analysis yields that conditional on controlling for initial selection, SEZs induced no further productivity gains for within SEZ firms, on average. This is predominantly driven by relatively less productive firms, whereas more productive firms experienced significant productivity gains. However, SEZs created negative externalities for firms in the vicinity which attenuate with distance. Neighbouring domestic firms, large firms, manufacturing firms and non-importer firms are the main losers of the program. Evidence points at the diversion of inputs from non-SEZ to SEZ-firms as a potential mechanism. 15 kilometers. Time-varying covariates for creating the propensity scores log of assets, of sales, the history of the outcome variable. Time-invariant covariates a foreign ownership dummy, dummies and service and state code logistic