├── .gitignore ├── LICENSE ├── README.md ├── base ├── cli │ └── cliParser.js ├── compiler │ └── target.js └── util │ ├── copyDirSync.js │ ├── copyRecursive.js │ ├── flash.js │ ├── getExt.js │ └── getTips.js ├── compiler ├── native │ ├── compiler.js │ ├── env │ │ ├── arduino.js │ │ ├── js.js │ │ ├── std.js │ │ └── wasm.js │ ├── nerdcore │ │ ├── src │ │ │ ├── class │ │ │ │ ├── _meta.h │ │ │ │ ├── array.h │ │ │ │ ├── array_header.h │ │ │ │ ├── base_header.h │ │ │ │ ├── fixed_array.h │ │ │ │ ├── fixed_array_header.h │ │ │ │ ├── function.h │ │ │ │ ├── function_header.h │ │ │ │ ├── native.h │ │ │ │ ├── native_header.h │ │ │ │ ├── native_tpl_header.h │ │ │ │ ├── number.h │ │ │ │ ├── number_header.h │ │ │ │ ├── object.h │ │ │ │ ├── object_header.h │ │ │ │ ├── string.h │ │ │ │ ├── string_header.h │ │ │ │ ├── struct.h │ │ │ │ └── struct_header.h │ │ │ ├── classes.h │ │ │ ├── classes_header.h │ │ │ ├── enum.h │ │ │ ├── functions.h │ │ │ ├── functions_header.h │ │ │ ├── macro.h │ │ │ ├── native.h │ │ │ ├── native │ │ │ │ ├── double.h │ │ │ │ ├── double_header.h │ │ │ │ ├── int.h │ │ │ │ └── int_header.h │ │ │ ├── native_header.h │ │ │ ├── nerd.cpp │ │ │ ├── nerd.hpp │ │ │ ├── objmgmt.h │ │ │ ├── objmgmt_header.h │ │ │ ├── operator.h │ │ │ ├── operator_header.h │ │ │ ├── stdfn.h │ │ │ ├── stdfn_header.h │ │ │ ├── tsl │ │ │ │ ├── robin_growth_policy.h │ │ │ │ ├── robin_hash.h │ │ │ │ ├── robin_map.h │ │ │ │ └── robin_set.h │ │ │ ├── type_header.h │ │ │ ├── values.h │ │ │ ├── values_header.h │ │ │ ├── var.h │ │ │ └── var_header.h │ │ └── test │ │ │ ├── array.cpp │ │ │ ├── cast.cpp │ │ │ ├── native.cpp │ │ │ ├── object.cpp │ │ │ └── operators.cpp │ └── squel │ │ ├── arduino.cpp │ │ ├── js.cpp │ │ ├── std.cpp │ │ └── wasm.cpp └── self │ ├── base │ ├── cli │ │ └── cliParser.ng │ ├── compiler │ │ └── target.js │ └── util │ │ ├── copyDirSync.js │ │ ├── copyRecursive.js │ │ ├── flash.js │ │ ├── getExt.js │ │ ├── getTips.js │ │ ├── httpUtils.js │ │ └── rmdir.js │ └── nerd.ng ├── example ├── arduino-lcd.ng ├── arduino.ng ├── args.ng ├── circular_array.ng ├── circular_fixed_array.ng ├── circular_object.ng ├── const.ng ├── date.ng ├── exec.ng ├── exit.ng ├── fibo.ng ├── fiboit.ng ├── functional.ng ├── hello.ng ├── http.ng ├── http_post.ng ├── json.ng ├── loop.ng ├── match.ng ├── native.ng ├── nested_object.ng ├── new.ng ├── object_keys.ng ├── os.ng ├── path.ng ├── readfile.ng ├── thread.ng ├── throw.ng ├── wasm.html └── wasm_binding.ng ├── external ├── arduino │ ├── avr │ │ ├── LICENSE.txt │ │ ├── boards.txt │ │ ├── bootloaders │ │ │ ├── atmega │ │ │ │ ├── ATmegaBOOT_168.c │ │ │ │ ├── ATmegaBOOT_168_atmega1280.hex │ │ │ │ ├── ATmegaBOOT_168_atmega328.hex │ │ │ │ ├── ATmegaBOOT_168_atmega328_pro_8MHz.hex │ │ │ │ ├── ATmegaBOOT_168_diecimila.hex │ │ │ │ ├── ATmegaBOOT_168_ng.hex │ │ │ │ ├── ATmegaBOOT_168_pro_8MHz.hex │ │ │ │ └── Makefile │ │ │ ├── atmega8 │ │ │ │ ├── ATmegaBOOT-prod-firmware-2009-11-07.hex │ │ │ │ ├── ATmegaBOOT.c │ │ │ │ ├── ATmegaBOOT.hex │ │ │ │ ├── ATmegaBOOT.txt │ │ │ │ └── Makefile │ │ │ ├── bt │ │ │ │ ├── ATmegaBOOT_168.c │ │ │ │ ├── ATmegaBOOT_168.hex │ │ │ │ ├── ATmegaBOOT_168_atmega328_bt.hex │ │ │ │ └── Makefile │ │ │ ├── caterina-Arduino_Robot │ │ │ │ ├── Caterina-Robot-Control.hex │ │ │ │ ├── Caterina-Robot-Motor.hex │ │ │ │ ├── Caterina-Robot.txt │ │ │ │ ├── Caterina.c │ │ │ │ ├── Caterina.h │ │ │ │ ├── Descriptors.c │ │ │ │ ├── Descriptors.h │ │ │ │ ├── Makefile │ │ │ │ └── README.md │ │ │ ├── caterina-LilyPadUSB │ │ │ │ ├── Caterina-LilyPadUSB.hex │ │ │ │ ├── Caterina.c │ │ │ │ ├── Caterina.h │ │ │ │ ├── Descriptors.c │ │ │ │ ├── Descriptors.h │ │ │ │ ├── Makefile │ │ │ │ └── Readme.txt │ │ │ ├── caterina │ │ │ │ ├── Caterina-Circuitplay32u4.hex │ │ │ │ ├── Caterina-Esplora.hex │ │ │ │ ├── Caterina-Esplora.txt │ │ │ │ ├── Caterina-Industrial101.hex │ │ │ │ ├── Caterina-Leonardo.hex │ │ │ │ ├── Caterina-Leonardo.txt │ │ │ │ ├── Caterina-LeonardoEthernet.hex │ │ │ │ ├── Caterina-LininoOne.hex │ │ │ │ ├── Caterina-Micro.hex │ │ │ │ ├── Caterina-Micro.txt │ │ │ │ ├── Caterina-Yun-noblink.hex │ │ │ │ ├── Caterina-Yun.hex │ │ │ │ ├── Caterina-YunMini.hex │ │ │ │ ├── Caterina.c │ │ │ │ ├── Caterina.h │ │ │ │ ├── Descriptors.c │ │ │ │ ├── Descriptors.h │ │ │ │ ├── Esplora-prod-firmware-2012-12-10.hex │ │ │ │ ├── Esplora-prod-firmware-2012-12-10.txt │ │ │ │ ├── Leonardo-prod-firmware-2012-04-26.hex │ │ │ │ ├── Leonardo-prod-firmware-2012-04-26.txt │ │ │ │ ├── Leonardo-prod-firmware-2012-12-10.hex │ │ │ │ ├── Leonardo-prod-firmware-2012-12-10.txt │ │ │ │ ├── Makefile │ │ │ │ ├── Micro-prod-firmware-2012-11-23.hex │ │ │ │ ├── Micro-prod-firmware-2012-11-23.txt │ │ │ │ ├── Micro-prod-firmware-2012-12-10.hex │ │ │ │ └── Micro-prod-firmware-2012-12-10.txt │ │ │ ├── gemma │ │ │ │ ├── README.md │ │ │ │ ├── avrdude.conf │ │ │ │ ├── gemma_v1.hex │ │ │ │ ├── usbconfig.h │ │ │ │ └── usbconfig.patch │ │ │ ├── lilypad │ │ │ │ ├── LilyPadBOOT_168.hex │ │ │ │ └── src │ │ │ │ │ ├── ATmegaBOOT.c │ │ │ │ │ └── Makefile │ │ │ ├── optiboot │ │ │ │ ├── Makefile │ │ │ │ ├── README.TXT │ │ │ │ ├── boot.h │ │ │ │ ├── makeall │ │ │ │ ├── omake │ │ │ │ ├── omake.bat │ │ │ │ ├── optiboot.c │ │ │ │ ├── optiboot_atmega168.hex │ │ │ │ ├── optiboot_atmega168.lst │ │ │ │ ├── optiboot_atmega328-Mini.hex │ │ │ │ ├── optiboot_atmega328.hex │ │ │ │ ├── optiboot_atmega328.lst │ │ │ │ ├── optiboot_atmega8.hex │ │ │ │ ├── optiboot_atmega8.lst │ │ │ │ ├── pin_defs.h │ │ │ │ └── stk500.h │ │ │ └── stk500v2 │ │ │ │ ├── License.txt │ │ │ │ ├── Makefile │ │ │ │ ├── Mega2560-prod-firmware-2011-06-29.hex │ │ │ │ ├── STK500V2.pnproj │ │ │ │ ├── STK500V2.pnps │ │ │ │ ├── avr_cpunames.h │ │ │ │ ├── avrinterruptnames.h │ │ │ │ ├── command.h │ │ │ │ ├── stk500boot.c │ │ │ │ ├── stk500boot.ppg │ │ │ │ └── stk500boot_v2_mega2560.hex │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Arduino.h │ │ │ │ ├── CDC.cpp │ │ │ │ ├── Client.h │ │ │ │ ├── HardwareSerial.cpp │ │ │ │ ├── HardwareSerial.h │ │ │ │ ├── HardwareSerial0.cpp │ │ │ │ ├── HardwareSerial1.cpp │ │ │ │ ├── HardwareSerial2.cpp │ │ │ │ ├── HardwareSerial3.cpp │ │ │ │ ├── HardwareSerial_private.h │ │ │ │ ├── IPAddress.cpp │ │ │ │ ├── IPAddress.h │ │ │ │ ├── PluggableUSB.cpp │ │ │ │ ├── PluggableUSB.h │ │ │ │ ├── Print.cpp │ │ │ │ ├── Print.h │ │ │ │ ├── Printable.h │ │ │ │ ├── Server.h │ │ │ │ ├── Stream.cpp │ │ │ │ ├── Stream.h │ │ │ │ ├── Tone.cpp │ │ │ │ ├── USBAPI.h │ │ │ │ ├── USBCore.cpp │ │ │ │ ├── USBCore.h │ │ │ │ ├── USBDesc.h │ │ │ │ ├── Udp.h │ │ │ │ ├── WCharacter.h │ │ │ │ ├── WInterrupts.c │ │ │ │ ├── WMath.cpp │ │ │ │ ├── WString.cpp │ │ │ │ ├── WString.h │ │ │ │ ├── abi.cpp │ │ │ │ ├── binary.h │ │ │ │ ├── hooks.c │ │ │ │ ├── main.cpp │ │ │ │ ├── new.cpp │ │ │ │ ├── new.h │ │ │ │ ├── wiring.c │ │ │ │ ├── wiring_analog.c │ │ │ │ ├── wiring_digital.c │ │ │ │ ├── wiring_private.h │ │ │ │ ├── wiring_pulse.S │ │ │ │ ├── wiring_pulse.c │ │ │ │ └── wiring_shift.c │ │ ├── extras │ │ │ ├── pack.hourlybuild.bash │ │ │ ├── pack.pullrequest.bash │ │ │ ├── pack.release.bash │ │ │ ├── package_index.json.Hourly.template │ │ │ └── package_index.json.PR.template │ │ ├── firmwares │ │ │ ├── arduinoISP │ │ │ │ └── readme.txt │ │ │ ├── atmegaxxu2 │ │ │ │ ├── Arduino-COMBINED-dfu-usbserial-atmega16u2-Mega2560-Rev3.hex │ │ │ │ ├── Arduino-COMBINED-dfu-usbserial-atmega16u2-MegaADK-Rev3.hex │ │ │ │ ├── Arduino-COMBINED-dfu-usbserial-atmega16u2-Uno-Rev3.hex │ │ │ │ ├── Genuino-COMBINED-dfu-usbserial-atmega16u2-Mega2560-R3.hex │ │ │ │ ├── Genuino-COMBINED-dfu-usbserial-atmega16u2-Uno-R3.hex │ │ │ │ ├── MEGA-dfu_and_usbserial_combined.hex │ │ │ │ ├── README.txt │ │ │ │ ├── UNO-dfu_and_usbserial_combined.hex │ │ │ │ ├── arduino-usbdfu │ │ │ │ │ ├── Arduino-usbdfu.c │ │ │ │ │ ├── Arduino-usbdfu.h │ │ │ │ │ ├── Board │ │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── Descriptors.c │ │ │ │ │ ├── Descriptors.h │ │ │ │ │ ├── makefile │ │ │ │ │ └── readme.txt │ │ │ │ └── arduino-usbserial │ │ │ │ │ ├── Arduino-usbserial-atmega16u2-Mega2560-Rev3.hex │ │ │ │ │ ├── Arduino-usbserial-atmega16u2-MegaADK-Rev3.hex │ │ │ │ │ ├── Arduino-usbserial-atmega16u2-Uno-Rev3.hex │ │ │ │ │ ├── Arduino-usbserial-mega.hex │ │ │ │ │ ├── Arduino-usbserial-uno.hex │ │ │ │ │ ├── Arduino-usbserial.c │ │ │ │ │ ├── Arduino-usbserial.h │ │ │ │ │ ├── Board │ │ │ │ │ └── LEDs.h │ │ │ │ │ ├── Descriptors.c │ │ │ │ │ ├── Descriptors.h │ │ │ │ │ ├── Genuino-usbserial-atmega16u2-Mega2560-R3.hex │ │ │ │ │ ├── Genuino-usbserial-atmega16u2-Uno-R3.hex │ │ │ │ │ ├── Lib │ │ │ │ │ └── LightweightRingBuff.h │ │ │ │ │ ├── makefile │ │ │ │ │ └── readme.txt │ │ │ └── wifishield │ │ │ │ ├── binary │ │ │ │ ├── wifiHD.elf │ │ │ │ ├── wifiHD.hex │ │ │ │ ├── wifiHD_2_1.elf │ │ │ │ ├── wifi_dnld.elf │ │ │ │ ├── wifi_dnld.hex │ │ │ │ └── wifi_dnld_2_1.elf │ │ │ │ ├── scripts │ │ │ │ ├── ArduinoWifiShield_upgrade.sh │ │ │ │ └── ArduinoWifiShield_upgrade_mac.sh │ │ │ │ ├── wifiHD │ │ │ │ ├── .cproject │ │ │ │ ├── .project │ │ │ │ ├── Release │ │ │ │ │ ├── wifiHD.elf │ │ │ │ │ └── wifiHD.hex │ │ │ │ ├── src │ │ │ │ │ ├── CONFIG │ │ │ │ │ │ ├── conf_access.h │ │ │ │ │ │ ├── conf_at45dbx.h │ │ │ │ │ │ ├── conf_ebi.h │ │ │ │ │ │ └── conf_sd_mmc_spi.h │ │ │ │ │ ├── SOFTWARE_FRAMEWORK │ │ │ │ │ │ ├── ASM │ │ │ │ │ │ │ └── trampoline.x │ │ │ │ │ │ ├── BOARDS │ │ │ │ │ │ │ ├── ARDUINO │ │ │ │ │ │ │ │ ├── arduino.h │ │ │ │ │ │ │ │ ├── led.c │ │ │ │ │ │ │ │ └── led.h │ │ │ │ │ │ │ ├── EVK1105 │ │ │ │ │ │ │ │ ├── evk1105.h │ │ │ │ │ │ │ │ ├── led.c │ │ │ │ │ │ │ │ └── led.h │ │ │ │ │ │ │ ├── board.h │ │ │ │ │ │ │ └── board.h.my │ │ │ │ │ │ ├── COMPONENTS │ │ │ │ │ │ │ ├── MEMORY │ │ │ │ │ │ │ │ └── DATA_FLASH │ │ │ │ │ │ │ │ │ └── AT45DBX │ │ │ │ │ │ │ │ │ ├── at45dbx.c │ │ │ │ │ │ │ │ │ ├── at45dbx.h │ │ │ │ │ │ │ │ │ ├── at45dbx_mem.c │ │ │ │ │ │ │ │ │ └── at45dbx_mem.h │ │ │ │ │ │ │ └── WIFI │ │ │ │ │ │ │ │ └── HD │ │ │ │ │ │ │ │ ├── v2.7.0 │ │ │ │ │ │ │ │ ├── UCR1 │ │ │ │ │ │ │ │ │ └── GCC │ │ │ │ │ │ │ │ │ │ ├── lib_ucr1_hd_sdio_v2.7.0.a │ │ │ │ │ │ │ │ │ │ ├── lib_ucr1_hd_spi_v2.7.0.a │ │ │ │ │ │ │ │ │ │ └── lib_ucr1_hd_wl_sta_intwpa_v2.7.0.a │ │ │ │ │ │ │ │ ├── UCR2 │ │ │ │ │ │ │ │ │ └── GCC │ │ │ │ │ │ │ │ │ │ ├── lib_ucr2_hd_sdio_v2.7.0.a │ │ │ │ │ │ │ │ │ │ ├── lib_ucr2_hd_spi_v2.7.0.a │ │ │ │ │ │ │ │ │ │ └── lib_ucr2_hd_wl_sta_intwpa_v2.7.0.a │ │ │ │ │ │ │ │ └── revision.txt │ │ │ │ │ │ │ │ ├── wl_api.h │ │ │ │ │ │ │ │ ├── wl_fw.h │ │ │ │ │ │ │ │ ├── wl_os.h │ │ │ │ │ │ │ │ ├── wl_sdio.h │ │ │ │ │ │ │ │ ├── wl_spi.h │ │ │ │ │ │ │ │ └── wlap_api.h │ │ │ │ │ │ ├── DRIVERS │ │ │ │ │ │ │ ├── CPU │ │ │ │ │ │ │ │ └── CYCLE_COUNTER │ │ │ │ │ │ │ │ │ └── cycle_counter.h │ │ │ │ │ │ │ ├── EBI │ │ │ │ │ │ │ │ └── SMC │ │ │ │ │ │ │ │ │ ├── smc.c │ │ │ │ │ │ │ │ │ └── smc.h │ │ │ │ │ │ │ ├── EIC │ │ │ │ │ │ │ │ ├── eic.c │ │ │ │ │ │ │ │ └── eic.h │ │ │ │ │ │ │ ├── FLASHC │ │ │ │ │ │ │ │ ├── flashc.c │ │ │ │ │ │ │ │ └── flashc.h │ │ │ │ │ │ │ ├── GPIO │ │ │ │ │ │ │ │ ├── gpio.c │ │ │ │ │ │ │ │ └── gpio.h │ │ │ │ │ │ │ ├── INTC │ │ │ │ │ │ │ │ ├── exception.x │ │ │ │ │ │ │ │ ├── intc.c │ │ │ │ │ │ │ │ └── intc.h │ │ │ │ │ │ │ ├── PDCA │ │ │ │ │ │ │ │ ├── pdca.c │ │ │ │ │ │ │ │ └── pdca.h │ │ │ │ │ │ │ ├── PM │ │ │ │ │ │ │ │ ├── pm.c │ │ │ │ │ │ │ │ ├── pm.h │ │ │ │ │ │ │ │ ├── pm_conf_clocks.c │ │ │ │ │ │ │ │ ├── power_clocks_lib.c │ │ │ │ │ │ │ │ └── power_clocks_lib.h │ │ │ │ │ │ │ ├── RTC │ │ │ │ │ │ │ │ ├── rtc.c │ │ │ │ │ │ │ │ └── rtc.h │ │ │ │ │ │ │ ├── SPI │ │ │ │ │ │ │ │ ├── spi.c │ │ │ │ │ │ │ │ └── spi.h │ │ │ │ │ │ │ ├── TC │ │ │ │ │ │ │ │ ├── tc.c │ │ │ │ │ │ │ │ └── tc.h │ │ │ │ │ │ │ └── USART │ │ │ │ │ │ │ │ ├── usart.c │ │ │ │ │ │ │ │ └── usart.h │ │ │ │ │ │ ├── SERVICES │ │ │ │ │ │ │ ├── DELAY │ │ │ │ │ │ │ │ ├── delay.c │ │ │ │ │ │ │ │ └── delay.h │ │ │ │ │ │ │ ├── LWIP │ │ │ │ │ │ │ │ ├── lwip-1.3.2 │ │ │ │ │ │ │ │ │ └── src │ │ │ │ │ │ │ │ │ │ ├── core │ │ │ │ │ │ │ │ │ │ ├── dhcp.c │ │ │ │ │ │ │ │ │ │ ├── dns.c │ │ │ │ │ │ │ │ │ │ ├── init.c │ │ │ │ │ │ │ │ │ │ ├── ipv4 │ │ │ │ │ │ │ │ │ │ │ ├── autoip.c │ │ │ │ │ │ │ │ │ │ │ ├── icmp.c │ │ │ │ │ │ │ │ │ │ │ ├── igmp.c │ │ │ │ │ │ │ │ │ │ │ ├── inet.c │ │ │ │ │ │ │ │ │ │ │ ├── inet_chksum.c │ │ │ │ │ │ │ │ │ │ │ ├── ip.c │ │ │ │ │ │ │ │ │ │ │ ├── ip_addr.c │ │ │ │ │ │ │ │ │ │ │ └── ip_frag.c │ │ │ │ │ │ │ │ │ │ ├── mem.c │ │ │ │ │ │ │ │ │ │ ├── memp.c │ │ │ │ │ │ │ │ │ │ ├── netif.c │ │ │ │ │ │ │ │ │ │ ├── pbuf.c │ │ │ │ │ │ │ │ │ │ ├── raw.c │ │ │ │ │ │ │ │ │ │ ├── stats.c │ │ │ │ │ │ │ │ │ │ ├── tcp.c │ │ │ │ │ │ │ │ │ │ ├── tcp_in.c │ │ │ │ │ │ │ │ │ │ ├── tcp_out.c │ │ │ │ │ │ │ │ │ │ └── udp.c │ │ │ │ │ │ │ │ │ │ ├── include │ │ │ │ │ │ │ │ │ │ ├── ipv4 │ │ │ │ │ │ │ │ │ │ │ └── lwip │ │ │ │ │ │ │ │ │ │ │ │ ├── autoip.h │ │ │ │ │ │ │ │ │ │ │ │ ├── icmp.h │ │ │ │ │ │ │ │ │ │ │ │ ├── igmp.h │ │ │ │ │ │ │ │ │ │ │ │ ├── inet.h │ │ │ │ │ │ │ │ │ │ │ │ ├── inet_chksum.h │ │ │ │ │ │ │ │ │ │ │ │ ├── ip.h │ │ │ │ │ │ │ │ │ │ │ │ ├── ip_addr.h │ │ │ │ │ │ │ │ │ │ │ │ └── ip_frag.h │ │ │ │ │ │ │ │ │ │ ├── lwip │ │ │ │ │ │ │ │ │ │ │ ├── api.h │ │ │ │ │ │ │ │ │ │ │ ├── api_msg.h │ │ │ │ │ │ │ │ │ │ │ ├── arch.h │ │ │ │ │ │ │ │ │ │ │ ├── debug.h │ │ │ │ │ │ │ │ │ │ │ ├── def.h │ │ │ │ │ │ │ │ │ │ │ ├── dhcp.h │ │ │ │ │ │ │ │ │ │ │ ├── dns.h │ │ │ │ │ │ │ │ │ │ │ ├── err.h │ │ │ │ │ │ │ │ │ │ │ ├── init.h │ │ │ │ │ │ │ │ │ │ │ ├── mem.h │ │ │ │ │ │ │ │ │ │ │ ├── memp.h │ │ │ │ │ │ │ │ │ │ │ ├── memp_std.h │ │ │ │ │ │ │ │ │ │ │ ├── netbuf.h │ │ │ │ │ │ │ │ │ │ │ ├── netdb.h │ │ │ │ │ │ │ │ │ │ │ ├── netif.h │ │ │ │ │ │ │ │ │ │ │ ├── netifapi.h │ │ │ │ │ │ │ │ │ │ │ ├── opt.h │ │ │ │ │ │ │ │ │ │ │ ├── pbuf.h │ │ │ │ │ │ │ │ │ │ │ ├── raw.h │ │ │ │ │ │ │ │ │ │ │ ├── sio.h │ │ │ │ │ │ │ │ │ │ │ ├── snmp.h │ │ │ │ │ │ │ │ │ │ │ ├── snmp_asn1.h │ │ │ │ │ │ │ │ │ │ │ ├── snmp_msg.h │ │ │ │ │ │ │ │ │ │ │ ├── snmp_structs.h │ │ │ │ │ │ │ │ │ │ │ ├── sockets.h │ │ │ │ │ │ │ │ │ │ │ ├── stats.h │ │ │ │ │ │ │ │ │ │ │ ├── sys.h │ │ │ │ │ │ │ │ │ │ │ ├── tcp.h │ │ │ │ │ │ │ │ │ │ │ ├── tcpip.h │ │ │ │ │ │ │ │ │ │ │ └── udp.h │ │ │ │ │ │ │ │ │ │ └── netif │ │ │ │ │ │ │ │ │ │ │ ├── etharp.h │ │ │ │ │ │ │ │ │ │ │ ├── loopif.h │ │ │ │ │ │ │ │ │ │ │ ├── ppp_oe.h │ │ │ │ │ │ │ │ │ │ │ └── slipif.h │ │ │ │ │ │ │ │ │ │ └── netif │ │ │ │ │ │ │ │ │ │ ├── etharp.c │ │ │ │ │ │ │ │ │ │ └── loopif.c │ │ │ │ │ │ │ │ └── lwip-port-1.3.2 │ │ │ │ │ │ │ │ │ └── HD │ │ │ │ │ │ │ │ │ ├── if │ │ │ │ │ │ │ │ │ ├── include │ │ │ │ │ │ │ │ │ │ ├── arch │ │ │ │ │ │ │ │ │ │ │ ├── cc.h │ │ │ │ │ │ │ │ │ │ │ └── perf.h │ │ │ │ │ │ │ │ │ │ ├── lwipopts.h │ │ │ │ │ │ │ │ │ │ └── netif │ │ │ │ │ │ │ │ │ │ │ └── wlif.h │ │ │ │ │ │ │ │ │ └── netif │ │ │ │ │ │ │ │ │ │ └── wlif.c │ │ │ │ │ │ │ │ │ └── readme.txt │ │ │ │ │ │ │ └── MEMORY │ │ │ │ │ │ │ │ └── CTRL_ACCESS │ │ │ │ │ │ │ │ ├── ctrl_access.c │ │ │ │ │ │ │ │ └── ctrl_access.h │ │ │ │ │ │ └── UTILS │ │ │ │ │ │ │ ├── DEBUG │ │ │ │ │ │ │ ├── debug.c │ │ │ │ │ │ │ ├── debug.h │ │ │ │ │ │ │ ├── print_funcs.c │ │ │ │ │ │ │ └── print_funcs.h │ │ │ │ │ │ │ ├── LIBS │ │ │ │ │ │ │ └── NEWLIB_ADDONS │ │ │ │ │ │ │ │ ├── INCLUDE │ │ │ │ │ │ │ │ ├── nlao_cpu.h │ │ │ │ │ │ │ │ ├── nlao_exceptions.h │ │ │ │ │ │ │ │ ├── nlao_interrupts.h │ │ │ │ │ │ │ │ ├── nlao_io.h │ │ │ │ │ │ │ │ └── nlao_usart.h │ │ │ │ │ │ │ │ └── libnewlib_addons-at32ucr2-speed_opt.a │ │ │ │ │ │ │ ├── LINKER_SCRIPTS │ │ │ │ │ │ │ └── AT32UC3A │ │ │ │ │ │ │ │ ├── 1256 │ │ │ │ │ │ │ │ └── GCC │ │ │ │ │ │ │ │ │ └── link_uc3a1256.lds │ │ │ │ │ │ │ │ └── 0512 │ │ │ │ │ │ │ │ └── GCC │ │ │ │ │ │ │ │ └── link_uc3a0512.lds │ │ │ │ │ │ │ ├── PREPROCESSOR │ │ │ │ │ │ │ ├── mrepeat.h │ │ │ │ │ │ │ ├── preprocessor.h │ │ │ │ │ │ │ ├── stringz.h │ │ │ │ │ │ │ └── tpaste.h │ │ │ │ │ │ │ ├── STARTUP_FILES │ │ │ │ │ │ │ └── GCC │ │ │ │ │ │ │ │ └── crt0.x │ │ │ │ │ │ │ ├── compiler.h │ │ │ │ │ │ │ ├── conf_isp.h │ │ │ │ │ │ │ └── parts.h │ │ │ │ │ ├── ard_spi.c │ │ │ │ │ ├── ard_spi.h │ │ │ │ │ ├── ard_tcp.c │ │ │ │ │ ├── ard_tcp.h │ │ │ │ │ ├── ard_utils.c │ │ │ │ │ ├── ard_utils.h │ │ │ │ │ ├── avr32_spi.c │ │ │ │ │ ├── board_init.c │ │ │ │ │ ├── board_init.h │ │ │ │ │ ├── cmd_wl.c │ │ │ │ │ ├── cmd_wl.h │ │ │ │ │ ├── console.c │ │ │ │ │ ├── console.h │ │ │ │ │ ├── debug.h │ │ │ │ │ ├── fw_download.h │ │ │ │ │ ├── fw_download_extflash.c │ │ │ │ │ ├── license.txt │ │ │ │ │ ├── lwip_setup.c │ │ │ │ │ ├── lwip_setup.h │ │ │ │ │ ├── lwipopts.h │ │ │ │ │ ├── main.c │ │ │ │ │ ├── nvram.c │ │ │ │ │ ├── nvram.h │ │ │ │ │ ├── owl_os.c │ │ │ │ │ ├── ping.c │ │ │ │ │ ├── ping.h │ │ │ │ │ ├── printf-stdarg.c │ │ │ │ │ ├── printf-stdarg.h │ │ │ │ │ ├── timer.c │ │ │ │ │ ├── timer.h │ │ │ │ │ ├── top_defs.h │ │ │ │ │ ├── trace.h │ │ │ │ │ ├── util.c │ │ │ │ │ ├── util.h │ │ │ │ │ ├── wifi_spi.h │ │ │ │ │ ├── wl_cm.c │ │ │ │ │ ├── wl_cm.h │ │ │ │ │ └── wl_definitions.h │ │ │ │ └── wifiHD.cproj │ │ │ │ ├── wifi_dnld │ │ │ │ ├── .cproject │ │ │ │ ├── .project │ │ │ │ ├── Release │ │ │ │ │ └── wifi_dnld.elf │ │ │ │ ├── src │ │ │ │ │ ├── CONFIG │ │ │ │ │ │ ├── conf_access.h │ │ │ │ │ │ └── conf_at45dbx.h │ │ │ │ │ ├── Doc │ │ │ │ │ │ ├── SPB104 product brief.pdf │ │ │ │ │ │ └── gettingstarted.pdf │ │ │ │ │ ├── SOFTWARE_FRAMEWORK │ │ │ │ │ │ ├── ASM │ │ │ │ │ │ │ └── trampoline.x │ │ │ │ │ │ ├── BOARDS │ │ │ │ │ │ │ ├── ARDUINO │ │ │ │ │ │ │ │ ├── arduino.h │ │ │ │ │ │ │ │ ├── led.c │ │ │ │ │ │ │ │ └── led.h │ │ │ │ │ │ │ ├── EVK1105 │ │ │ │ │ │ │ │ ├── evk1105.h │ │ │ │ │ │ │ │ ├── led.c │ │ │ │ │ │ │ │ └── led.h │ │ │ │ │ │ │ ├── board.h │ │ │ │ │ │ │ └── board.h.ori │ │ │ │ │ │ ├── COMPONENTS │ │ │ │ │ │ │ └── MEMORY │ │ │ │ │ │ │ │ └── DATA_FLASH │ │ │ │ │ │ │ │ └── AT45DBX │ │ │ │ │ │ │ │ ├── at45dbx.c │ │ │ │ │ │ │ │ ├── at45dbx.h │ │ │ │ │ │ │ │ ├── at45dbx_mem.c │ │ │ │ │ │ │ │ └── at45dbx_mem.h │ │ │ │ │ │ ├── DRIVERS │ │ │ │ │ │ │ ├── FLASHC │ │ │ │ │ │ │ │ ├── flashc.c │ │ │ │ │ │ │ │ └── flashc.h │ │ │ │ │ │ │ ├── GPIO │ │ │ │ │ │ │ │ ├── gpio.c │ │ │ │ │ │ │ │ └── gpio.h │ │ │ │ │ │ │ ├── INTC │ │ │ │ │ │ │ │ ├── exception.x │ │ │ │ │ │ │ │ ├── intc.c │ │ │ │ │ │ │ │ └── intc.h │ │ │ │ │ │ │ ├── PM │ │ │ │ │ │ │ │ ├── pm.c │ │ │ │ │ │ │ │ ├── pm.h │ │ │ │ │ │ │ │ ├── pm_conf_clocks.c │ │ │ │ │ │ │ │ ├── power_clocks_lib.c │ │ │ │ │ │ │ │ └── power_clocks_lib.h │ │ │ │ │ │ │ ├── SPI │ │ │ │ │ │ │ │ ├── spi.c │ │ │ │ │ │ │ │ └── spi.h │ │ │ │ │ │ │ └── USART │ │ │ │ │ │ │ │ ├── usart.c │ │ │ │ │ │ │ │ └── usart.h │ │ │ │ │ │ ├── SERVICES │ │ │ │ │ │ │ └── MEMORY │ │ │ │ │ │ │ │ └── CTRL_ACCESS │ │ │ │ │ │ │ │ ├── ctrl_access.c │ │ │ │ │ │ │ │ └── ctrl_access.h │ │ │ │ │ │ └── UTILS │ │ │ │ │ │ │ ├── DEBUG │ │ │ │ │ │ │ ├── debug.c │ │ │ │ │ │ │ ├── debug.h │ │ │ │ │ │ │ ├── print_funcs.c │ │ │ │ │ │ │ └── print_funcs.h │ │ │ │ │ │ │ ├── LIBS │ │ │ │ │ │ │ └── NEWLIB_ADDONS │ │ │ │ │ │ │ │ ├── INCLUDE │ │ │ │ │ │ │ │ ├── nlao_cpu.h │ │ │ │ │ │ │ │ ├── nlao_exceptions.h │ │ │ │ │ │ │ │ ├── nlao_interrupts.h │ │ │ │ │ │ │ │ ├── nlao_io.h │ │ │ │ │ │ │ │ └── nlao_usart.h │ │ │ │ │ │ │ │ └── libnewlib_addons-at32ucr2-speed_opt.a │ │ │ │ │ │ │ ├── LINKER_SCRIPTS │ │ │ │ │ │ │ └── AT32UC3A │ │ │ │ │ │ │ │ ├── 1256 │ │ │ │ │ │ │ │ └── GCC │ │ │ │ │ │ │ │ │ └── link_uc3a1256.lds │ │ │ │ │ │ │ │ └── 0512 │ │ │ │ │ │ │ │ └── GCC │ │ │ │ │ │ │ │ └── link_uc3a0512.lds │ │ │ │ │ │ │ ├── PREPROCESSOR │ │ │ │ │ │ │ ├── mrepeat.h │ │ │ │ │ │ │ ├── preprocessor.h │ │ │ │ │ │ │ ├── stringz.h │ │ │ │ │ │ │ └── tpaste.h │ │ │ │ │ │ │ ├── STARTUP_FILES │ │ │ │ │ │ │ └── GCC │ │ │ │ │ │ │ │ └── crt0.x │ │ │ │ │ │ │ ├── compiler.h │ │ │ │ │ │ │ ├── conf_isp.h │ │ │ │ │ │ │ └── parts.h │ │ │ │ │ ├── clocks.c │ │ │ │ │ ├── clocks.h │ │ │ │ │ ├── flash_fw.c │ │ │ │ │ ├── license.txt │ │ │ │ │ ├── nor_flash.c │ │ │ │ │ ├── nor_flash.h │ │ │ │ │ ├── printf-stdarg.c │ │ │ │ │ ├── printf-stdarg.h │ │ │ │ │ ├── startup.c │ │ │ │ │ ├── startup.h │ │ │ │ │ └── wl_fw.h │ │ │ │ └── wifi_dnld.cproj │ │ │ │ └── wifishield.atsln │ │ ├── libraries │ │ │ ├── EEPROM │ │ │ │ ├── README.md │ │ │ │ ├── examples │ │ │ │ │ ├── eeprom_clear │ │ │ │ │ │ └── eeprom_clear.ino │ │ │ │ │ ├── eeprom_crc │ │ │ │ │ │ └── eeprom_crc.ino │ │ │ │ │ ├── eeprom_get │ │ │ │ │ │ └── eeprom_get.ino │ │ │ │ │ ├── eeprom_iteration │ │ │ │ │ │ └── eeprom_iteration.ino │ │ │ │ │ ├── eeprom_put │ │ │ │ │ │ └── eeprom_put.ino │ │ │ │ │ ├── eeprom_read │ │ │ │ │ │ └── eeprom_read.ino │ │ │ │ │ ├── eeprom_update │ │ │ │ │ │ └── eeprom_update.ino │ │ │ │ │ └── eeprom_write │ │ │ │ │ │ └── eeprom_write.ino │ │ │ │ ├── keywords.txt │ │ │ │ ├── library.properties │ │ │ │ └── src │ │ │ │ │ └── EEPROM.h │ │ │ ├── HID │ │ │ │ ├── keywords.txt │ │ │ │ ├── library.properties │ │ │ │ └── src │ │ │ │ │ ├── HID.cpp │ │ │ │ │ └── HID.h │ │ │ ├── SPI │ │ │ │ ├── examples │ │ │ │ │ ├── BarometricPressureSensor │ │ │ │ │ │ └── BarometricPressureSensor.ino │ │ │ │ │ └── DigitalPotControl │ │ │ │ │ │ └── DigitalPotControl.ino │ │ │ │ ├── keywords.txt │ │ │ │ ├── library.properties │ │ │ │ └── src │ │ │ │ │ ├── SPI.cpp │ │ │ │ │ └── SPI.h │ │ │ ├── SoftwareSerial │ │ │ │ ├── examples │ │ │ │ │ ├── SoftwareSerialExample │ │ │ │ │ │ └── SoftwareSerialExample.ino │ │ │ │ │ └── TwoPortReceive │ │ │ │ │ │ └── TwoPortReceive.ino │ │ │ │ ├── keywords.txt │ │ │ │ ├── library.properties │ │ │ │ └── src │ │ │ │ │ ├── SoftwareSerial.cpp │ │ │ │ │ └── SoftwareSerial.h │ │ │ └── Wire │ │ │ │ ├── examples │ │ │ │ ├── SFRRanger_reader │ │ │ │ │ └── SFRRanger_reader.ino │ │ │ │ ├── digital_potentiometer │ │ │ │ │ └── digital_potentiometer.ino │ │ │ │ ├── i2c_scanner │ │ │ │ │ └── i2c_scanner.ino │ │ │ │ ├── master_reader │ │ │ │ │ └── master_reader.ino │ │ │ │ ├── master_writer │ │ │ │ │ └── master_writer.ino │ │ │ │ ├── slave_receiver │ │ │ │ │ └── slave_receiver.ino │ │ │ │ └── slave_sender │ │ │ │ │ └── slave_sender.ino │ │ │ │ ├── keywords.txt │ │ │ │ ├── library.properties │ │ │ │ └── src │ │ │ │ ├── Wire.cpp │ │ │ │ ├── Wire.h │ │ │ │ └── utility │ │ │ │ ├── twi.c │ │ │ │ └── twi.h │ │ ├── platform.txt │ │ ├── programmers.txt │ │ └── variants │ │ │ ├── circuitplay32u4 │ │ │ └── pins_arduino.h │ │ │ ├── eightanaloginputs │ │ │ └── pins_arduino.h │ │ │ ├── ethernet │ │ │ └── pins_arduino.h │ │ │ ├── gemma │ │ │ └── pins_arduino.h │ │ │ ├── leonardo │ │ │ └── pins_arduino.h │ │ │ ├── mega │ │ │ └── pins_arduino.h │ │ │ ├── micro │ │ │ └── pins_arduino.h │ │ │ ├── robot_control │ │ │ └── pins_arduino.h │ │ │ ├── robot_motor │ │ │ └── pins_arduino.h │ │ │ ├── standard │ │ │ └── pins_arduino.h │ │ │ └── yun │ │ │ └── pins_arduino.h │ └── stlarduino │ │ ├── ArduinoSTL.cpp │ │ ├── ArduinoSTL.h │ │ ├── LICENSE │ │ ├── abi │ │ ├── abi.cpp │ │ ├── libgcc_eh │ │ │ ├── Makefile │ │ │ └── Makefile.in │ │ └── libsupc │ │ │ ├── Makefile │ │ │ └── Makefile.in │ │ ├── algorithm │ │ ├── algorithm.cpp │ │ ├── associative_base │ │ ├── associative_base.cpp │ │ ├── basic_definitions │ │ ├── bitset │ │ ├── bitset.cpp │ │ ├── cassert │ │ ├── cctype │ │ ├── cerrno │ │ ├── cfloat │ │ ├── char_traits │ │ ├── char_traits.cpp │ │ ├── climits │ │ ├── clocale │ │ ├── cmath │ │ ├── complex │ │ ├── complex.cpp │ │ ├── csetjmp │ │ ├── csignal │ │ ├── cstdarg │ │ ├── cstddef │ │ ├── cstdio │ │ ├── cstdlib │ │ ├── cstring │ │ ├── ctime │ │ ├── cwchar │ │ ├── cwctype │ │ ├── del_op.cpp │ │ ├── del_opnt.cpp │ │ ├── del_ops.cpp │ │ ├── del_opv.cpp │ │ ├── del_opvnt.cpp │ │ ├── del_opvs.cpp │ │ ├── deque │ │ ├── deque.cpp │ │ ├── eh_alloc.cpp │ │ ├── eh_globals.cpp │ │ ├── exception │ │ ├── exception.cpp │ │ ├── func_exception │ │ ├── func_exception.cpp │ │ ├── functional │ │ ├── initializer_list │ │ ├── iomanip │ │ ├── iomanip.cpp │ │ ├── ios │ │ ├── ios.cpp │ │ ├── iosfwd │ │ ├── iostream │ │ ├── iostream.cpp │ │ ├── istream │ │ ├── istream.cpp │ │ ├── istream_helpers │ │ ├── iterator │ │ ├── iterator.cpp │ │ ├── iterator_base │ │ ├── limits │ │ ├── limits.cpp │ │ ├── list │ │ ├── list.cpp │ │ ├── locale │ │ ├── locale.cpp │ │ ├── map │ │ ├── map.cpp │ │ ├── memory │ │ ├── new │ │ ├── new_handler.cpp │ │ ├── new_op.cpp │ │ ├── new_opnt.cpp │ │ ├── new_opv.cpp │ │ ├── new_opvnt.cpp │ │ ├── nonstd-function.h │ │ ├── numeric │ │ ├── numeric.cpp │ │ ├── ostream │ │ ├── ostream.cpp │ │ ├── ostream_helpers │ │ ├── ostream_helpers.cpp │ │ ├── queue │ │ ├── queue.cpp │ │ ├── serstream │ │ ├── set │ │ ├── set.cpp │ │ ├── sstream │ │ ├── sstream.cpp │ │ ├── stack │ │ ├── stack.cpp │ │ ├── stdexcept │ │ ├── stdexcept.cpp │ │ ├── streambuf │ │ ├── streambuf.cpp │ │ ├── string │ │ ├── string.cpp │ │ ├── string_iostream │ │ ├── string_view │ │ ├── support │ │ ├── support.cpp │ │ ├── system_configuration.h │ │ ├── tuple │ │ ├── type_traits │ │ ├── typeinfo │ │ ├── typeinfo.cpp │ │ ├── unwind-cxx.h │ │ ├── utility │ │ ├── utility.cpp │ │ ├── valarray │ │ ├── valarray.cpp │ │ ├── vector │ │ └── vector.cpp └── libuv │ ├── LICENSE │ ├── include │ ├── uv.h │ └── uv │ │ ├── aix.h │ │ ├── android-ifaddrs.h │ │ ├── bsd.h │ │ ├── darwin.h │ │ ├── errno.h │ │ ├── linux.h │ │ ├── os390.h │ │ ├── posix.h │ │ ├── stdint-msvc2008.h │ │ ├── sunos.h │ │ ├── threadpool.h │ │ ├── tree.h │ │ ├── unix.h │ │ ├── version.h │ │ └── win.h │ └── src │ ├── fs-poll.c │ ├── heap-inl.h │ ├── idna.c │ ├── idna.h │ ├── inet.c │ ├── queue.h │ ├── random.c │ ├── strscpy.c │ ├── strscpy.h │ ├── threadpool.c │ ├── timer.c │ ├── unix │ ├── aix-common.c │ ├── aix.c │ ├── android-ifaddrs.c │ ├── async.c │ ├── atomic-ops.h │ ├── bsd-ifaddrs.c │ ├── bsd-proctitle.c │ ├── core.c │ ├── cygwin.c │ ├── darwin-proctitle.c │ ├── darwin-stub.h │ ├── darwin.c │ ├── dl.c │ ├── freebsd.c │ ├── fs.c │ ├── fsevents.c │ ├── getaddrinfo.c │ ├── getnameinfo.c │ ├── haiku.c │ ├── ibmi.c │ ├── internal.h │ ├── kqueue.c │ ├── linux-core.c │ ├── linux-inotify.c │ ├── linux-syscalls.c │ ├── linux-syscalls.h │ ├── loop-watcher.c │ ├── loop.c │ ├── netbsd.c │ ├── no-fsevents.c │ ├── no-proctitle.c │ ├── openbsd.c │ ├── os390-syscalls.c │ ├── os390-syscalls.h │ ├── os390.c │ ├── pipe.c │ ├── poll.c │ ├── posix-hrtime.c │ ├── posix-poll.c │ ├── process.c │ ├── procfs-exepath.c │ ├── proctitle.c │ ├── pthread-fixes.c │ ├── random-devurandom.c │ ├── random-getentropy.c │ ├── random-getrandom.c │ ├── random-sysctl-linux.c │ ├── signal.c │ ├── spinlock.h │ ├── stream.c │ ├── sunos.c │ ├── sysinfo-loadavg.c │ ├── sysinfo-memory.c │ ├── tcp.c │ ├── thread.c │ ├── tty.c │ └── udp.c │ ├── uv-common.c │ ├── uv-common.h │ ├── uv-data-getter-setters.c │ ├── version.c │ └── win │ ├── async.c │ ├── atomicops-inl.h │ ├── core.c │ ├── detect-wakeup.c │ ├── dl.c │ ├── error.c │ ├── fs-event.c │ ├── fs-fd-hash-inl.h │ ├── fs.c │ ├── getaddrinfo.c │ ├── getnameinfo.c │ ├── handle-inl.h │ ├── handle.c │ ├── internal.h │ ├── loop-watcher.c │ ├── pipe.c │ ├── poll.c │ ├── process-stdio.c │ ├── process.c │ ├── req-inl.h │ ├── signal.c │ ├── snprintf.c │ ├── stream-inl.h │ ├── stream.c │ ├── tcp.c │ ├── thread.c │ ├── tty.c │ ├── udp.c │ ├── util.c │ ├── winapi.c │ ├── winapi.h │ ├── winsock.c │ └── winsock.h ├── lib ├── check │ ├── isAssignment.js │ ├── isBoolean.js │ ├── isDelimiter.js │ ├── isIncrement.js │ ├── isInitOperator.js │ ├── isKeyword.js │ ├── isNative.js │ ├── isNumber.js │ ├── isObjectOperator.js │ ├── isOperator.js │ ├── isRegExp.js │ ├── isSemi.js │ ├── isString.js │ ├── isUnary.js │ └── isVariable.js ├── env.js ├── include.js ├── package.js ├── parser.js ├── require.js └── verify.js ├── nerd.js ├── nerd_modules ├── JSON │ ├── index.ng │ ├── lib │ │ ├── jsmn.h │ │ └── json.h │ └── package.json ├── Module │ └── index.ng ├── RegExp │ └── index.ng ├── String │ └── index.ng ├── arduino-lcd │ ├── index.ng │ ├── lib │ │ ├── LiquidCrystal.cpp │ │ └── LiquidCrystal.h │ └── package.json ├── arduino │ └── index.ng ├── child_process │ ├── index.ng │ └── package.json ├── console │ └── index.ng ├── date │ └── index.ng ├── error │ └── index.ng ├── fs │ ├── index.ng │ └── package.json ├── http │ ├── httpStruct.h │ ├── httplib │ │ ├── uSockets │ │ │ ├── LICENSE │ │ │ ├── bsd.c │ │ │ ├── context.c │ │ │ ├── crypto │ │ │ │ ├── openssl.c │ │ │ │ ├── sni_tree.cpp │ │ │ │ └── wolfssl.c │ │ │ ├── eventing │ │ │ │ ├── epoll_kqueue.c │ │ │ │ ├── gcd.c │ │ │ │ └── libuv.c │ │ │ ├── internal │ │ │ │ ├── eventing │ │ │ │ │ ├── epoll_kqueue.h │ │ │ │ │ ├── gcd.h │ │ │ │ │ └── libuv.h │ │ │ │ ├── internal.h │ │ │ │ ├── loop_data.h │ │ │ │ └── networking │ │ │ │ │ └── bsd.h │ │ │ ├── libusockets.h │ │ │ ├── loop.c │ │ │ └── socket.c │ │ └── uWS │ │ │ ├── App.h │ │ │ ├── AsyncSocket.h │ │ │ ├── AsyncSocketData.h │ │ │ ├── BloomFilter.h │ │ │ ├── HttpContext.h │ │ │ ├── HttpContextData.h │ │ │ ├── HttpParser.h │ │ │ ├── HttpResponse.h │ │ │ ├── HttpResponseData.h │ │ │ ├── HttpRouter.h │ │ │ ├── LICENSE │ │ │ ├── Loop.h │ │ │ ├── LoopData.h │ │ │ ├── MessageParser.h │ │ │ ├── MoveOnlyFunction.h │ │ │ ├── Multipart.h │ │ │ ├── PerMessageDeflate.h │ │ │ ├── ProxyParser.h │ │ │ ├── QueryParser.h │ │ │ ├── TopicTree.h │ │ │ ├── Utilities.h │ │ │ ├── WebSocket.h │ │ │ ├── WebSocketContext.h │ │ │ ├── WebSocketContextData.h │ │ │ ├── WebSocketData.h │ │ │ ├── WebSocketExtensions.h │ │ │ ├── WebSocketHandshake.h │ │ │ └── WebSocketProtocol.h │ ├── index.ng │ └── package.json ├── math │ └── index.ng ├── object │ └── index.ng ├── os │ └── index.ng ├── path │ └── index.ng ├── process │ └── index.ng ├── querystring │ └── index.ng ├── thread │ └── index.ng └── wasm │ ├── index.ng │ ├── lib │ └── wasm.hpp │ └── package.json ├── package.json ├── self ├── base │ ├── cli │ │ └── cliParser.js │ ├── compiler │ │ └── target.js │ └── util │ │ ├── copyDirSync.js │ │ ├── copyRecursive.js │ │ ├── flash.js │ │ ├── getExt.js │ │ ├── getTips.js │ │ └── rmdir.js ├── compiler │ ├── native │ │ ├── compiler.js │ │ ├── env │ │ │ ├── arduino.js │ │ │ ├── js.js │ │ │ ├── std.js │ │ │ └── wasm.js │ │ ├── nerdcore │ │ │ ├── src │ │ │ │ ├── class │ │ │ │ │ ├── _meta.h │ │ │ │ │ ├── array.h │ │ │ │ │ ├── array_header.h │ │ │ │ │ ├── base_header.h │ │ │ │ │ ├── fixed_array.h │ │ │ │ │ ├── fixed_array_header.h │ │ │ │ │ ├── function.h │ │ │ │ │ ├── function_header.h │ │ │ │ │ ├── native.h │ │ │ │ │ ├── native_header.h │ │ │ │ │ ├── native_tpl_header.h │ │ │ │ │ ├── number.h │ │ │ │ │ ├── number_header.h │ │ │ │ │ ├── object.h │ │ │ │ │ ├── object_header.h │ │ │ │ │ ├── string.h │ │ │ │ │ ├── string_header.h │ │ │ │ │ ├── struct.h │ │ │ │ │ └── struct_header.h │ │ │ │ ├── classes.h │ │ │ │ ├── classes_header.h │ │ │ │ ├── enum.h │ │ │ │ ├── functions.h │ │ │ │ ├── functions_header.h │ │ │ │ ├── macro.h │ │ │ │ ├── native.h │ │ │ │ ├── native │ │ │ │ │ ├── double.h │ │ │ │ │ ├── double_header.h │ │ │ │ │ ├── int.h │ │ │ │ │ └── int_header.h │ │ │ │ ├── native_header.h │ │ │ │ ├── nerd.cpp │ │ │ │ ├── nerd.hpp │ │ │ │ ├── objmgmt.h │ │ │ │ ├── objmgmt_header.h │ │ │ │ ├── operator.h │ │ │ │ ├── operator_header.h │ │ │ │ ├── stdfn.h │ │ │ │ ├── stdfn_header.h │ │ │ │ ├── tsl │ │ │ │ │ ├── robin_growth_policy.h │ │ │ │ │ ├── robin_hash.h │ │ │ │ │ ├── robin_map.h │ │ │ │ │ └── robin_set.h │ │ │ │ ├── type_header.h │ │ │ │ ├── values.h │ │ │ │ ├── values_header.h │ │ │ │ ├── var.h │ │ │ │ └── var_header.h │ │ │ └── test │ │ │ │ ├── array.cpp │ │ │ │ ├── cast.cpp │ │ │ │ ├── native.cpp │ │ │ │ ├── object.cpp │ │ │ │ └── operators.cpp │ │ └── squel │ │ │ ├── arduino.cpp │ │ │ ├── js.cpp │ │ │ ├── std.cpp │ │ │ └── wasm.cpp │ └── self │ │ ├── base │ │ ├── cli │ │ │ └── cliParser.ng │ │ ├── compiler │ │ │ └── target.js │ │ └── util │ │ │ ├── copyDirSync.js │ │ │ ├── copyRecursive.js │ │ │ ├── flash.js │ │ │ ├── getExt.js │ │ │ ├── getTips.js │ │ │ ├── httpUtils.js │ │ │ └── rmdir.js │ │ └── nerd.ng ├── lib │ ├── check │ │ ├── isAssignment.js │ │ ├── isBoolean.js │ │ ├── isDelimiter.js │ │ ├── isIncrement.js │ │ ├── isInitOperator.js │ │ ├── isKeyword.js │ │ ├── isNative.js │ │ ├── isNumber.js │ │ ├── isObjectOperator.js │ │ ├── isOperator.js │ │ ├── isSemi.js │ │ ├── isString.js │ │ ├── isUnary.js │ │ └── isVariable.js │ ├── env.js │ ├── include.js │ ├── package.js │ ├── parser.js │ ├── require.js │ └── verify.js ├── nerd.js └── package.json └── test ├── accessor.ng ├── builtin.ng ├── comments.ng ├── conditionals.ng ├── function.ng ├── loop.ng ├── native.ng └── var.ng /.gitignore: -------------------------------------------------------------------------------- 1 | .nerd -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /base/compiler/target.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | var target = ["win-x86-32", "win-x86-64", "linux-x86-32", "linux-x86-64", "linux-arm32v7", 25 | "arduino-uno", "arduino-mega1280", "arduino-mega2560", 26 | "wasm", "wast", "asm-js", 27 | "mac-osx", 28 | "nucleo-l152re", "nucleo-l432kc" 29 | ]; 30 | module.exports = target; 31 | -------------------------------------------------------------------------------- /base/util/copyRecursive.js: -------------------------------------------------------------------------------- 1 | var fs = require("fs"); 2 | var path = require("path"); 3 | 4 | var copyRecursiveSync = function(src, dest) 5 | { 6 | if(!fs.existsSync(src)) 7 | { 8 | console.log("[!] Warning: " + src + " doesn't exist"); 9 | return; 10 | } 11 | if(fs.lstatSync( src ).isDirectory()) 12 | { 13 | var _newDest = path.dirname(dest); 14 | global.copyDirSync(src, _newDest, true); 15 | } 16 | else 17 | { 18 | var _path = []; 19 | 20 | var _newDest = path.dirname(dest); 21 | 22 | _path.push(_newDest); 23 | 24 | while(path.dirname(_newDest) != _newDest) 25 | { 26 | _newDest = path.dirname(_newDest); 27 | if(_newDest.indexOf(global.NERD_PATH) == 0) 28 | { 29 | _path.push(_newDest); 30 | } 31 | } 32 | 33 | for(var i = _path.length; i > -1; i--) 34 | { 35 | try 36 | { 37 | fs.mkdirSync(_path[i]); 38 | } 39 | catch(e){} 40 | } 41 | 42 | fs.copyFileSync(src, dest); 43 | } 44 | }; 45 | 46 | module.exports = copyRecursiveSync; 47 | -------------------------------------------------------------------------------- /compiler/native/nerdcore/src/class/number.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | namespace NerdCore::Class::NUMBER 25 | { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /compiler/native/nerdcore/src/class/number_header.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | namespace NerdCore::Class::NUMBER 25 | { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /compiler/native/nerdcore/src/classes.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | #pragma once 25 | 26 | #include "./class/array.h" 27 | #include "./class/function.h" 28 | #include "./class/native.h" 29 | #include "./class/struct.h" 30 | #include "./class/fixed_array.h" 31 | #include "./class/object.h" 32 | #include "./class/string.h" 33 | -------------------------------------------------------------------------------- /compiler/native/nerdcore/src/enum.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | namespace NerdCore::Enum 25 | { 26 | enum Type 27 | { 28 | Null, 29 | Boolean, 30 | Number, 31 | String, 32 | Native, 33 | NativeTPL, 34 | Struct, 35 | FixedArray, 36 | Array, 37 | Object, 38 | Function, 39 | }; 40 | } -------------------------------------------------------------------------------- /compiler/native/nerdcore/src/functions.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | NerdCore::VAR getArguments(int argc, char** argv) 25 | { 26 | NerdCore::VAR __NJS_ARGS = new NerdCore::Class::Array(); 27 | for( int i = 0; i < argc; i++) 28 | { 29 | __NJS_ARGS[i] = argv[i]; 30 | } 31 | return __NJS_ARGS; 32 | } 33 | -------------------------------------------------------------------------------- /compiler/native/nerdcore/src/native.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | #include "native/int.h" 25 | #include "native/double.h" 26 | -------------------------------------------------------------------------------- /compiler/native/nerdcore/src/native_header.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | #include "native/int_header.h" 25 | #include "native/double_header.h" 26 | -------------------------------------------------------------------------------- /compiler/native/nerdcore/src/nerd.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | #include "nerd.hpp" 25 | 26 | #include "functions.h" 27 | #include "native.h" 28 | #include "values.h" 29 | #include "class/number.h" 30 | #include "var.h" 31 | #include "objmgmt.h" 32 | #include "classes.h" 33 | #include "operator.h" 34 | #include "stdfn.h" -------------------------------------------------------------------------------- /compiler/native/nerdcore/src/stdfn_header.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | namespace NerdCore::Functions 25 | { 26 | NerdCore::VAR println(); 27 | NerdCore::VAR println(NerdCore::VAR _var); 28 | NerdCore::VAR print(); 29 | NerdCore::VAR print(NerdCore::VAR _var); 30 | } 31 | 32 | // no namespace 33 | NerdCore::VAR length_of(NerdCore::VAR _var); 34 | NerdCore::VAR size_of(NerdCore::VAR _var); -------------------------------------------------------------------------------- /compiler/native/nerdcore/test/array.cpp: -------------------------------------------------------------------------------- 1 | #include "../src/nerd.hpp" 2 | using namespace NerdCore; 3 | using namespace NerdCore::Global; 4 | using namespace NerdCore::Class; 5 | using namespace NerdCore::Functions; 6 | 7 | int main(int argc, char** argv) 8 | { 9 | var arr = new Array(); 10 | println(arr); 11 | 12 | var initArr = new Array(0, "one", 2, "three"); 13 | println(initArr); 14 | 15 | var initArr2 = {"zero", 1, "two", 3}; 16 | println(initArr2); 17 | 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /compiler/native/nerdcore/test/cast.cpp: -------------------------------------------------------------------------------- 1 | #include "../src/nerd.hpp" 2 | 3 | using namespace NerdCore; 4 | using namespace NerdCore::Global; 5 | using namespace NerdCore::Class; 6 | using namespace NerdCore::Functions; 7 | 8 | int main() 9 | { 10 | try 11 | { 12 | var _str = "string"; 13 | std::cout << "_str: " << _str << std::endl; 14 | var _nbr = 123; 15 | std::cout << "_nbr: " << _nbr << std::endl; 16 | const char* c = _str; 17 | std::cout << "char: " << c << std::endl; 18 | std::string s = _str; 19 | std::cout << "string: " << s << std::endl; 20 | std::string_view sv = _str; 21 | std::cout << "string_view: " << sv << std::endl; 22 | int i = _nbr; 23 | std::cout << "int: " << i << std::endl; 24 | double d = _nbr; 25 | std::cout << "double: " << d << std::endl; 26 | long long ll = _nbr; 27 | std::cout << "long long: " << ll << std::endl; 28 | bool b = _nbr; 29 | std::cout << "bool: " << b << std::endl; 30 | } 31 | catch(var& error) 32 | { 33 | println(error); 34 | } 35 | return 0; 36 | } -------------------------------------------------------------------------------- /compiler/native/nerdcore/test/native.cpp: -------------------------------------------------------------------------------- 1 | #include "../src/nerd.hpp" 2 | using namespace NerdCore; 3 | using namespace NerdCore::Global; 4 | using namespace NerdCore::Class; 5 | using namespace NerdCore::Functions; 6 | 7 | struct s 8 | { 9 | int i = 10; 10 | int j; 11 | }; 12 | 13 | s* typeStruct = new s(); 14 | 15 | int main(int argc, char** argv) 16 | { 17 | try 18 | { 19 | #if __cplusplus > 202002L 20 | auto __fn = []() {std::cout << "Hello" << std::endl;}; 21 | 22 | var _struct = new NativeTPL(new s({3,4})); 23 | std::cout << _struct.toNative(typeStruct)->i << std::endl; 24 | 25 | var _fn = new NativeTPL(__fn); 26 | _fn.toNative(__fn)(); 27 | #else 28 | var _struct = new NativeTPL(new s({3,4})); 29 | std::cout << _struct.toNative(typeStruct)->i << std::endl; 30 | #endif 31 | } 32 | catch(var e) 33 | { 34 | println(e); 35 | } 36 | return 0; 37 | } 38 | -------------------------------------------------------------------------------- /compiler/native/nerdcore/test/object.cpp: -------------------------------------------------------------------------------- 1 | #include "../src/nerd.hpp" 2 | using namespace NerdCore; 3 | using namespace NerdCore::Global; 4 | using namespace NerdCore::Class; 5 | using namespace NerdCore::Functions; 6 | 7 | int main(int argc, char** argv) 8 | { 9 | var args = getArguments(argc, argv); 10 | println(args); 11 | 12 | var o = new Object(); 13 | o["int"] = 1; 14 | o["string"] = "str"; 15 | println(o); 16 | 17 | var init = new Object( 18 | { 19 | {"one", 1}, // number 20 | {"two", "2"}, // string 21 | {"three", {1,2,3}}, // array 22 | {"four", new Object("key", "value")}, // sub object with only one key 23 | {"five", new Object({"key", 1})}, // another way with non string value 24 | {"six", new Object({ {"key", 2} })}, // another way with non string value 25 | }); 26 | println(init); 27 | 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /compiler/native/squel/wasm.cpp: -------------------------------------------------------------------------------- 1 | #define __NERD_ENV_WASM 2 | #include "nerdcore/src/nerd.hpp" 3 | 4 | using namespace NerdCore::Global; 5 | using namespace NerdCore::Functions; 6 | 7 | var __NERD_ENV = "wasm"; 8 | var __NERD_PLATFORM = "{{__PLATFORM__}}"; 9 | NerdCore::Global::var __NERD_ARGS = new NerdCore::Class::Array(); 10 | 11 | {INCLUDE} 12 | 13 | int main(int __NERD_VARLENGTH, char* __Nerd_Argv[]) 14 | { 15 | {DECL} 16 | 17 | NerdCore::VAR __NERD_VARARGS[__NERD_VARLENGTH]; 18 | for( int i = 0; i < __NERD_VARLENGTH; i++) 19 | { 20 | __NERD_ARGS[i] = __Nerd_Argv[i]; 21 | __NERD_VARARGS[i] = __Nerd_Argv[i]; 22 | } 23 | 24 | try 25 | { 26 | 27 | {INIT} 28 | 29 | #ifdef __NERD_INIT_RAND_SEED 30 | srand (time(NULL)); 31 | #endif 32 | 33 | { 34 | {CODE} 35 | } 36 | 37 | } 38 | catch(NerdCore::VAR __NERD_Global_Exception) 39 | { 40 | __NERD_Log_Console(__NERD_Global_Exception); 41 | exit(1); 42 | } 43 | return 0; 44 | } 45 | -------------------------------------------------------------------------------- /compiler/self/base/util/copyRecursive.js: -------------------------------------------------------------------------------- 1 | var copyRecursiveSync = function(src, dest) 2 | { 3 | if(!fs.existsSync(src)) 4 | { 5 | console.log("[!] Warning: " + src + " doesn't exist"); 6 | return; 7 | } 8 | if(fs.lstatSync( src ).isDirectory()) 9 | { 10 | var _newDest = path.dirname(dest); 11 | copyDirSync(src, _newDest, true); 12 | } 13 | else 14 | { 15 | var _path = []; 16 | 17 | var _newDest = path.dirname(dest); 18 | 19 | _path.push(_newDest); 20 | 21 | while(path.dirname(_newDest) != _newDest) 22 | { 23 | _newDest = path.dirname(_newDest); 24 | if(_newDest.indexOf(NERD_PATH) == 0) 25 | { 26 | _path.push(_newDest); 27 | } 28 | } 29 | 30 | for(var i = _path.length; i > -1; i--) 31 | { 32 | try 33 | { 34 | fs.mkdirSync(_path[i]); 35 | } 36 | catch(e){} 37 | } 38 | 39 | fs.copyFileSync(src, dest); 40 | } 41 | }; 42 | 43 | module.exports = copyRecursiveSync; 44 | -------------------------------------------------------------------------------- /example/arduino-lcd.ng: -------------------------------------------------------------------------------- 1 | var arduino = require("arduino"); 2 | var LCD = require("arduino-lcd"); 3 | 4 | var lcd = LCD(8, 9, 4, 5, 6, 7); 5 | 6 | lcd.clear(); 7 | lcd.begin(16, 2); 8 | lcd.print("Chrono:"); 9 | 10 | while(true) 11 | { 12 | lcd.setCursor(0,1); 13 | var _sec = arduino.seconds(); 14 | lcd.print(_sec); 15 | arduino.delay(1); 16 | } -------------------------------------------------------------------------------- /example/arduino.ng: -------------------------------------------------------------------------------- 1 | var arduino = require("arduino"); 2 | 3 | arduino.pinMode(arduino.led_builtin, arduino.output); 4 | 5 | while(true) 6 | { 7 | arduino.digitalWrite(arduino.led_builtin, arduino.high); 8 | arduino.delay(50); 9 | arduino.digitalWrite(arduino.led_builtin, arduino.low); 10 | arduino.delay(50); 11 | } -------------------------------------------------------------------------------- /example/args.ng: -------------------------------------------------------------------------------- 1 | var console = require("console"); 2 | 3 | var cliAgs = arguments(); // cli args 4 | 5 | console.log(); 6 | console.log("Cli Args:"); 7 | for(var i = 0; i < length_of(cliAgs); i++) 8 | { 9 | console.log("cliAgs", i, ":", cliAgs[i]); 10 | } 11 | 12 | var fn = function() 13 | { 14 | var fnArgs = arguments(); // local function args 15 | 16 | for(var i = 0; i < length_of(fnArgs); i++) 17 | { 18 | console.log("fnArgs", i, ":", fnArgs[i]); 19 | } 20 | }; 21 | 22 | console.log(); 23 | console.log(`FnArgs: fn(0, "one", 2, "three")`); 24 | fn(0, "one", 2, "three"); 25 | 26 | console.log(); 27 | console.log(`FnArgs: fn("Hello", "World", "!")`); 28 | fn("Hello", "World", "!"); -------------------------------------------------------------------------------- /example/circular_array.ng: -------------------------------------------------------------------------------- 1 | var console = require("console"); 2 | 3 | while (true) 4 | { 5 | var x = ["Hello Circular Array"]; 6 | var y = [x]; 7 | x[1] = y; 8 | console.log(x[1][0][0]); 9 | } 10 | -------------------------------------------------------------------------------- /example/circular_fixed_array.ng: -------------------------------------------------------------------------------- 1 | var console = require("console"); 2 | 3 | while (true) 4 | { 5 | var x = FixedArray(); 6 | x[0] = "Hello Circular Fixed Array"; 7 | var y = [x]; 8 | x[1] = y; 9 | console.log(x[1][0][0]); 10 | } -------------------------------------------------------------------------------- /example/circular_object.ng: -------------------------------------------------------------------------------- 1 | var console = require("console"); 2 | 3 | while (true) 4 | { 5 | var x = 6 | { 7 | a: "Hello Circular Object" 8 | }; // x = 1 9 | var y = 10 | { 11 | x: x 12 | }; // x = 2 y = 1 13 | x.y = y; // x = 2 y = 2 14 | console.log(x.y.x.y.x.y.x.a); 15 | } 16 | -------------------------------------------------------------------------------- /example/const.ng: -------------------------------------------------------------------------------- 1 | var _world = "world"; 2 | var _console = require("console"); 3 | 4 | var _fn = function(_const, assignable ) 5 | { 6 | assignable = _world; 7 | _console.log(_const, assignable); 8 | }; 9 | 10 | _fn("hello", _world); -------------------------------------------------------------------------------- /example/date.ng: -------------------------------------------------------------------------------- 1 | var date = require("date"); 2 | var console = require("console"); 3 | 4 | console.log(date.now()); -------------------------------------------------------------------------------- /example/exec.ng: -------------------------------------------------------------------------------- 1 | var console = require("console"); 2 | var cp = require("child_process"); 3 | 4 | var _args = arguments(); 5 | 6 | if(_args[1]) 7 | { 8 | console.log(cp.exec(_args[1])); 9 | } 10 | else 11 | { 12 | console.log("[*] Usage:", _args[0], "process_to_launch"); 13 | console.log("[*] example:", _args[0], "ls"); 14 | } 15 | -------------------------------------------------------------------------------- /example/exit.ng: -------------------------------------------------------------------------------- 1 | var zero = 0; 2 | 3 | exit(zero); -------------------------------------------------------------------------------- /example/fibo.ng: -------------------------------------------------------------------------------- 1 | var console = require("console"); 2 | 3 | var fibonacci = function(n) 4 | { 5 | if (n < 2) 6 | { 7 | return n; 8 | } 9 | 10 | return fibonacci(n - 2) + fibonacci(n - 1); 11 | }; 12 | console.log(fibonacci(44)); -------------------------------------------------------------------------------- /example/fiboit.ng: -------------------------------------------------------------------------------- 1 | var _console = require("console"); 2 | var a = 1; 3 | var b = 0; 4 | var c = 0; 5 | var n = 102; 6 | while (n > 0) 7 | { 8 | c = a; 9 | a = b + a; 10 | b = c; 11 | n--; 12 | } 13 | _console.log(b); -------------------------------------------------------------------------------- /example/functional.ng: -------------------------------------------------------------------------------- 1 | var console = require("console"); 2 | 3 | var Functional = function() 4 | { 5 | var obj = {}; 6 | obj.fn = function(_arg) 7 | { 8 | console.write(_arg); 9 | return obj; 10 | }; 11 | return obj; 12 | }; 13 | 14 | var a = Functional(); 15 | var b = a.fn("Hello "); 16 | var c = b.fn("world"); 17 | var d = c.fn("!"); 18 | 19 | console.log(""); 20 | 21 | d.fn("Good ").fn("Morning").fn("!"); 22 | -------------------------------------------------------------------------------- /example/hello.ng: -------------------------------------------------------------------------------- 1 | var console = require("console"); 2 | console.log("Hello", "World", "!"); -------------------------------------------------------------------------------- /example/http.ng: -------------------------------------------------------------------------------- 1 | var console = require("console"); 2 | var http = require("http"); 3 | 4 | var _port = 8080; 5 | 6 | var _cb = function(req, res) 7 | { 8 | /* API EXAMPLE 9 | console.log(req.getUrl()); 10 | console.log(req.getHeader("user-agent")); 11 | console.log(req.getMethod()); 12 | res.setHeader("server", "Nerd"); 13 | res.setStatus(200); 14 | res.write("test - "); 15 | */ 16 | 17 | res.end("Hello Nerd World"); 18 | }; 19 | 20 | var _listenCB = function() 21 | { 22 | console.log("Listening on port", _port); 23 | }; 24 | 25 | var server = http.createServer(_cb).listen(_port, _listenCB); 26 | -------------------------------------------------------------------------------- /example/http_post.ng: -------------------------------------------------------------------------------- 1 | var console = require("console"); 2 | var http = require("http"); 3 | 4 | var _port = 8080; 5 | 6 | var _endCB = function(req, res) 7 | { 8 | res.end("Hello Nerd World"); 9 | }; 10 | 11 | var _cb = function(req, res) 12 | { 13 | if(req.getMethod() == "post") 14 | { 15 | req.data = ""; 16 | req.onData = function(chunk, last) 17 | { 18 | console.log(chunk, last); 19 | req.data += chunk; 20 | if(last) 21 | { 22 | res.write("Received: " + req.data + "\n"); 23 | _endCB(req, res); 24 | } 25 | }; 26 | } 27 | else 28 | { 29 | _endCB(req, res); 30 | } 31 | }; 32 | 33 | var _listenCB = function() 34 | { 35 | console.log("Listening on port", _port); 36 | }; 37 | 38 | var server = http.createServer(_cb).listen(_port, _listenCB); -------------------------------------------------------------------------------- /example/json.ng: -------------------------------------------------------------------------------- 1 | var _json = require("JSON"); 2 | var _console = require("console"); 3 | 4 | var obj = 5 | { 6 | "key": "value", 7 | }; 8 | 9 | var str = "{\"name\":\"Nerd\"}"; 10 | 11 | 12 | _console.log(_json.stringify(obj)); 13 | _console.log(_json.parse(str).name); -------------------------------------------------------------------------------- /example/loop.ng: -------------------------------------------------------------------------------- 1 | var console = require("console"); 2 | var a = 10; 3 | 4 | var obj = 5 | { 6 | a: "a", 7 | b: "b", 8 | c: "c", 9 | d: "d", 10 | }; 11 | 12 | while(a--) 13 | { 14 | console.log(a); 15 | } 16 | 17 | for(var i = 0; i < 10; i++) 18 | { 19 | console.log("i:", i); 20 | } 21 | 22 | do 23 | { 24 | console.log("a:", a); 25 | a++; 26 | }while(a < 10); 27 | 28 | for(var key in obj) 29 | { 30 | console.log(key, ":", obj[key]); 31 | } -------------------------------------------------------------------------------- /example/match.ng: -------------------------------------------------------------------------------- 1 | var console = require("console"); 2 | var regexp = require("regexp"); 3 | 4 | console.log(regexp.match(".*.", "1234")); -------------------------------------------------------------------------------- /example/native.ng: -------------------------------------------------------------------------------- 1 | var inNative = "Hello from native"; 2 | 3 | {{ 4 | std::cout << inNative << "!" << std::endl; 5 | }} -------------------------------------------------------------------------------- /example/nested_object.ng: -------------------------------------------------------------------------------- 1 | var console = require("console"); 2 | 3 | var a = { 4 | b: "ok", 5 | c: "hello", 6 | d: { 7 | x: "z", 8 | y: {}, 9 | p: "q", 10 | }, 11 | e: "e", 12 | }; 13 | 14 | 15 | 16 | console.log(a.d.p); -------------------------------------------------------------------------------- /example/new.ng: -------------------------------------------------------------------------------- 1 | var console = require("console"); 2 | 3 | var a = function() 4 | { 5 | this.dic = "Hello"; 6 | return this; 7 | }; 8 | a.prototype.dic = "ok"; 9 | a.prototype = Object(); 10 | a.prototype.talk = function() 11 | { 12 | console.log(this.dic); 13 | } 14 | 15 | var obj1 = new a(); 16 | obj1.dic = "ownProp"; 17 | obj1.talk(); 18 | 19 | var obj2 = new a(); 20 | obj2.talk(); -------------------------------------------------------------------------------- /example/object_keys.ng: -------------------------------------------------------------------------------- 1 | var console = require("console"); 2 | var object = require("object"); 3 | 4 | var obj = 5 | { 6 | "a": 0, 7 | "b": 1, 8 | "c": 8, 9 | "d": "ahah", 10 | }; 11 | 12 | console.log(object.keys(obj)); -------------------------------------------------------------------------------- /example/os.ng: -------------------------------------------------------------------------------- 1 | var os = require("os"); 2 | var console = require("console"); 3 | 4 | 5 | console.log(os.version(), os.arch()); -------------------------------------------------------------------------------- /example/path.ng: -------------------------------------------------------------------------------- 1 | var _path = require("path"); 2 | var _console = require("console"); 3 | 4 | _console.log(_path.join("a", "b", "c")); -------------------------------------------------------------------------------- /example/readfile.ng: -------------------------------------------------------------------------------- 1 | var console = require("console"); 2 | var fs = require("fs"); 3 | 4 | var args = arguments(); 5 | 6 | if(args[1]) 7 | { 8 | console.log(fs.readFile(args[1])); 9 | } 10 | else 11 | { 12 | console.log("[*] Usage:", args[0], " file_to_read.txt"); 13 | } -------------------------------------------------------------------------------- /example/thread.ng: -------------------------------------------------------------------------------- 1 | var _thread = require("thread"); 2 | var thread = _thread(); 3 | 4 | var console = require("console"); 5 | 6 | var fn1 = function() 7 | { 8 | for(var i = 0; i < 10; i++) 9 | { 10 | console.log("fn1"); 11 | } 12 | }; 13 | 14 | var fn2 = function() 15 | { 16 | for(var i = 0; i < 10; i++) 17 | { 18 | console.log("fn2"); 19 | } 20 | }; 21 | 22 | thread.run(fn1); 23 | 24 | thread.run(fn2); 25 | 26 | thread.waitForAll(); 27 | -------------------------------------------------------------------------------- /example/throw.ng: -------------------------------------------------------------------------------- 1 | var console = require("console"); 2 | var error = require("error"); 3 | 4 | try 5 | { 6 | error.throw("An error"); 7 | } 8 | catch(e) 9 | { 10 | console.log(e); 11 | } -------------------------------------------------------------------------------- /example/wasm.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /example/wasm_binding.ng: -------------------------------------------------------------------------------- 1 | var wasm = require("wasm"); 2 | 3 | // function proto for binding : string(string) 4 | var callFromNerd = function(_data) 5 | { 6 | if(_data) 7 | { 8 | wasm.run("document.write('

" + _data + "

');"); 9 | } 10 | else 11 | { 12 | wasm.run("document.write('

No Data

');"); 13 | } 14 | return "Executed from wasm"; 15 | }; 16 | 17 | // bind function to be executed in Browser env with Module.call(_functionName, _data); 18 | wasm.bind("callFromNerd", callFromNerd); 19 | 20 | // Fire a JS function to know when env is set up, see wasm.html 21 | wasm.run("WasmLoaded();"); -------------------------------------------------------------------------------- /external/arduino/avr/bootloaders/atmega8/ATmegaBOOT.txt: -------------------------------------------------------------------------------- 1 | Configured with: ../src/configure -v --enable-languages=c,c++ --prefix=/usr/lib --infodir=/usr/share/info --mandir=/usr/share/man --bindir=/usr/bin --libexecdir=/usr/lib --libdir=/usr/lib --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --disable-libssp --build=i686-linux-gnu --host=i686-linux-gnu --target=avr 2 | Thread model: single 3 | gcc version 4.3.5 (GCC) 4 | 5 | -------------------------------------------------------------------------------- /external/arduino/avr/bootloaders/caterina-Arduino_Robot/Caterina-Robot.txt: -------------------------------------------------------------------------------- 1 | Builds against LUFA version 111009 2 | make version 3.81 3 | avrdude version 5.11 4 | 5 | All AVR tools except avrdude were installed by CrossPack 20100115: 6 | avr-gcc version 4.3.3 (GCC) 7 | Thread model: single 8 | Configured with: ../configure —prefix=/usr/local/CrossPack-AVR-20100115 —disable-dependency-tracking —disable-nls —disable-werror —target=avr —enable-languages=c,c++ —disable-nls —disable-libssp —with-dwarf2 9 | avr-libc version 1.6.7 10 | binutils version 2.19 11 | 12 | -------------------------------------------------------------------------------- /external/arduino/avr/bootloaders/caterina-Arduino_Robot/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NerdLang/nerd/400b367708c2fee58060f85fb8546a522c8add9c/external/arduino/avr/bootloaders/caterina-Arduino_Robot/Makefile -------------------------------------------------------------------------------- /external/arduino/avr/bootloaders/caterina-LilyPadUSB/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NerdLang/nerd/400b367708c2fee58060f85fb8546a522c8add9c/external/arduino/avr/bootloaders/caterina-LilyPadUSB/Makefile -------------------------------------------------------------------------------- /external/arduino/avr/bootloaders/caterina-LilyPadUSB/Readme.txt: -------------------------------------------------------------------------------- 1 | Building the bootloader for the LilyPadUSB 2 | 1. Download the LUFA-111009 file (http://fourwalledcubicle.com/blog/2011/10/lufa-111009-released/). 3 | 2. Extract that file directly to the Caterina-LilyPadUSB bootloader directory. 4 | 3. Open a command prompt in the Caterina-LilyPadUSB bootloader directory. 5 | 4. Type 'make'. 6 | 5. Enjoy! 7 | 8 | Programming the bootloader for the LilyPadUSB 9 | 1. Open a command prompt in the Caterina-LilyPadUSB folder. 10 | 2. Connect your programmer- use a 2x3 .1" header, pressed against the programming vias. 11 | 3. Type 'make program' into the command prompt. -------------------------------------------------------------------------------- /external/arduino/avr/bootloaders/caterina/Caterina-Esplora.txt: -------------------------------------------------------------------------------- 1 | LUFA: 111009 2 | make: 3.81 3 | avrdude: 5.11.1 4 | avr-libc: 1.6.7 5 | binutils-avr: 2.19 6 | gcc-avr 4.3.3 7 | -------------------------------------------------------------------------------- /external/arduino/avr/bootloaders/caterina/Caterina-Leonardo.txt: -------------------------------------------------------------------------------- 1 | Builds against LUFA version 111009 2 | make version 3.81 3 | avrdude version 5.11 4 | 5 | All AVR tools except avrdude were installed by CrossPack 20100115: 6 | avr-gcc version 4.3.3 (GCC) 7 | Thread model: single 8 | Configured with: ../configure —prefix=/usr/local/CrossPack-AVR-20100115 —disable-dependency-tracking —disable-nls —disable-werror —target=avr —enable-languages=c,c++ —disable-nls —disable-libssp —with-dwarf2 9 | avr-libc version 1.6.7 10 | binutils version 2.19 11 | 12 | -------------------------------------------------------------------------------- /external/arduino/avr/bootloaders/caterina/Caterina-Micro.txt: -------------------------------------------------------------------------------- 1 | Builds against LUFA version 111009 2 | make version 3.81 3 | avrdude version 5.11 4 | 5 | All AVR tools except avrdude were installed by CrossPack 20100115: 6 | avr-gcc version 4.3.3 (GCC) 7 | Thread model: single 8 | Configured with: ../configure —prefix=/usr/local/CrossPack-AVR-20100115 —disable-dependency-tracking —disable-nls —disable-werror —target=avr —enable-languages=c,c++ —disable-nls —disable-libssp —with-dwarf2 9 | avr-libc version 1.6.7 10 | binutils version 2.19 11 | 12 | -------------------------------------------------------------------------------- /external/arduino/avr/bootloaders/caterina/Esplora-prod-firmware-2012-12-10.txt: -------------------------------------------------------------------------------- 1 | LUFA: 111009 2 | make: 3.81 3 | avrdude: 5.11.1 4 | avr-libc: 1.6.7 5 | binutils-avr: 2.19 6 | gcc-avr 4.3.3 7 | -------------------------------------------------------------------------------- /external/arduino/avr/bootloaders/caterina/Leonardo-prod-firmware-2012-04-26.txt: -------------------------------------------------------------------------------- 1 | Builds against LUFA version 111009 2 | make version 3.81 3 | avrdude version 5.11 4 | 5 | All AVR tools except avrdude were installed by CrossPack 20100115: 6 | avr-gcc version 4.3.3 (GCC) 7 | Thread model: single 8 | Configured with: ../configure —prefix=/usr/local/CrossPack-AVR-20100115 —disable-dependency-tracking —disable-nls —disable-werror —target=avr —enable-languages=c,c++ —disable-nls —disable-libssp —with-dwarf2 9 | avr-libc version 1.6.7 10 | binutils version 2.19 11 | 12 | -------------------------------------------------------------------------------- /external/arduino/avr/bootloaders/caterina/Leonardo-prod-firmware-2012-12-10.txt: -------------------------------------------------------------------------------- 1 | Builds against LUFA version 111009 2 | make version 3.81 3 | avrdude version 5.11 4 | 5 | All AVR tools except avrdude were installed by CrossPack 20100115: 6 | avr-gcc version 4.3.3 (GCC) 7 | Thread model: single 8 | Configured with: ../configure —prefix=/usr/local/CrossPack-AVR-20100115 —disable-dependency-tracking —disable-nls —disable-werror —target=avr —enable-languages=c,c++ —disable-nls —disable-libssp —with-dwarf2 9 | avr-libc version 1.6.7 10 | binutils version 2.19 11 | 12 | -------------------------------------------------------------------------------- /external/arduino/avr/bootloaders/caterina/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NerdLang/nerd/400b367708c2fee58060f85fb8546a522c8add9c/external/arduino/avr/bootloaders/caterina/Makefile -------------------------------------------------------------------------------- /external/arduino/avr/bootloaders/caterina/Micro-prod-firmware-2012-11-23.txt: -------------------------------------------------------------------------------- 1 | Builds against LUFA version 111009 2 | make version 3.81 3 | avrdude version 5.11 4 | 5 | All AVR tools except avrdude were installed by CrossPack 20100115: 6 | avr-gcc version 4.3.3 (GCC) 7 | Thread model: single 8 | Configured with: ../configure —prefix=/usr/local/CrossPack-AVR-20100115 —disable-dependency-tracking —disable-nls —disable-werror —target=avr —enable-languages=c,c++ —disable-nls —disable-libssp —with-dwarf2 9 | avr-libc version 1.6.7 10 | binutils version 2.19 11 | 12 | -------------------------------------------------------------------------------- /external/arduino/avr/bootloaders/caterina/Micro-prod-firmware-2012-12-10.txt: -------------------------------------------------------------------------------- 1 | Builds against LUFA version 111009 2 | make version 3.81 3 | avrdude version 5.11 4 | 5 | All AVR tools except avrdude were installed by CrossPack 20100115: 6 | avr-gcc version 4.3.3 (GCC) 7 | Thread model: single 8 | Configured with: ../configure —prefix=/usr/local/CrossPack-AVR-20100115 —disable-dependency-tracking —disable-nls —disable-werror —target=avr —enable-languages=c,c++ —disable-nls —disable-libssp —with-dwarf2 9 | avr-libc version 1.6.7 10 | binutils version 2.19 11 | 12 | -------------------------------------------------------------------------------- /external/arduino/avr/bootloaders/gemma/README.md: -------------------------------------------------------------------------------- 1 | Arduino Gemma Bootloader 2 | ======================== 3 | 4 | The Arduino Gemma Bootloader is based on the Adafruit Trinket/Gemma Bootloader. In the Arduino Gemma bootloader the USB VID&PID, the Manufacturer name and the Device name parameters are changed. 5 | 6 | The source code of the bootloader of the version used at the compile time can be found at the following link: https://github.com/adafruit/Adafruit-Trinket-Gemma-Bootloader/tree/3bc1bb561273535d4d493518a233a3a1fccf6b76 7 | 8 | The *'usbconfig.h'* and the *'usbconfig.patch'* files are provided if you want to recompile the bootloader. 9 | You only need to replace the original *'usbconfig.h'* file with this one or patch it with the provided patch file. 10 | 11 | **Please note: you cannot use the Arduino USB VID/PID for your own non-Gemma products or projects. Purchase a USB VID for yourself at** http://www.usb.org/developers/vendor/ 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /external/arduino/avr/bootloaders/gemma/usbconfig.patch: -------------------------------------------------------------------------------- 1 | 203c203 2 | < #define USB_CFG_VENDOR_ID 0x81, 0x17 /* = 0x16c0 = 5824 = voti.nl */ 3 | --- 4 | > #define USB_CFG_VENDOR_ID 0x41, 0x23 /* = 0x16c0 = 5824 = voti.nl */ 5 | 208c208 6 | < #define USB_CFG_DEVICE_ID 0x9F, 0x0C /* = 0x05dc = 1500 */ 7 | --- 8 | > #define USB_CFG_DEVICE_ID 0x9F, 0x0c /* = 0x05dc = 1500 */ 9 | 215c215 10 | < #define USB_CFG_DEVICE_VERSION 0x05, 0x01 11 | --- 12 | > #define USB_CFG_DEVICE_VERSION 0x00, 0x01 13 | 218,219c218,219 14 | < #define USB_CFG_VENDOR_NAME 'A','d','a','f','r','u','i','t' 15 | < #define USB_CFG_VENDOR_NAME_LEN 8 16 | --- 17 | > #define USB_CFG_VENDOR_NAME 'A','r','d','u','i','n','o','.','c','c' 18 | > #define USB_CFG_VENDOR_NAME_LEN 10 19 | 228,229c228,229 20 | < #define USB_CFG_DEVICE_NAME 'T','r','i','n','k','e','t' 21 | < #define USB_CFG_DEVICE_NAME_LEN 7 22 | --- 23 | > #define USB_CFG_DEVICE_NAME 'G','e','m','m','a' 24 | > #define USB_CFG_DEVICE_NAME_LEN 5 25 | -------------------------------------------------------------------------------- /external/arduino/avr/bootloaders/optiboot/makeall: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | make clean 3 | # 4 | # The "big three" standard bootloaders. 5 | make atmega8 6 | make atmega168 7 | make atmega328 8 | # 9 | # additional buildable platforms of 10 | # somewhat questionable support level 11 | make lilypad 12 | make lilypad_resonator 13 | make pro8 14 | make pro16 15 | make pro20 16 | make atmega328_pro8 17 | make sanguino 18 | make mega 19 | make atmega88 20 | make luminet 21 | -------------------------------------------------------------------------------- /external/arduino/avr/bootloaders/optiboot/omake: -------------------------------------------------------------------------------- 1 | echo ../../../tools/avr/bin/make OS=macosx ENV=arduino $* 2 | ../../../tools/avr/bin/make OS=macosx ENV=arduino $* 3 | -------------------------------------------------------------------------------- /external/arduino/avr/bootloaders/optiboot/omake.bat: -------------------------------------------------------------------------------- 1 | ..\..\..\tools\avr\utils\bin\make OS=windows ENV=arduino %* 2 | -------------------------------------------------------------------------------- /external/arduino/avr/bootloaders/optiboot/optiboot_atmega8.hex: -------------------------------------------------------------------------------- 1 | :101E000011248FE594E09EBF8DBF84B714BE81FF7F 2 | :101E1000E2D085E08EBD82E08BB988E18AB986E8A0 3 | :101E200080BD80E189B98EE0C2D0BD9A96E020E302 4 | :101E30003CEF54E040E23DBD2CBD58BF08B602FE69 5 | :101E4000FDCF88B3842788BBA8959150A1F7CC24F7 6 | :101E5000DD2488248394B5E0AB2EA1E19A2EF3E033 7 | :101E6000BF2E9ED0813461F49BD0082FA4D00238BD 8 | :101E700011F0013811F484E001C083E08DD089C0F5 9 | :101E8000823411F484E103C0853419F485E09BD0D9 10 | :101E900080C0853579F484D0E82EFF2481D0082FC6 11 | :101EA00010E0102F00270E291F29000F111F83D0CB 12 | :101EB00068016FC0863521F484E085D080E0DECFF4 13 | :101EC000843609F040C06CD06BD0082F69D080E018 14 | :101ED000C81688E1D80618F4F601B7BEE895C0E048 15 | :101EE000D1E05ED089930C17E1F7F0E0CF16F8E16E 16 | :101EF000DF0618F0F601B7BEE8955DD007B600FC26 17 | :101F0000FDCFA601A0E0B1E02C9130E011968C91BC 18 | :101F1000119790E0982F8827822B932B1296FA0125 19 | :101F20000C0187BEE89511244E5F5F4FF1E0A034AD 20 | :101F3000BF0751F7F601A7BEE89507B600FCFDCF35 21 | :101F400097BEE89526C08437B1F42AD029D0F82E60 22 | :101F500027D031D0F601EF2C8F010F5F1F4F8491F6 23 | :101F60001BD0EA94F801C1F70894C11CD11CFA9463 24 | :101F7000CF0CD11C0EC0853739F41DD08EE10CD0AA 25 | :101F800083E90AD087E07ACF813511F488E00FD059 26 | :101F900012D080E101D065CF5D9BFECF8CB9089552 27 | :101FA0005F9BFECF5C9901C0A8958CB1089598E124 28 | :101FB00091BD81BD0895F4DF803219F088E0F7DF2C 29 | :101FC000FFCF84E1E9CF1F93182FEADF1150E9F723 30 | :101FD000F2DF1F91089580E0EADFEE27FF270994E2 31 | :021FFE000404D9 32 | :0400000300001E00DB 33 | :00000001FF 34 | -------------------------------------------------------------------------------- /external/arduino/avr/bootloaders/stk500v2/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NerdLang/nerd/400b367708c2fee58060f85fb8546a522c8add9c/external/arduino/avr/bootloaders/stk500v2/Makefile -------------------------------------------------------------------------------- /external/arduino/avr/bootloaders/stk500v2/STK500V2.pnproj: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /external/arduino/avr/bootloaders/stk500v2/STK500V2.pnps: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /external/arduino/avr/bootloaders/stk500v2/stk500boot.ppg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /external/arduino/avr/cores/arduino/Printable.h: -------------------------------------------------------------------------------- 1 | /* 2 | Printable.h - Interface class that allows printing of complex types 3 | Copyright (c) 2011 Adrian McEwen. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef Printable_h 21 | #define Printable_h 22 | 23 | #include 24 | 25 | class Print; 26 | 27 | /** The Printable class provides a way for new classes to allow themselves to be printed. 28 | By deriving from Printable and implementing the printTo method, it will then be possible 29 | for users to print out instances of this class by passing them into the usual 30 | Print::print and Print::println methods. 31 | */ 32 | 33 | class Printable 34 | { 35 | public: 36 | virtual size_t printTo(Print& p) const = 0; 37 | }; 38 | 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /external/arduino/avr/cores/arduino/Server.h: -------------------------------------------------------------------------------- 1 | /* 2 | Server.h - Base class that provides Server 3 | Copyright (c) 2011 Adrian McEwen. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef server_h 21 | #define server_h 22 | 23 | #include "Print.h" 24 | 25 | class Server : public Print { 26 | public: 27 | virtual void begin() =0; 28 | }; 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /external/arduino/avr/cores/arduino/abi.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014 Arduino. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #include 20 | 21 | extern "C" void __cxa_pure_virtual(void) __attribute__ ((__noreturn__)); 22 | extern "C" void __cxa_deleted_virtual(void) __attribute__ ((__noreturn__)); 23 | 24 | void __cxa_pure_virtual(void) { 25 | // We might want to write some diagnostics to uart in this case 26 | //std::terminate(); 27 | abort(); 28 | } 29 | 30 | void __cxa_deleted_virtual(void) { 31 | // We might want to write some diagnostics to uart in this case 32 | //std::terminate(); 33 | abort(); 34 | } 35 | 36 | -------------------------------------------------------------------------------- /external/arduino/avr/cores/arduino/hooks.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012 Arduino. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | /** 20 | * Empty yield() hook. 21 | * 22 | * This function is intended to be used by library writers to build 23 | * libraries or sketches that supports cooperative threads. 24 | * 25 | * Its defined as a weak symbol and it can be redefined to implement a 26 | * real cooperative scheduler. 27 | */ 28 | static void __empty() { 29 | // Empty 30 | } 31 | //void yield(void) __attribute__ ((weak, alias("__empty"))); 32 | void yield() {__empty();} -------------------------------------------------------------------------------- /external/arduino/avr/cores/arduino/new.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014 Arduino. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #include 20 | 21 | void *operator new(size_t size) { 22 | return malloc(size); 23 | } 24 | 25 | void *operator new[](size_t size) { 26 | return malloc(size); 27 | } 28 | 29 | void * operator new(size_t size, void * ptr) noexcept { 30 | (void)size; 31 | return ptr; 32 | } 33 | 34 | void operator delete(void * ptr) { 35 | free(ptr); 36 | } 37 | 38 | void operator delete[](void * ptr) { 39 | free(ptr); 40 | } 41 | 42 | -------------------------------------------------------------------------------- /external/arduino/avr/cores/arduino/new.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014 Arduino. All right reserved. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | See the GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef NEW_H 20 | #define NEW_H 21 | 22 | #include 23 | 24 | void * operator new(size_t size); 25 | void * operator new[](size_t size); 26 | //void * operator new(size_t size, void * ptr) noexcept; 27 | void operator delete(void * ptr); 28 | void operator delete[](void * ptr); 29 | 30 | #endif 31 | 32 | -------------------------------------------------------------------------------- /external/arduino/avr/extras/pack.release.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | # pack.*.bash - Bash script to help packaging avr core releases. 4 | # Copyright (c) 2015 Arduino LLC. All right reserved. 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | # Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | 20 | VERSION=`grep version= platform.txt | sed 's/version=//g'` 21 | 22 | PWD=`pwd` 23 | FOLDERNAME=`basename $PWD` 24 | THIS_SCRIPT_NAME=`basename $0` 25 | 26 | rm -f avr-$VERSION.tar.bz2 27 | 28 | cd .. 29 | tar --transform "s|$FOLDERNAME|$FOLDERNAME-$VERSION|g" --exclude=extras/** --exclude=.git* --exclude=.idea -cjf avr-$VERSION.tar.bz2 $FOLDERNAME 30 | cd - 31 | 32 | mv ../avr-$VERSION.tar.bz2 . 33 | 34 | -------------------------------------------------------------------------------- /external/arduino/avr/firmwares/arduinoISP/readme.txt: -------------------------------------------------------------------------------- 1 | 2 | You can download the ArduinoISP firmware source files from: 3 | 4 | https://github.com/arduino/ArduinoISP 5 | 6 | -------------------------------------------------------------------------------- /external/arduino/avr/firmwares/atmegaxxu2/arduino-usbdfu/makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NerdLang/nerd/400b367708c2fee58060f85fb8546a522c8add9c/external/arduino/avr/firmwares/atmegaxxu2/arduino-usbdfu/makefile -------------------------------------------------------------------------------- /external/arduino/avr/firmwares/atmegaxxu2/arduino-usbdfu/readme.txt: -------------------------------------------------------------------------------- 1 | To setup the project and program an ATMEG8U2 with the Arduino USB DFU bootloader: 2 | 1. unpack the source into LUFA's Bootloader directory 3 | 2. set ARDUINO_MODEL_PID in the makefile as appropriate 4 | 3. do "make clean; make; make program" 5 | 6 | Check that the board enumerates as either "Arduino Uno DFU" or "Arduino Mega 2560 DFU". Test by uploading the Arduino-usbserial application firmware (see instructions in Arduino-usbserial directory) 7 | 8 | -------------------------------------------------------------------------------- /external/arduino/avr/firmwares/atmegaxxu2/arduino-usbserial/makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NerdLang/nerd/400b367708c2fee58060f85fb8546a522c8add9c/external/arduino/avr/firmwares/atmegaxxu2/arduino-usbserial/makefile -------------------------------------------------------------------------------- /external/arduino/avr/firmwares/atmegaxxu2/arduino-usbserial/readme.txt: -------------------------------------------------------------------------------- 1 | To setup the project and upload the Arduino usbserial application firmware to an ATMEGA8U2 using the Arduino USB DFU bootloader: 2 | 1. unpack the source into LUFA's Projects directory 3 | 2. set ARDUINO_MODEL_PID in the makefile as appropriate 4 | 3. do "make clean; make" 5 | 4. put the 8U2 into USB DFU mode: 6 | 4.a. assert and hold the 8U2's RESET line 7 | 4.b. assert and hold the 8U2's HWB line 8 | 4.c. release the 8U2's RESET line 9 | 4.d. release the 8U2's HWB line 10 | 5. confirm that the board enumerates as either "Arduino Uno DFU" or "Arduino Mega 2560 DFU" 11 | 6. do "make dfu" (OS X or Linux - dfu-programmer must be installed first) or "make flip" (Windows - Flip must be installed first) 12 | 13 | Check that the board enumerates as either "Arduino Uno" or "Arduino Mega 2560". Test by uploading a new Arduino sketch from the Arduino IDE. 14 | -------------------------------------------------------------------------------- /external/arduino/avr/firmwares/wifishield/binary/wifiHD.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NerdLang/nerd/400b367708c2fee58060f85fb8546a522c8add9c/external/arduino/avr/firmwares/wifishield/binary/wifiHD.elf -------------------------------------------------------------------------------- /external/arduino/avr/firmwares/wifishield/binary/wifiHD_2_1.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NerdLang/nerd/400b367708c2fee58060f85fb8546a522c8add9c/external/arduino/avr/firmwares/wifishield/binary/wifiHD_2_1.elf -------------------------------------------------------------------------------- /external/arduino/avr/firmwares/wifishield/binary/wifi_dnld.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NerdLang/nerd/400b367708c2fee58060f85fb8546a522c8add9c/external/arduino/avr/firmwares/wifishield/binary/wifi_dnld.elf -------------------------------------------------------------------------------- /external/arduino/avr/firmwares/wifishield/binary/wifi_dnld_2_1.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NerdLang/nerd/400b367708c2fee58060f85fb8546a522c8add9c/external/arduino/avr/firmwares/wifishield/binary/wifi_dnld_2_1.elf -------------------------------------------------------------------------------- /external/arduino/avr/firmwares/wifishield/wifiHD/Release/wifiHD.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NerdLang/nerd/400b367708c2fee58060f85fb8546a522c8add9c/external/arduino/avr/firmwares/wifishield/wifiHD/Release/wifiHD.elf -------------------------------------------------------------------------------- /external/arduino/avr/firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/COMPONENTS/WIFI/HD/v2.7.0/UCR1/GCC/lib_ucr1_hd_sdio_v2.7.0.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NerdLang/nerd/400b367708c2fee58060f85fb8546a522c8add9c/external/arduino/avr/firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/COMPONENTS/WIFI/HD/v2.7.0/UCR1/GCC/lib_ucr1_hd_sdio_v2.7.0.a -------------------------------------------------------------------------------- /external/arduino/avr/firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/COMPONENTS/WIFI/HD/v2.7.0/UCR1/GCC/lib_ucr1_hd_spi_v2.7.0.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NerdLang/nerd/400b367708c2fee58060f85fb8546a522c8add9c/external/arduino/avr/firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/COMPONENTS/WIFI/HD/v2.7.0/UCR1/GCC/lib_ucr1_hd_spi_v2.7.0.a -------------------------------------------------------------------------------- /external/arduino/avr/firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/COMPONENTS/WIFI/HD/v2.7.0/UCR1/GCC/lib_ucr1_hd_wl_sta_intwpa_v2.7.0.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NerdLang/nerd/400b367708c2fee58060f85fb8546a522c8add9c/external/arduino/avr/firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/COMPONENTS/WIFI/HD/v2.7.0/UCR1/GCC/lib_ucr1_hd_wl_sta_intwpa_v2.7.0.a -------------------------------------------------------------------------------- /external/arduino/avr/firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/COMPONENTS/WIFI/HD/v2.7.0/UCR2/GCC/lib_ucr2_hd_sdio_v2.7.0.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NerdLang/nerd/400b367708c2fee58060f85fb8546a522c8add9c/external/arduino/avr/firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/COMPONENTS/WIFI/HD/v2.7.0/UCR2/GCC/lib_ucr2_hd_sdio_v2.7.0.a -------------------------------------------------------------------------------- /external/arduino/avr/firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/COMPONENTS/WIFI/HD/v2.7.0/UCR2/GCC/lib_ucr2_hd_spi_v2.7.0.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NerdLang/nerd/400b367708c2fee58060f85fb8546a522c8add9c/external/arduino/avr/firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/COMPONENTS/WIFI/HD/v2.7.0/UCR2/GCC/lib_ucr2_hd_spi_v2.7.0.a -------------------------------------------------------------------------------- /external/arduino/avr/firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/COMPONENTS/WIFI/HD/v2.7.0/UCR2/GCC/lib_ucr2_hd_wl_sta_intwpa_v2.7.0.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NerdLang/nerd/400b367708c2fee58060f85fb8546a522c8add9c/external/arduino/avr/firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/COMPONENTS/WIFI/HD/v2.7.0/UCR2/GCC/lib_ucr2_hd_wl_sta_intwpa_v2.7.0.a -------------------------------------------------------------------------------- /external/arduino/avr/firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/COMPONENTS/WIFI/HD/v2.7.0/revision.txt: -------------------------------------------------------------------------------- 1 | Revision: 2491 2 | -------------------------------------------------------------------------------- /external/arduino/avr/firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-port-1.3.2/HD/if/include/arch/perf.h: -------------------------------------------------------------------------------- 1 | #ifndef __PERF_H__ 2 | #define __PERF_H__ 3 | 4 | #define PERF_START /* null definition */ 5 | #define PERF_STOP(x) /* null definition */ 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /external/arduino/avr/firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-port-1.3.2/HD/if/include/netif/wlif.h: -------------------------------------------------------------------------------- 1 | #ifndef __NETIF_NRWLANIF_H__ 2 | #define __NETIF_NRWLANIF_H__ 3 | 4 | #include "lwip/netif.h" 5 | #include "lwip/err.h" 6 | 7 | err_t wlif_init(struct netif *netif); 8 | void wlif_poll(struct netif *netif); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /external/arduino/avr/firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-port-1.3.2/HD/readme.txt: -------------------------------------------------------------------------------- 1 | This directory is specific to the WIFI H&D SPB104 components (\COMPONENTS\WIFI\HD_SPB104). 2 | -------------------------------------------------------------------------------- /external/arduino/avr/firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS/libnewlib_addons-at32ucr2-speed_opt.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NerdLang/nerd/400b367708c2fee58060f85fb8546a522c8add9c/external/arduino/avr/firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS/libnewlib_addons-at32ucr2-speed_opt.a -------------------------------------------------------------------------------- /external/arduino/avr/firmwares/wifishield/wifiHD/src/lwip_setup.h: -------------------------------------------------------------------------------- 1 | #ifndef _LWIP_SETUP_H 2 | #define _LWIP_SETUP_H 3 | 4 | #define INIT_IP_CONFIG 0xff 5 | #define STATIC_IP_CONFIG 0 6 | #define DYNAMIC_IP_CONFIG 1 7 | 8 | struct net_cfg { 9 | struct netif *netif; /* lwip network interface */ 10 | uint8_t dhcp_enabled; 11 | uint8_t dhcp_running; 12 | }; 13 | 14 | struct ctx_server { 15 | struct net_cfg net_cfg; 16 | uint8_t wl_init_complete; 17 | }; 18 | 19 | /*! Start the IP stack. 20 | * If cfg->netif must have been allocated and lwip_init() 21 | * must have been called before this function is called 22 | * (since the IP stack may have to be polled before this 23 | * function can be called). 24 | */ 25 | int start_ip_stack(struct net_cfg *cfg, 26 | struct ip_addr ipaddr, 27 | struct ip_addr netmask, 28 | struct ip_addr gw); 29 | 30 | #endif /* _LWIP_SETUP_H */ 31 | -------------------------------------------------------------------------------- /external/arduino/avr/firmwares/wifishield/wifiHD/src/nvram.h: -------------------------------------------------------------------------------- 1 | #ifndef NVRAM_H 2 | #define NVRAM_H 3 | 4 | #include 5 | 6 | int nvram_init(void); 7 | int nvram_read(uint32_t addr, void *data, uint32_t len); 8 | int nvram_write(uint32_t addr, const void *data, uint32_t len); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /external/arduino/avr/firmwares/wifishield/wifiHD/src/wl_definitions.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wl_definitions.h 3 | * 4 | * Created on: Mar 6, 2011 5 | * Author: mlf by Metodo2 srl 6 | */ 7 | 8 | #ifndef WL_DEFINITIONS_H_ 9 | #define WL_DEFINITIONS_H_ 10 | 11 | // Maximum size of a SSID 12 | #define WL_SSID_MAX_LENGTH 32 13 | // Length of passphrase. Valid lengths are 8-63. 14 | #define WL_WPA_KEY_MAX_LENGTH 63 15 | // Length of key in bytes. Valid values are 5 and 13. 16 | #define WL_WEP_KEY_MAX_LENGTH 13 17 | // Size of a MAC-address or BSSID 18 | #define WL_MAC_ADDR_LENGTH 6 19 | // Size of a MAC-address or BSSID 20 | #define WL_IPV4_LENGTH 4 21 | // Maximum size of a SSID list 22 | #define WL_NETWORKS_LIST_MAXNUM 10 23 | // Maxmium number of socket 24 | #define MAX_SOCK_NUM 4 25 | //Maximum number of attempts to establish wifi connection 26 | #define WL_MAX_ATTEMPT_CONNECTION 10 27 | 28 | typedef enum { 29 | WL_IDLE_STATUS, 30 | WL_NO_SSID_AVAIL, 31 | WL_SCAN_COMPLETED, 32 | WL_CONNECTED, 33 | WL_CONNECT_FAILED, 34 | WL_CONNECTION_LOST, 35 | WL_DISCONNECTED 36 | } wl_status_t; 37 | 38 | 39 | #endif /* WL_DEFINITIONS_H_ */ 40 | -------------------------------------------------------------------------------- /external/arduino/avr/firmwares/wifishield/wifi_dnld/Release/wifi_dnld.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NerdLang/nerd/400b367708c2fee58060f85fb8546a522c8add9c/external/arduino/avr/firmwares/wifishield/wifi_dnld/Release/wifi_dnld.elf -------------------------------------------------------------------------------- /external/arduino/avr/firmwares/wifishield/wifi_dnld/src/Doc/SPB104 product brief.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NerdLang/nerd/400b367708c2fee58060f85fb8546a522c8add9c/external/arduino/avr/firmwares/wifishield/wifi_dnld/src/Doc/SPB104 product brief.pdf -------------------------------------------------------------------------------- /external/arduino/avr/firmwares/wifishield/wifi_dnld/src/Doc/gettingstarted.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NerdLang/nerd/400b367708c2fee58060f85fb8546a522c8add9c/external/arduino/avr/firmwares/wifishield/wifi_dnld/src/Doc/gettingstarted.pdf -------------------------------------------------------------------------------- /external/arduino/avr/firmwares/wifishield/wifi_dnld/src/SOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS/libnewlib_addons-at32ucr2-speed_opt.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NerdLang/nerd/400b367708c2fee58060f85fb8546a522c8add9c/external/arduino/avr/firmwares/wifishield/wifi_dnld/src/SOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS/libnewlib_addons-at32ucr2-speed_opt.a -------------------------------------------------------------------------------- /external/arduino/avr/libraries/EEPROM/examples/eeprom_clear/eeprom_clear.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * EEPROM Clear 3 | * 4 | * Sets all of the bytes of the EEPROM to 0. 5 | * Please see eeprom_iteration for a more in depth 6 | * look at how to traverse the EEPROM. 7 | * 8 | * This example code is in the public domain. 9 | */ 10 | 11 | #include 12 | 13 | void setup() { 14 | // initialize the LED pin as an output. 15 | pinMode(13, OUTPUT); 16 | 17 | /*** 18 | Iterate through each byte of the EEPROM storage. 19 | 20 | Larger AVR processors have larger EEPROM sizes, E.g: 21 | - Arduno Duemilanove: 512b EEPROM storage. 22 | - Arduino Uno: 1kb EEPROM storage. 23 | - Arduino Mega: 4kb EEPROM storage. 24 | 25 | Rather than hard-coding the length, you should use the pre-provided length function. 26 | This will make your code portable to all AVR processors. 27 | ***/ 28 | 29 | for (int i = 0 ; i < EEPROM.length() ; i++) { 30 | EEPROM.write(i, 0); 31 | } 32 | 33 | // turn the LED on when we're done 34 | digitalWrite(13, HIGH); 35 | } 36 | 37 | void loop() { 38 | /** Empty loop. **/ 39 | } 40 | -------------------------------------------------------------------------------- /external/arduino/avr/libraries/EEPROM/examples/eeprom_iteration/eeprom_iteration.ino: -------------------------------------------------------------------------------- 1 | /*** 2 | eeprom_iteration example. 3 | 4 | A set of example snippets highlighting the 5 | simplest methods for traversing the EEPROM. 6 | 7 | Running this sketch is not necessary, this is 8 | simply highlighting certain programming methods. 9 | 10 | Written by Christopher Andrews 2015 11 | Released under MIT licence. 12 | ***/ 13 | 14 | #include 15 | 16 | void setup() { 17 | 18 | /*** 19 | Iterate the EEPROM using a for loop. 20 | ***/ 21 | 22 | for (int index = 0 ; index < EEPROM.length() ; index++) { 23 | 24 | //Add one to each cell in the EEPROM 25 | EEPROM[ index ] += 1; 26 | } 27 | 28 | /*** 29 | Iterate the EEPROM using a while loop. 30 | ***/ 31 | 32 | int index = 0; 33 | 34 | while (index < EEPROM.length()) { 35 | 36 | //Add one to each cell in the EEPROM 37 | EEPROM[ index ] += 1; 38 | index++; 39 | } 40 | 41 | /*** 42 | Iterate the EEPROM using a do-while loop. 43 | ***/ 44 | 45 | int idx = 0; //Used 'idx' to avoid name conflict with 'index' above. 46 | 47 | do { 48 | 49 | //Add one to each cell in the EEPROM 50 | EEPROM[ idx ] += 1; 51 | idx++; 52 | } while (idx < EEPROM.length()); 53 | 54 | 55 | } //End of setup function. 56 | 57 | void loop() {} -------------------------------------------------------------------------------- /external/arduino/avr/libraries/EEPROM/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For EEPROM 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | EEPROM KEYWORD1 10 | EERef KEYWORD1 11 | EEPtr KEYWORD2 12 | 13 | ####################################### 14 | # Methods and Functions (KEYWORD2) 15 | ####################################### 16 | 17 | update KEYWORD2 18 | 19 | ####################################### 20 | # Constants (LITERAL1) 21 | ####################################### 22 | 23 | -------------------------------------------------------------------------------- /external/arduino/avr/libraries/EEPROM/library.properties: -------------------------------------------------------------------------------- 1 | name=EEPROM 2 | version=2.0 3 | author=Arduino, Christopher Andrews 4 | maintainer=Arduino 5 | sentence=Enables reading and writing to the permanent board storage. 6 | paragraph=This library allows to read and write data in a memory type, the EEPROM, that keeps its content also when the board is powered off. The amount of EEPROM available depends on the microcontroller type. 7 | category=Data Storage 8 | url=http://www.arduino.cc/en/Reference/EEPROM 9 | architectures=avr 10 | 11 | -------------------------------------------------------------------------------- /external/arduino/avr/libraries/HID/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map HID 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | HID KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | begin KEYWORD2 15 | SendReport KEYWORD2 16 | AppendDescriptor KEYWORD2 17 | 18 | ####################################### 19 | # Constants (LITERAL1) 20 | ####################################### 21 | HID_TX LITERAL1 -------------------------------------------------------------------------------- /external/arduino/avr/libraries/HID/library.properties: -------------------------------------------------------------------------------- 1 | name=HID 2 | version=1.0 3 | author=Arduino 4 | maintainer=Arduino 5 | sentence=Module for PluggableUSB infrastructure. Exposes an API for devices like Keyboards, Mice and Gamepads. 6 | paragraph= 7 | category=Communication 8 | url=http://www.arduino.cc/en/Reference/HID 9 | architectures=avr 10 | -------------------------------------------------------------------------------- /external/arduino/avr/libraries/SPI/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map SPI 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | SPI KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | begin KEYWORD2 15 | end KEYWORD2 16 | transfer KEYWORD2 17 | setBitOrder KEYWORD2 18 | setDataMode KEYWORD2 19 | setClockDivider KEYWORD2 20 | 21 | 22 | ####################################### 23 | # Constants (LITERAL1) 24 | ####################################### 25 | SPI_CLOCK_DIV4 LITERAL1 26 | SPI_CLOCK_DIV16 LITERAL1 27 | SPI_CLOCK_DIV64 LITERAL1 28 | SPI_CLOCK_DIV128 LITERAL1 29 | SPI_CLOCK_DIV2 LITERAL1 30 | SPI_CLOCK_DIV8 LITERAL1 31 | SPI_CLOCK_DIV32 LITERAL1 32 | SPI_CLOCK_DIV64 LITERAL1 33 | SPI_MODE0 LITERAL1 34 | SPI_MODE1 LITERAL1 35 | SPI_MODE2 LITERAL1 36 | SPI_MODE3 LITERAL1 -------------------------------------------------------------------------------- /external/arduino/avr/libraries/SPI/library.properties: -------------------------------------------------------------------------------- 1 | name=SPI 2 | version=1.0 3 | author=Arduino 4 | maintainer=Arduino 5 | sentence=Enables the communication with devices that use the Serial Peripheral Interface (SPI) Bus. 6 | paragraph=SPI is a synchronous serial data protocol used by microcontrollers for communicating with one or more peripheral devices quickly over short distances. It uses three lines common to all devices (MISO, MOSI and SCK) and one specific for each device. 7 | category=Communication 8 | url=http://www.arduino.cc/en/Reference/SPI 9 | architectures=avr 10 | 11 | -------------------------------------------------------------------------------- /external/arduino/avr/libraries/SoftwareSerial/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map for SoftwareSerial 3 | # (formerly NewSoftSerial) 4 | ####################################### 5 | 6 | ####################################### 7 | # Datatypes (KEYWORD1) 8 | ####################################### 9 | 10 | SoftwareSerial KEYWORD1 11 | 12 | ####################################### 13 | # Methods and Functions (KEYWORD2) 14 | ####################################### 15 | 16 | begin KEYWORD2 17 | end KEYWORD2 18 | read KEYWORD2 19 | write KEYWORD2 20 | available KEYWORD2 21 | isListening KEYWORD2 22 | overflow KEYWORD2 23 | flush KEYWORD2 24 | listen KEYWORD2 25 | peek KEYWORD2 26 | 27 | ####################################### 28 | # Constants (LITERAL1) 29 | ####################################### 30 | 31 | -------------------------------------------------------------------------------- /external/arduino/avr/libraries/SoftwareSerial/library.properties: -------------------------------------------------------------------------------- 1 | name=SoftwareSerial 2 | version=1.0 3 | author=Arduino 4 | maintainer=Arduino 5 | sentence=Enables serial communication on any digital pin. 6 | paragraph=The SoftwareSerial library has been developed to allow serial communication on any digital pin of the board, using software to replicate the functionality of the hardware UART. It is possible to have multiple software serial ports with speeds up to 115200 bps. 7 | category=Communication 8 | url=http://www.arduino.cc/en/Reference/SoftwareSerial 9 | architectures=avr 10 | 11 | -------------------------------------------------------------------------------- /external/arduino/avr/libraries/Wire/examples/digital_potentiometer/digital_potentiometer.ino: -------------------------------------------------------------------------------- 1 | // I2C Digital Potentiometer 2 | // by Nicholas Zambetti 3 | // and Shawn Bonkowski 4 | 5 | // Demonstrates use of the Wire library 6 | // Controls AD5171 digital potentiometer via I2C/TWI 7 | 8 | // Created 31 March 2006 9 | 10 | // This example code is in the public domain. 11 | 12 | 13 | #include 14 | 15 | void setup() { 16 | Wire.begin(); // join i2c bus (address optional for master) 17 | } 18 | 19 | byte val = 0; 20 | 21 | void loop() { 22 | Wire.beginTransmission(44); // transmit to device #44 (0x2c) 23 | // device address is specified in datasheet 24 | Wire.write(byte(0x00)); // sends instruction byte 25 | Wire.write(val); // sends potentiometer value byte 26 | Wire.endTransmission(); // stop transmitting 27 | 28 | val++; // increment value 29 | if (val == 64) { // if reached 64th position (max) 30 | val = 0; // start over from lowest value 31 | } 32 | delay(500); 33 | } 34 | 35 | -------------------------------------------------------------------------------- /external/arduino/avr/libraries/Wire/examples/master_reader/master_reader.ino: -------------------------------------------------------------------------------- 1 | // Wire Master Reader 2 | // by Nicholas Zambetti 3 | 4 | // Demonstrates use of the Wire library 5 | // Reads data from an I2C/TWI slave device 6 | // Refer to the "Wire Slave Sender" example for use with this 7 | 8 | // Created 29 March 2006 9 | 10 | // This example code is in the public domain. 11 | 12 | 13 | #include 14 | 15 | void setup() { 16 | Wire.begin(); // join i2c bus (address optional for master) 17 | Serial.begin(9600); // start serial for output 18 | } 19 | 20 | void loop() { 21 | Wire.requestFrom(8, 6); // request 6 bytes from slave device #8 22 | 23 | while (Wire.available()) { // slave may send less than requested 24 | char c = Wire.read(); // receive a byte as character 25 | Serial.print(c); // print the character 26 | } 27 | 28 | delay(500); 29 | } 30 | -------------------------------------------------------------------------------- /external/arduino/avr/libraries/Wire/examples/master_writer/master_writer.ino: -------------------------------------------------------------------------------- 1 | // Wire Master Writer 2 | // by Nicholas Zambetti 3 | 4 | // Demonstrates use of the Wire library 5 | // Writes data to an I2C/TWI slave device 6 | // Refer to the "Wire Slave Receiver" example for use with this 7 | 8 | // Created 29 March 2006 9 | 10 | // This example code is in the public domain. 11 | 12 | 13 | #include 14 | 15 | void setup() { 16 | Wire.begin(); // join i2c bus (address optional for master) 17 | } 18 | 19 | byte x = 0; 20 | 21 | void loop() { 22 | Wire.beginTransmission(8); // transmit to device #8 23 | Wire.write("x is "); // sends five bytes 24 | Wire.write(x); // sends one byte 25 | Wire.endTransmission(); // stop transmitting 26 | 27 | x++; 28 | delay(500); 29 | } 30 | -------------------------------------------------------------------------------- /external/arduino/avr/libraries/Wire/examples/slave_receiver/slave_receiver.ino: -------------------------------------------------------------------------------- 1 | // Wire Slave Receiver 2 | // by Nicholas Zambetti 3 | 4 | // Demonstrates use of the Wire library 5 | // Receives data as an I2C/TWI slave device 6 | // Refer to the "Wire Master Writer" example for use with this 7 | 8 | // Created 29 March 2006 9 | 10 | // This example code is in the public domain. 11 | 12 | 13 | #include 14 | 15 | void setup() { 16 | Wire.begin(8); // join i2c bus with address #8 17 | Wire.onReceive(receiveEvent); // register event 18 | Serial.begin(9600); // start serial for output 19 | } 20 | 21 | void loop() { 22 | delay(100); 23 | } 24 | 25 | // function that executes whenever data is received from master 26 | // this function is registered as an event, see setup() 27 | void receiveEvent(int howMany) { 28 | while (1 < Wire.available()) { // loop through all but the last 29 | char c = Wire.read(); // receive byte as a character 30 | Serial.print(c); // print the character 31 | } 32 | int x = Wire.read(); // receive byte as an integer 33 | Serial.println(x); // print the integer 34 | } 35 | -------------------------------------------------------------------------------- /external/arduino/avr/libraries/Wire/examples/slave_sender/slave_sender.ino: -------------------------------------------------------------------------------- 1 | // Wire Slave Sender 2 | // by Nicholas Zambetti 3 | 4 | // Demonstrates use of the Wire library 5 | // Sends data as an I2C/TWI slave device 6 | // Refer to the "Wire Master Reader" example for use with this 7 | 8 | // Created 29 March 2006 9 | 10 | // This example code is in the public domain. 11 | 12 | 13 | #include 14 | 15 | void setup() { 16 | Wire.begin(8); // join i2c bus with address #8 17 | Wire.onRequest(requestEvent); // register event 18 | } 19 | 20 | void loop() { 21 | delay(100); 22 | } 23 | 24 | // function that executes whenever data is requested by master 25 | // this function is registered as an event, see setup() 26 | void requestEvent() { 27 | Wire.write("hello "); // respond with message of 6 bytes 28 | // as expected by master 29 | } 30 | -------------------------------------------------------------------------------- /external/arduino/avr/libraries/Wire/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For Wire 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | ####################################### 10 | # Methods and Functions (KEYWORD2) 11 | ####################################### 12 | 13 | begin KEYWORD2 14 | setClock KEYWORD2 15 | beginTransmission KEYWORD2 16 | endTransmission KEYWORD2 17 | requestFrom KEYWORD2 18 | onReceive KEYWORD2 19 | onRequest KEYWORD2 20 | 21 | ####################################### 22 | # Instances (KEYWORD2) 23 | ####################################### 24 | 25 | Wire KEYWORD2 26 | 27 | ####################################### 28 | # Constants (LITERAL1) 29 | ####################################### 30 | 31 | -------------------------------------------------------------------------------- /external/arduino/avr/libraries/Wire/library.properties: -------------------------------------------------------------------------------- 1 | name=Wire 2 | version=1.0 3 | author=Arduino 4 | maintainer=Arduino 5 | sentence=This library allows you to communicate with I2C and Two Wire Interface devices. 6 | paragraph=It allows the communication with I2C devices like temperature sensors, realtime clocks and many others using SDA (Data Line) and SCL (Clock Line). 7 | category=Communication 8 | url=http://www.arduino.cc/en/Reference/Wire 9 | architectures=avr 10 | 11 | -------------------------------------------------------------------------------- /external/arduino/avr/variants/eightanaloginputs/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | pins_arduino.h - Pin definition functions for Arduino 3 | Part of Arduino - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2007 David A. Mellis 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General 18 | Public License along with this library; if not, write to the 19 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #include "../standard/pins_arduino.h" 24 | #undef NUM_ANALOG_INPUTS 25 | #define NUM_ANALOG_INPUTS 8 26 | -------------------------------------------------------------------------------- /external/arduino/avr/variants/micro/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | pins_arduino.h - Pin definition functions for Arduino 3 | Part of Arduino - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2007 David A. Mellis 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General 18 | Public License along with this library; if not, write to the 19 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #include "../leonardo/pins_arduino.h" 24 | 25 | #undef TXLED0 26 | #undef TXLED1 27 | #undef RXLED0 28 | #undef RXLED1 29 | #undef TX_RX_LED_INIT 30 | 31 | #define TXLED0 PORTD &= ~(1<<5) 32 | #define TXLED1 PORTD |= (1<<5) 33 | #define RXLED0 PORTB &= ~(1<<0) 34 | #define RXLED1 PORTB |= (1<<0) 35 | #define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0), TXLED0, RXLED0 36 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/ArduinoSTL.h: -------------------------------------------------------------------------------- 1 | /*--------------------- 2 | * 3 | * ArduinoSTL Core Library 4 | * 5 | * This header has some glue to make STL and Streams work from a sketch. 6 | * 7 | */ 8 | 9 | #ifndef ARDUINOSTL_M_H 10 | #define ARDUINOSTL_M_H 11 | 12 | #include 13 | 14 | // Create cout and cin.. there doesn't seem to be a way 15 | // to control what serial device at runtime. Grr. 16 | namespace std 17 | { 18 | extern ohserialstream cout; 19 | extern ihserialstream cin; 20 | } 21 | 22 | #if defined(ARDUINO_ARCH_AVR) 23 | 24 | class ArduinoSTL_STDIO { 25 | public: 26 | // Initialize STDIO using a pointer to whatever Serial is. 27 | // Serial.begin() must be called at some point. 28 | ArduinoSTL_STDIO(Stream *u) : file(NULL) { 29 | connect(u); 30 | } 31 | 32 | ArduinoSTL_STDIO(Stream &u) : file(NULL) { 33 | connect(u); 34 | } 35 | 36 | Stream *getUart() { 37 | return uart; 38 | } 39 | 40 | void connect(Stream *u); 41 | 42 | inline void connect(Stream &u) { 43 | connect(static_cast(&u)); 44 | } 45 | 46 | private: 47 | Stream *uart; 48 | FILE *file; 49 | }; 50 | 51 | extern ArduinoSTL_STDIO ArduinoSTL_Serial; 52 | 53 | #endif // ARDUINO_ARCH_AVR 54 | 55 | #endif // ARDUINOSTL_M_H 56 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/abi/libgcc_eh/Makefile: -------------------------------------------------------------------------------- 1 | top_srcdir=../../../ 2 | top_builddir=../../../ 3 | include $(top_srcdir)Rules.mak 4 | include Makefile.in 5 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/abi/libgcc_eh/Makefile.in: -------------------------------------------------------------------------------- 1 | LIBGCC_EH_OUT := $(top_builddir)src/abi/libgcc_eh/ 2 | 3 | OBJS = $(call list-archive-members,$(LIBGCC_EH)) 4 | libgcc_eh-$(IMPORT_LIBGCC_EH) := $(OBJS) 5 | 6 | LIBGCC_EH_VAR := $(call variablify,$(LIBGCC_EH)) 7 | LIBGCC_EH_DEP := $(LIBGCC_EH_OUT).$(LIBGCC_EH_VAR).dep 8 | 9 | ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) 10 | -include $(LIBGCC_EH_DEP) 11 | endif 12 | 13 | 14 | ifneq ($(libgcc_eh-y),) 15 | $(libgcc_eh-y): $(LIBGCC_EH) 16 | endif 17 | $(LIBGCC_EH_DEP): $(LIBGCC_EH) 18 | $(Q)$(RM) $(LIBGCC_EH_OUT).*dep $(LIBGCC_EH_OUT)*.o 19 | $(Q)$(if $(LIBGCC_EH),(cd $(LIBGCC_EH_OUT) && $(AR) x $(LIBGCC_EH))) 20 | $(Q)echo "libgcc_eh-y := \$$(addprefix \$$(LIBGCC_EH_OUT),$(libgcc_eh-y))" > $@ 21 | 22 | CLEAN_src/abi/libgcc_eh: ; 23 | DISTCLEAN_src/abi/libgcc_eh: 24 | $(do_rm) $(addprefix $(LIBGCC_EH_OUT),.*dep *.o) 25 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/abi/libsupc/Makefile: -------------------------------------------------------------------------------- 1 | top_srcdir=../../../ 2 | top_builddir=../../../ 3 | include $(top_srcdir)Rules.mak 4 | include Makefile.in 5 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/abi/libsupc/Makefile.in: -------------------------------------------------------------------------------- 1 | LIBSUPC_OUT := $(top_builddir)src/abi/libsupc/ 2 | 3 | OBJS = $(call list-archive-members,$(LIBSUP)) 4 | OBJS-OMIT = $(filter new_op%.o del_op%.o pure.o new_handler.o eh_alloc.o eh_globals.o,$(OBJS)) 5 | libsupc-$(IMPORT_LIBSUP) := $(filter-out $(OBJS-OMIT),$(OBJS)) 6 | 7 | LIBSUP_VAR := $(call variablify,$(LIBSUP)) 8 | LIBSUP_DEP :=$(LIBSUPC_OUT).$(LIBSUP_VAR).dep 9 | 10 | ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) 11 | -include $(LIBSUP_DEP) 12 | endif 13 | 14 | ifneq ($(libsupc-y),) 15 | $(libsupc-y): $(LIBSUP) 16 | endif 17 | $(LIBSUP_DEP): $(LIBSUP) $(LIBSUPC_OUT)Makefile.in 18 | $(Q)$(RM) $(LIBSUPC_OUT).*dep $(LIBSUPC_OUT)*.o 19 | $(Q)$(if $(LIBSUP),(cd $(LIBSUPC_OUT) && $(AR) x $(LIBSUP) && $(RM) $(OBJS-OMIT))) 20 | $(Q)echo "libsupc-y := \$$(addprefix \$$(LIBSUPC_OUT),$(libsupc-y))" > $@ 21 | 22 | CLEAN_src/abi/libsupc: ; 23 | DISTCLEAN_src/abi/libsupc: 24 | $(do_rm) $(addprefix $(LIBSUPC_OUT), .*dep *.o) 25 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/algorithm.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | This file is part of the uClibc++ Library. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | 18 | */ 19 | 20 | 21 | #include 22 | 23 | 24 | namespace std{ 25 | 26 | 27 | 28 | } 29 | 30 | 31 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/associative_base.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2007 Garrett A. Kajmowicz 2 | This file is part of the uClibc++ Library. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | 18 | */ 19 | 20 | #include 21 | 22 | namespace std{ 23 | 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/bitset.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | This file is part of the uClibc++ Library. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | 18 | */ 19 | 20 | #include 21 | 22 | namespace std{ 23 | 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/cassert: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2005 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | #include 20 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/cctype: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2006 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | #include 20 | 21 | namespace std{ 22 | 23 | using ::isalnum; 24 | using ::isalpha; 25 | using ::iscntrl; 26 | using ::isdigit; 27 | using ::isgraph; 28 | using ::islower; 29 | using ::isprint; 30 | using ::ispunct; 31 | using ::isspace; 32 | using ::isupper; 33 | using ::isxdigit; 34 | using ::tolower; 35 | using ::toupper; 36 | 37 | } 38 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/cerrno: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2005 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | #include 20 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/cfloat: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | 22 | #ifndef __STD_HEADER_CFLOAT 23 | #define __STD_HEADER_CFLOAT 1 24 | 25 | 26 | #include 27 | 28 | 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/climits: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #ifndef __STD_HEADER_CLIMITS 21 | #define __STD_HEADER_CLIMITS 1 22 | 23 | 24 | #include 25 | 26 | 27 | #endif 28 | 29 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/clocale: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2005 Garrett A. Kajmowicz 2 | This file is part of the uClibc++ Library. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | #ifndef __STD_HEADER_CLOCALE 20 | #define __STD_HEADER_CLOCALE 1 21 | 22 | #include 23 | 24 | namespace std { 25 | using ::lconv; 26 | using ::setlocale; 27 | using ::localeconv; 28 | } 29 | 30 | #endif // __STD_HEADER_CLOCALE 31 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/complex.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2005 Garrett A. Kajmowicz 2 | This file is part of the uClibc++ Library. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | #include 20 | 21 | 22 | namespace std{ 23 | 24 | 25 | template class _UCXXEXPORT complex; 26 | 27 | 28 | } 29 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/csetjmp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | 22 | #ifndef __STD_HEADER_CSETJMP 23 | #define __STD_HEADER_CSETJMP 1 24 | 25 | 26 | //From GCC Header files 27 | #undef longjmp 28 | 29 | // Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998 30 | #ifndef setjmp 31 | #define setjmp(env) setjmp (env) 32 | #endif 33 | 34 | //Mine again 35 | 36 | 37 | namespace std{ 38 | using ::longjmp; 39 | using ::jmp_buf; 40 | } 41 | 42 | 43 | #endif 44 | 45 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/del_op.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | // Arduino 1.0 contains an implementation for this. 21 | #if ARDUINO < 100 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | _UCXXEXPORT void operator delete(void* ptr) throw(){ 28 | free(ptr); 29 | } 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/del_opnt.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | #ifndef NO_NOTHROW 25 | _UCXXEXPORT void operator delete(void* ptr, const std::nothrow_t& ) throw() { 26 | free(ptr); 27 | } 28 | #endif 29 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/del_ops.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2015 Bernhard Reutner-Fischer 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | /* C++14 sized deallocation */ 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | _UCXXEXPORT void operator delete(void* ptr, std::size_t) throw(){ 26 | ::operator delete (ptr); 27 | } 28 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/del_opv.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | // Arduino 1.0 contains an implementation for this. 21 | #if ARDUINO < 100 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | _UCXXEXPORT void operator delete[](void * ptr) throw(){ 28 | free(ptr); 29 | } 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/del_opvnt.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | #ifndef NO_NOTHROW 25 | _UCXXEXPORT void operator delete[](void* ptr, const std::nothrow_t& ) throw(){ 26 | free(ptr); 27 | } 28 | #endif 29 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/del_opvs.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2015 Bernhard Reutner-Fischer 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | /* C++14 sized deallocation */ 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | _UCXXEXPORT void operator delete[](void * ptr, std::size_t) throw(){ 26 | ::operator delete[] (ptr); 27 | } 28 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/deque.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | This file is part of the uClibc++ Library. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | 18 | */ 19 | 20 | #include 21 | 22 | 23 | namespace std{ 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | } 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/eh_globals.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2006 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation, version 2.1 8 | of the License. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | //This is a system-specific header which does all of the error-handling management 25 | #include 26 | 27 | //The following functionality is derived from reading of the GNU libstdc++ code and making it...simple 28 | 29 | 30 | namespace __cxxabiv1{ 31 | 32 | static __UCLIBCXX_TLS __cxa_eh_globals eh_globals; 33 | 34 | extern "C" __cxa_eh_globals* __cxa_get_globals() throw(){ 35 | return &eh_globals; 36 | } 37 | 38 | extern "C" __cxa_eh_globals* __cxa_get_globals_fast() throw(){ 39 | return &eh_globals; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/func_exception: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | #include 22 | 23 | 24 | #ifndef HEADER_IMPLEMENTATION_FUNC_EXCEPTION 25 | #define HEADER_IMPLEMENTATION_FUNC_EXCEPTION 26 | 27 | #pragma GCC visibility push(default) 28 | 29 | namespace std{ 30 | 31 | _UCXXEXPORT void __throw_bad_alloc(); 32 | _UCXXEXPORT void __throw_out_of_range(const char * message = 0); 33 | _UCXXEXPORT void __throw_overflow_error(const char * message = 0); 34 | _UCXXEXPORT void __throw_length_error(const char * message = 0); 35 | _UCXXEXPORT void __throw_invalid_argument(const char * message = 0); 36 | } 37 | 38 | #pragma GCC visibility pop 39 | 40 | #endif 41 | 42 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/iomanip.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2005 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | 22 | namespace std{ 23 | 24 | 25 | 26 | 27 | } 28 | 29 | 30 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/iostream.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #define __UCLIBCXX_COMPILE_IOSTREAM__ 1 21 | 22 | #include 23 | 24 | namespace std{ 25 | 26 | #ifdef __UCLIBCXX_EXPAND_OSTREAM_CHAR__ 27 | #ifdef __UCLIBCXX_EXPAND_ISTREAM_CHAR__ 28 | 29 | template _UCXXEXPORT basic_iostream >:: 30 | basic_iostream(basic_streambuf >* sb); 31 | template _UCXXEXPORT basic_iostream >::~basic_iostream(); 32 | 33 | #endif 34 | #endif 35 | 36 | } 37 | 38 | 39 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/iterator.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | 22 | namespace std{ 23 | 24 | 25 | 26 | } 27 | 28 | 29 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/limits.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2006 Garrett A. Kajmowicz 2 | This file is part of the uClibc++ Library. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | 18 | */ 19 | 20 | #include 21 | 22 | namespace std{ 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/list.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | 22 | namespace std{ 23 | 24 | 25 | 26 | 27 | } 28 | 29 | 30 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/locale.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | namespace std{ 27 | 28 | } 29 | 30 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/map.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | This file is part of the uClibc++ Library. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | 18 | */ 19 | 20 | #include 21 | 22 | namespace std{ 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | } 34 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/new_handler.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2005 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | 22 | const std::nothrow_t std::nothrow = { }; 23 | 24 | //Name selected to be compatable with g++ code 25 | std::new_handler __new_handler; 26 | 27 | _UCXXEXPORT std::new_handler std::set_new_handler(std::new_handler new_p) throw(){ 28 | std::new_handler retval = __new_handler; 29 | __new_handler = new_p; 30 | return retval; 31 | } 32 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/new_op.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | // Arduino 1.0 contains an implementation for this. 21 | #if ARDUINO < 100 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | _UCXXEXPORT void* operator new(std::size_t numBytes) throw(std::bad_alloc){ 28 | //C++ stardard 5.3.4.8 requires that a valid pointer be returned for 29 | //a call to new(0). Thus: 30 | if(numBytes == 0){ 31 | numBytes = 1; 32 | } 33 | void * p = malloc(numBytes); 34 | if(p == 0){ 35 | std::__throw_bad_alloc(); 36 | } 37 | return p; 38 | } 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/new_opnt.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | #ifndef NO_NOTHROW 25 | _UCXXEXPORT void* operator new(std::size_t numBytes, const std::nothrow_t& ) throw(){ 26 | return malloc(numBytes); 27 | } 28 | #endif 29 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/new_opv.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | // Arduino 1.0 contains an implementation for this. 21 | #if ARDUINO < 100 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | _UCXXEXPORT void* operator new[](std::size_t numBytes) throw(std::bad_alloc){ 28 | //C++ stardard 5.3.4.8 requires that a valid pointer be returned for 29 | //a call to new(0). Thus: 30 | if(numBytes == 0){ 31 | numBytes = 1; 32 | } 33 | void * p = malloc(numBytes); 34 | if(p == 0){ 35 | std::__throw_bad_alloc(); 36 | } 37 | return p; 38 | } 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/new_opvnt.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | #ifndef NO_NOTHROW 25 | _UCXXEXPORT void* operator new[](std::size_t numBytes, const std::nothrow_t& ) throw(){ 26 | return malloc(numBytes); 27 | } 28 | #endif 29 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/numeric.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | 22 | namespace std{ 23 | 24 | 25 | } 26 | 27 | 28 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/queue.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | This file is part of the uClibc++ Library. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | #include 20 | 21 | 22 | namespace std{ 23 | 24 | 25 | 26 | 27 | } 28 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/set.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | This file is part of the uClibc++ Library. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | 18 | */ 19 | 20 | #include 21 | 22 | namespace std{ 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | } 34 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/stack.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | This file is part of the uClibc++ Library. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | #include 20 | 21 | 22 | namespace std{ 23 | 24 | 25 | 26 | 27 | } 28 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/system_configuration.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Configuration for Arduino's compiler. 3 | * >>> This is a guess <<< 4 | */ 5 | /* 6 | * Version Number 7 | */ 8 | #define __UCLIBCXX_MAJOR__ 0 9 | #define __UCLIBCXX_MINOR__ 2 10 | #define __UCLIBCXX_SUBLEVEL__ 4 11 | 12 | /* 13 | * Target Features and Options 14 | */ 15 | #define __UCLIBCXX_HAS_FLOATS__ 16 | #undef __UCLIBCXX_HAS_TLS__ 17 | #define __WARNINGS__ "-Wall" 18 | #define __BUILD_EXTRA_LIBRARIES__ "" 19 | #define __HAVE_DOT_CONFIG__ 1 20 | 21 | /* 22 | * String and I/O Stream Support 23 | */ 24 | #undef __UCLIBCXX_HAS_WCHAR__ 25 | #define __UCLIBCXX_IOSTREAM_BUFSIZE__ 32 26 | #undef __UCLIBCXX_HAS_LFS__ 27 | #undef __UCLIBCXX_SUPPORT_CDIR__ 28 | #undef __UCLIBCXX_SUPPORT_COUT__ 29 | #undef __UCLIBCXX_SUPPORT_CERR__ 30 | /* 31 | * STL and Code Expansion 32 | */ 33 | //#define __UCLIBCXX_STL_BUFFER_SIZE__ 32 34 | #define __UCLIBCXX_STL_BUFFER_SIZE__ 8 35 | #undef __UCLIBCXX_CODE_EXPANSION__ 36 | 37 | /* 38 | * Library Installation Options 39 | */ 40 | #define __UCLIBCXX_RUNTIME_PREFIX__ "/usr/uClibc++" 41 | #define __UCLIBCXX_RUNTIME_INCLUDE_SUBDIR__ "/include" 42 | #define __UCLIBCXX_RUNTIME_LIB_SUBDIR__ "/lib" 43 | #define __UCLIBCXX_RUNTIME_BIN_SUBDIR__ "/bin" 44 | #undef __UCLIBCXX_EXCEPTION_SUPPORT__ 45 | #define __BUILD_STATIC_LIB__ 1 46 | #define __BUILD_ONLY_STATIC_LIB__ 1 47 | #undef __DODEBUG__ 48 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/typeinfo.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | 22 | namespace std{ 23 | 24 | _UCXXEXPORT bad_cast::~bad_cast() throw(){ 25 | 26 | } 27 | 28 | _UCXXEXPORT bad_typeid::~bad_typeid() throw(){ 29 | 30 | } 31 | 32 | } 33 | 34 | 35 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/utility.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | This file is part of the uClibc++ Library. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | 18 | */ 19 | 20 | 21 | #include 22 | 23 | 24 | namespace std{ 25 | 26 | 27 | 28 | } 29 | 30 | 31 | -------------------------------------------------------------------------------- /external/arduino/stlarduino/valarray.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | 22 | namespace std{ 23 | 24 | 25 | 26 | 27 | } 28 | 29 | 30 | -------------------------------------------------------------------------------- /external/libuv/src/strscpy.c: -------------------------------------------------------------------------------- 1 | #include "strscpy.h" 2 | #include /* SSIZE_MAX */ 3 | 4 | ssize_t uv__strscpy(char* d, const char* s, size_t n) { 5 | size_t i; 6 | 7 | for (i = 0; i < n; i++) 8 | if ('\0' == (d[i] = s[i])) 9 | return i > SSIZE_MAX ? UV_E2BIG : (ssize_t) i; 10 | 11 | if (i == 0) 12 | return 0; 13 | 14 | d[--i] = '\0'; 15 | 16 | return UV_E2BIG; 17 | } 18 | -------------------------------------------------------------------------------- /external/libuv/src/strscpy.h: -------------------------------------------------------------------------------- 1 | #ifndef UV_STRSCPY_H_ 2 | #define UV_STRSCPY_H_ 3 | 4 | /* Include uv.h for its definitions of size_t and ssize_t. 5 | * size_t can be obtained directly from but ssize_t requires 6 | * some hoop jumping on Windows that I didn't want to duplicate here. 7 | */ 8 | #include "uv.h" 9 | 10 | /* Copies up to |n-1| bytes from |d| to |s| and always zero-terminates 11 | * the result, except when |n==0|. Returns the number of bytes copied 12 | * or UV_E2BIG if |d| is too small. 13 | * 14 | * See https://www.kernel.org/doc/htmldocs/kernel-api/API-strscpy.html 15 | */ 16 | ssize_t uv__strscpy(char* d, const char* s, size_t n); 17 | 18 | #endif /* UV_STRSCPY_H_ */ 19 | -------------------------------------------------------------------------------- /external/libuv/src/win/detect-wakeup.c: -------------------------------------------------------------------------------- 1 | #include "uv.h" 2 | #include "internal.h" 3 | #include "winapi.h" 4 | 5 | static void uv__register_system_resume_callback(void); 6 | 7 | void uv__init_detect_system_wakeup(void) { 8 | /* Try registering system power event callback. This is the cleanest 9 | * method, but it will only work on Win8 and above. 10 | */ 11 | uv__register_system_resume_callback(); 12 | } 13 | 14 | static ULONG CALLBACK uv__system_resume_callback(PVOID Context, 15 | ULONG Type, 16 | PVOID Setting) { 17 | if (Type == PBT_APMRESUMESUSPEND || Type == PBT_APMRESUMEAUTOMATIC) 18 | uv__wake_all_loops(); 19 | 20 | return 0; 21 | } 22 | 23 | static void uv__register_system_resume_callback(void) { 24 | _DEVICE_NOTIFY_SUBSCRIBE_PARAMETERS recipient; 25 | _HPOWERNOTIFY registration_handle; 26 | 27 | if (pPowerRegisterSuspendResumeNotification == NULL) 28 | return; 29 | 30 | recipient.Callback = uv__system_resume_callback; 31 | recipient.Context = NULL; 32 | (*pPowerRegisterSuspendResumeNotification)(DEVICE_NOTIFY_CALLBACK, 33 | &recipient, 34 | ®istration_handle); 35 | } 36 | -------------------------------------------------------------------------------- /lib/check/isAssignment.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | function isAssignment(_token) 25 | { 26 | if(ASSIGNMENT_OPERATOR.indexOf(_token) < 0) 27 | { 28 | return {error: false, check: false}; 29 | } 30 | return {error: false, check: true, type: "ASSIGNMENT"}; 31 | } 32 | 33 | module.exports = isAssignment; -------------------------------------------------------------------------------- /lib/check/isBoolean.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | function isBoolean(_token) 25 | { 26 | if(BOOLEAN_KEYWORD.indexOf(_token) < 0) 27 | { 28 | return {error: false, check: false}; 29 | } 30 | return {error: false, check: true, type: "BOOLEAN"}; 31 | } 32 | 33 | module.exports = isBoolean; -------------------------------------------------------------------------------- /lib/check/isDelimiter.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | function isDelimiter(_token) 25 | { 26 | if(DELIMITER.indexOf(_token) < 0) 27 | { 28 | return {error: false, check: false}; 29 | } 30 | return {error: false, check: true, type: _token}; 31 | } 32 | 33 | module.exports = isDelimiter; -------------------------------------------------------------------------------- /lib/check/isIncrement.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | function isIncrement(_token) 25 | { 26 | if(INCREMENT_TOKENS.indexOf(_token) < 0) 27 | { 28 | return {error: false, check: false}; 29 | } 30 | return {error: false, check: true, type: "INCREMENT"}; 31 | } 32 | 33 | module.exports = isIncrement; -------------------------------------------------------------------------------- /lib/check/isInitOperator.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | function isInitOperator(_token) 25 | { 26 | if(INIT_OPERATOR.indexOf(_token) < 0) 27 | { 28 | return {error: false, check: false}; 29 | } 30 | return {error: false, check: true, type: _token}; 31 | } 32 | 33 | module.exports = isInitOperator; -------------------------------------------------------------------------------- /lib/check/isKeyword.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | function isKeyword(_token) 25 | { 26 | if(KEYWORD.indexOf(_token) < 0) 27 | { 28 | return {error: false, check: false}; 29 | } 30 | return {error: false, check: true, type: _token.toUpperCase()}; 31 | } 32 | 33 | module.exports = isKeyword; -------------------------------------------------------------------------------- /lib/check/isNative.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | function isNative(_token) 25 | { 26 | if(_token.length < 4) 27 | { 28 | return {error: false, check: false}; 29 | } 30 | if(_token.slice(0,2) == "{{" || _token.slice(-2) == "}}") 31 | { 32 | return {error: false, check: true, type: "NATIVE"}; 33 | } 34 | return {error: false, check: false}; 35 | } 36 | 37 | module.exports = isNative; -------------------------------------------------------------------------------- /lib/check/isObjectOperator.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | function isObjectOperator(_token) 25 | { 26 | if(OBJECT_OPERATOR.indexOf(_token) < 0) 27 | { 28 | return {error: false, check: false}; 29 | } 30 | return {error: false, check: true, type: _token}; 31 | } 32 | 33 | module.exports = isObjectOperator; -------------------------------------------------------------------------------- /lib/check/isOperator.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | function isOperator(_token) 25 | { 26 | if(ALL_TOKEN_LOGIC.indexOf(_token) < 0) 27 | { 28 | return {error: false, check: false}; 29 | } 30 | return {error: false, check: true, type: "OPERATOR"}; 31 | } 32 | 33 | module.exports = isOperator; -------------------------------------------------------------------------------- /lib/check/isSemi.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | function isSemi(_token) 25 | { 26 | if(_token != ";") 27 | { 28 | return {error: false, check: false}; 29 | } 30 | return {error: false, check: true, type: "SEMI"}; 31 | } 32 | 33 | module.exports = isSemi; -------------------------------------------------------------------------------- /lib/check/isString.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | function isString(_token) 25 | { 26 | if(_token.length < 2) 27 | { 28 | return {error: false, check: false}; 29 | } 30 | if(_token[0] != "\"" || _token[ _token.length - 1 ] != "\"") 31 | { 32 | return {error: false, check: false}; 33 | } 34 | return {error: false, check: true, type: "STRING"}; 35 | } 36 | 37 | module.exports = isString; -------------------------------------------------------------------------------- /lib/check/isUnary.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | function isUnary(_token) 25 | { 26 | if(UNARY_TOKENS.indexOf(_token) < 0) 27 | { 28 | return {error: false, check: false}; 29 | } 30 | return {error: false, check: true, type: "UNARY"}; 31 | } 32 | 33 | module.exports = isUnary; -------------------------------------------------------------------------------- /nerd_modules/JSON/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "JSON", 3 | "description": "NectarJS base JSON module", 4 | "main": "index.js", 5 | "bugs": 6 | { 7 | "url": "https://github.com/NectarJS/nectarjs/issues" 8 | }, 9 | 10 | "directories": 11 | { 12 | "root": ".", 13 | "lib": "lib" 14 | }, 15 | "homepage": "https://github.com/NectarJS/nectarjs#readme", 16 | "keywords": 17 | [ 18 | "nectarjs", 19 | "JSON", 20 | "javascript" 21 | ], 22 | "license": "GPL-3.0-or-later", 23 | "licenses": [ 24 | { 25 | "type": "GPL", 26 | "url": "https://github.com/nectarjs/nectarjs/blob/master/LICENSE" 27 | } 28 | ], 29 | "repository": 30 | { 31 | "type": "git", 32 | "url": "git+ssh://git@github.com/NectarJS/nectarjs.git" 33 | }, 34 | "version": "0.0.2", 35 | "nerd": 36 | { 37 | "env": ["std", "js", "android", "ios", "node", "arduino", "wasm"] 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /nerd_modules/Module/index.ng: -------------------------------------------------------------------------------- 1 | // NodeJS modules compatibility 2 | var module = function() 3 | { 4 | 5 | }; 6 | 7 | return module; -------------------------------------------------------------------------------- /nerd_modules/String/index.ng: -------------------------------------------------------------------------------- 1 | var String = function(value) 2 | { 3 | if(!value) 4 | { 5 | value = ""; 6 | } 7 | 8 | return value; 9 | }; 10 | 11 | String.prototype.replace = function(_search, _replace) 12 | { 13 | {{ 14 | size_t start_pos = ((NerdCore::Class::String*)(__NERD_THIS.data.ptr))->value.find((std::string)_search); 15 | if (start_pos == std::string::npos) 16 | { 17 | return NerdCore::VAR(((NerdCore::Class::String*)(__NERD_THIS.data.ptr))->value); 18 | } 19 | 20 | std::string _new = ((NerdCore::Class::String*)(__NERD_THIS.data.ptr))->value; 21 | return NerdCore::VAR(_new.replace(start_pos, ((std::string)_search).length(), (std::string)_replace)); 22 | }} 23 | 24 | } 25 | 26 | String.prototype.toString = function() 27 | { 28 | return this; 29 | } 30 | 31 | return String; -------------------------------------------------------------------------------- /nerd_modules/arduino-lcd/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "arduino-lcd", 3 | "description": "NerdLang Arduino LCD module", 4 | "main": "index.ng", 5 | "bugs": 6 | { 7 | "url": "https://github.com/NerdLang/Nerd/issues" 8 | }, 9 | 10 | "directories": 11 | { 12 | "root": ".", 13 | "lib": "lib" 14 | }, 15 | "homepage": "https://github.com/NerdLang/Nerd#readme", 16 | "keywords": 17 | [ 18 | "nerd", 19 | "nerdlang", 20 | "arduino", 21 | "lcd" 22 | ], 23 | "license": "MIT", 24 | "licenses": [ 25 | { 26 | "type": "MIT", 27 | "url": "https://github.com/NerdLang/Nerd/blob/master/LICENSE" 28 | } 29 | ], 30 | "repository": 31 | { 32 | "type": "git", 33 | "url": "git+ssh://git@github.com/NerdLang/Nerd.git" 34 | }, 35 | "version": "0.0.1", 36 | "nerd": 37 | { 38 | "env": ["arduino"], 39 | "read_only": [], 40 | "lib": ["{__MODULE__}/lib/LiquidCrystal.cpp","{__EXTERN__}/arduino/avr/cores/arduino/Print.cpp"] 41 | } 42 | } -------------------------------------------------------------------------------- /nerd_modules/arduino/index.ng: -------------------------------------------------------------------------------- 1 | var high; 2 | var low; 3 | var input; 4 | var output; 5 | var led_builtin; 6 | 7 | {{ 8 | high = HIGH; 9 | low = LOW; 10 | input = INPUT; 11 | output = OUTPUT; 12 | led_builtin = LED_BUILTIN; 13 | }} 14 | 15 | var nerdDelay = function(_value) 16 | { 17 | {{ 18 | delay((int)_value); 19 | }} 20 | }; 21 | 22 | var nerdPinMode = function(_pin, _mode) 23 | { 24 | {{ 25 | pinMode((int)_pin, (int)_mode); 26 | }} 27 | }; 28 | 29 | var nerdDigitalWrite = function( _pin, _mode) 30 | { 31 | {{ 32 | digitalWrite((int)_pin, (int)_mode); 33 | }} 34 | }; 35 | 36 | var nerdMillis = function( ) 37 | { 38 | {{ 39 | return var((double)millis()); 40 | }} 41 | }; 42 | 43 | var nerdSec = function( ) 44 | { 45 | {{ 46 | return var((int)(millis()/1000)); 47 | }} 48 | }; 49 | 50 | var arduino = 51 | { 52 | delay: nerdDelay, 53 | pinMode: nerdPinMode, 54 | digitalWrite: nerdDigitalWrite, 55 | high: high, 56 | low: low, 57 | input: input, 58 | output: output, 59 | led_builtin: led_builtin, 60 | millis: nerdMillis, 61 | seconds: nerdSec, 62 | }; 63 | 64 | return arduino; -------------------------------------------------------------------------------- /nerd_modules/child_process/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "child_process", 3 | "description": "Nerd base child process module", 4 | "main": "index.nf", 5 | "bugs": 6 | { 7 | "url": "https://github.com/Nerdlang/Nerd/issues" 8 | }, 9 | 10 | "directories": 11 | { 12 | "root": "." 13 | }, 14 | "homepage": "https://github.com/Nerdlang/Nerd#readme", 15 | "keywords": 16 | [ 17 | "nerdlang", 18 | "nerd", 19 | "child_process", 20 | "exec", 21 | "spawn" 22 | ], 23 | "license": "MIT", 24 | "licenses": [ 25 | { 26 | "type": "MIT", 27 | "url": "https://github.com/nerdlang/nerd/blob/master/LICENSE" 28 | } 29 | ], 30 | "repository": 31 | { 32 | "type": "git", 33 | "url": "git+ssh://git@github.com/Nerdlang/Nerd.git" 34 | }, 35 | "version": "0.0.1", 36 | "nectar": 37 | { 38 | "env": ["std", "wasm"] 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /nerd_modules/date/index.ng: -------------------------------------------------------------------------------- 1 | include(""); 2 | 3 | var date = {}; 4 | 5 | date.now = function() 6 | { 7 | {{ 8 | return NerdCore::VAR(std::chrono::duration_cast( 9 | std::chrono::system_clock::now().time_since_epoch() 10 | ).count()); 11 | }} 12 | }; 13 | 14 | return date; -------------------------------------------------------------------------------- /nerd_modules/error/index.ng: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | var error = {}; 25 | 26 | error.throw = function(_obj) 27 | { 28 | {{ 29 | throw(_obj); 30 | }} 31 | }; 32 | 33 | return error; -------------------------------------------------------------------------------- /nerd_modules/fs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fs", 3 | "description": "Nerd Standard FS module", 4 | "main": "index.ng", 5 | "bugs": 6 | { 7 | "url": "https://github.com/Nerdlang/Nerd/issues" 8 | }, 9 | 10 | "directories": 11 | { 12 | "root": "." 13 | }, 14 | "homepage": "https://github.com/Nerdlang/Nerd#readme", 15 | "keywords": 16 | [ 17 | "nerd", 18 | "nerdlang", 19 | "fs", 20 | "filesystem" 21 | ], 22 | "license": "MIT", 23 | "licenses": [ 24 | { 25 | "type": "MIT", 26 | "url": "https://github.com/nerdlang/nerd/blob/master/LICENSE" 27 | } 28 | ], 29 | "repository": 30 | { 31 | "type": "git", 32 | "url": "git+ssh://git@github.com/Nerd/nectarjs.git" 33 | }, 34 | "version": "0.0.1", 35 | "nerd": 36 | { 37 | "env": ["std", "wasm", "js"] 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /nerd_modules/http/httplib/uSockets/internal/eventing/gcd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Authored by Alex Hultman, 2018-2019. 3 | * Intellectual property of third-party. 4 | 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #ifndef GCD_H 19 | #define GCD_H 20 | 21 | #include "internal/loop_data.h" 22 | 23 | #include 24 | #define LIBUS_SOCKET_READABLE 1 25 | #define LIBUS_SOCKET_WRITABLE 2 26 | 27 | struct us_loop_t { 28 | alignas(LIBUS_EXT_ALIGNMENT) struct us_internal_loop_data_t data; 29 | 30 | dispatch_queue_t gcd_queue; 31 | }; 32 | 33 | struct us_poll_t { 34 | int events; 35 | dispatch_source_t gcd_read, gcd_write; 36 | LIBUS_SOCKET_DESCRIPTOR fd; 37 | unsigned char poll_type; 38 | }; 39 | 40 | #endif // GCD_H 41 | -------------------------------------------------------------------------------- /nerd_modules/http/httplib/uSockets/internal/eventing/libuv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Authored by Alex Hultman, 2018-2019. 3 | * Intellectual property of third-party. 4 | 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #ifndef LIBUV_H 19 | #define LIBUV_H 20 | 21 | #include "internal/loop_data.h" 22 | 23 | #include 24 | #define LIBUS_SOCKET_READABLE UV_READABLE 25 | #define LIBUS_SOCKET_WRITABLE UV_WRITABLE 26 | 27 | struct us_loop_t { 28 | alignas(LIBUS_EXT_ALIGNMENT) struct us_internal_loop_data_t data; 29 | 30 | uv_loop_t *uv_loop; 31 | int is_default; 32 | 33 | uv_prepare_t *uv_pre; 34 | uv_check_t *uv_check; 35 | }; 36 | 37 | // it is no longer valid to cast a pointer to us_poll_t to a pointer of uv_poll_t 38 | struct us_poll_t { 39 | /* We need to hold a pointer to this uv_poll_t since we need to be able to resize our block */ 40 | uv_poll_t *uv_p; 41 | LIBUS_SOCKET_DESCRIPTOR fd; 42 | unsigned char poll_type; 43 | }; 44 | 45 | #endif // LIBUV_H 46 | -------------------------------------------------------------------------------- /nerd_modules/http/httplib/uSockets/internal/loop_data.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Authored by Alex Hultman, 2018-2019. 3 | * Intellectual property of third-party. 4 | 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #ifndef LOOP_DATA_H 19 | #define LOOP_DATA_H 20 | 21 | struct us_internal_loop_data_t { 22 | struct us_timer_t *sweep_timer; 23 | struct us_internal_async *wakeup_async; 24 | int last_write_failed; 25 | struct us_socket_context_t *head; 26 | struct us_socket_context_t *iterator; 27 | char *recv_buf; 28 | void *ssl_data; 29 | void (*pre_cb)(struct us_loop_t *); 30 | void (*post_cb)(struct us_loop_t *); 31 | struct us_socket_t *closed_head; 32 | /* We do not care if this flips or not, it doesn't matter */ 33 | long long iteration_nr; 34 | }; 35 | 36 | #endif // LOOP_DATA_H 37 | -------------------------------------------------------------------------------- /nerd_modules/http/httplib/uWS/AsyncSocketData.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Authored by Alex Hultman, 2018-2019. 3 | * Intellectual property of third-party. 4 | 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #ifndef UWS_ASYNCSOCKETDATA_H 19 | #define UWS_ASYNCSOCKETDATA_H 20 | 21 | #include 22 | 23 | namespace uWS { 24 | 25 | /* Depending on how we want AsyncSocket to function, this will need to change */ 26 | 27 | template 28 | struct AsyncSocketData { 29 | /* This will do for now */ 30 | std::string buffer; 31 | 32 | /* Allow move constructing us */ 33 | AsyncSocketData(std::string &&backpressure) : buffer(std::move(backpressure)) { 34 | 35 | } 36 | 37 | /* Or emppty */ 38 | AsyncSocketData() = default; 39 | }; 40 | 41 | } 42 | 43 | #endif // UWS_ASYNCSOCKETDATA_H 44 | -------------------------------------------------------------------------------- /nerd_modules/path/index.ng: -------------------------------------------------------------------------------- 1 | var path = {}; 2 | 3 | {{ 4 | #ifdef _WIN32 5 | var SEP = "\\"; 6 | #elif _WIN64 7 | var SEP = "\\"; 8 | #else 9 | var SEP = "/"; 10 | #endif 11 | }} 12 | 13 | 14 | path.join = function() 15 | { 16 | var joined = ""; 17 | 18 | var fnArgs = arguments(); 19 | 20 | for(var i = 0; i < length_of(fnArgs); i++) 21 | { 22 | var j = i - 1; 23 | if(i > 0 && length_of(fnArgs[j]) > 0) 24 | { 25 | {{ 26 | joined += SEP; 27 | }} 28 | } 29 | joined += fnArgs[i]; 30 | 31 | } 32 | 33 | return joined; 34 | }; 35 | 36 | return path; -------------------------------------------------------------------------------- /nerd_modules/process/index.ng: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | var process = 25 | { 26 | cwd: function() 27 | { 28 | return __dirname; 29 | }, 30 | argv: __NERD_ARGS, 31 | }; 32 | 33 | return process; -------------------------------------------------------------------------------- /nerd_modules/querystring/index.ng: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | */ -------------------------------------------------------------------------------- /nerd_modules/thread/index.ng: -------------------------------------------------------------------------------- 1 | // WIP 2 | {{ 3 | using __NERD_UNORDERED = std::unordered_map; 4 | 5 | auto __Nerd_THREADED_CALL = [](NerdCore::VAR _fn) 6 | { 7 | try 8 | { 9 | _fn(); 10 | } 11 | catch(NerdCore::VAR e) 12 | { 13 | std::cout << e << std::endl; 14 | } 15 | }; 16 | 17 | }} 18 | var thread = function() 19 | { 20 | var _self = {}; 21 | _self.mutex = {}; 22 | _self.list = {}; 23 | {{ 24 | __NERD_OBJECT(_self["mutex"])->bind = new __NERD_UNORDERED(); 25 | __NERD_OBJECT(_self["list"])->bind = new std::vector(); 26 | }} 27 | 28 | _self.run = function(_cb) 29 | { 30 | {{ 31 | if(_cb.type == NerdCore::Enum::Type::Function) 32 | { 33 | ((std::vector*)__NERD_OBJECT(_self["list"])->bind)->emplace_back(std::thread(__Nerd_THREADED_CALL, _cb)); 34 | } 35 | }} 36 | }; 37 | 38 | _self.lock = function(_key) 39 | { 40 | {{ 41 | if(!_key) _key = "default"; 42 | std::lock_guard guard((*(((__NERD_UNORDERED*)__NERD_OBJECT(_self["mutex"])->bind)))[(std::string)_key]); 43 | }} 44 | }; 45 | 46 | _self.waitForAll = function() 47 | { 48 | {{ 49 | for(auto& _thread: *((std::vector*)__NERD_OBJECT(_self["list"])->bind)) 50 | { 51 | _thread.join(); 52 | } 53 | }} 54 | }; 55 | return _self; 56 | }; 57 | 58 | 59 | 60 | return thread; -------------------------------------------------------------------------------- /nerd_modules/wasm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wasm", 3 | "description": "Nerd base wasm module", 4 | "main": "index.ng", 5 | "bugs": 6 | { 7 | "url": "https://github.com/Nerdlang/Nerd/issues" 8 | }, 9 | 10 | "directories": 11 | { 12 | "root": ".", 13 | "lib": "lib" 14 | }, 15 | "homepage": "https://github.com/Nerdlang/Nerd#readme", 16 | "keywords": 17 | [ 18 | "nerdlang", 19 | "nerd", 20 | "wasm", 21 | "webassembly", 22 | "asmjs" 23 | ], 24 | "license": "MIT", 25 | "licenses": [ 26 | { 27 | "type": "MIT", 28 | "url": "https://github.com/Nerdlang/Nerd/blob/master/LICENSE" 29 | } 30 | ], 31 | "repository": 32 | { 33 | "type": "git", 34 | "url": "git+ssh://git@github.com/Nerdlang/Nerd.git" 35 | }, 36 | "version": "0.0.1", 37 | "nerd": 38 | { 39 | "env": ["wasm"], 40 | "lib": ["--bind"] 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nerd", 3 | "version": "0.0.16", 4 | "description": "Nerd. JS native compiler.", 5 | "main": "nerd", 6 | "bin": { 7 | "nerd": "./nerd.js" 8 | }, 9 | "scripts": {}, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/nerdlang/nerd.git" 13 | }, 14 | "keywords": [ 15 | "nerd", 16 | "nerdlang", 17 | "nerd-lang", 18 | "compilation", 19 | "crossplatform", 20 | "simple", 21 | "speed", 22 | "io", 23 | "iot", 24 | "socket", 25 | "android", 26 | "linux", 27 | "windows", 28 | "arduino", 29 | "raspberry", 30 | "stm32", 31 | "nucleo", 32 | "http", 33 | "https", 34 | "bytecode", 35 | "wasm", 36 | "arm", 37 | "arm64", 38 | "msbuild", 39 | "cl", 40 | "webserver", 41 | "webview" 42 | ], 43 | "author": "Adrien THIERRY ", 44 | "license": "MIT", 45 | "licenses": [ 46 | { 47 | "type": "MIT", 48 | "url": "https://github.com/nerdlang/nerd/blob/master/LICENSE" 49 | } 50 | ], 51 | "bugs": { 52 | "url": "https://github.com/nerdlang/nerd/issues" 53 | }, 54 | "homepage": "https://nerdlang.org", 55 | "dependencies": { 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /self/base/compiler/target.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | var target = ["win-x86-32", "win-x86-64", "linux-x86-32", "linux-x86-64", "linux-arm32v7", 25 | "arduino-uno", "arduino-mega1280", "arduino-mega2560", 26 | "wasm", "wast", "asm-js", 27 | "mac-osx", 28 | "nucleo-l152re", "nucleo-l432kc" 29 | ]; 30 | module.exports = target; 31 | -------------------------------------------------------------------------------- /self/base/util/copyRecursive.js: -------------------------------------------------------------------------------- 1 | var fs = require("fs"); 2 | var path = require("path"); 3 | 4 | var copyRecursiveSync = function(src, dest) 5 | { 6 | if(!fs.existsSync(src)) 7 | { 8 | console.log("[!] Warning: " + src + " doesn't exist"); 9 | return; 10 | } 11 | if(fs.lstatSync( src ).isDirectory()) 12 | { 13 | var _newDest = path.dirname(dest); 14 | global.copyDirSync(src, _newDest, true); 15 | } 16 | else 17 | { 18 | var _path = []; 19 | 20 | var _newDest = path.dirname(dest); 21 | 22 | _path.push(_newDest); 23 | 24 | while(path.dirname(_newDest) != _newDest) 25 | { 26 | _newDest = path.dirname(_newDest); 27 | if(_newDest.indexOf(global.NERD_PATH) == 0) 28 | { 29 | _path.push(_newDest); 30 | } 31 | } 32 | 33 | for(var i = _path.length; i > -1; i--) 34 | { 35 | try 36 | { 37 | fs.mkdirSync(_path[i]); 38 | } 39 | catch(e){} 40 | } 41 | 42 | fs.copyFileSync(src, dest); 43 | } 44 | }; 45 | 46 | module.exports = copyRecursiveSync; 47 | -------------------------------------------------------------------------------- /self/compiler/native/nerdcore/src/class/number.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | namespace NerdCore::Class::NUMBER 25 | { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /self/compiler/native/nerdcore/src/class/number_header.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | namespace NerdCore::Class::NUMBER 25 | { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /self/compiler/native/nerdcore/src/classes.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | #pragma once 25 | 26 | #include "./class/array.h" 27 | #include "./class/function.h" 28 | #include "./class/native.h" 29 | #include "./class/struct.h" 30 | #include "./class/fixed_array.h" 31 | #include "./class/object.h" 32 | #include "./class/string.h" 33 | -------------------------------------------------------------------------------- /self/compiler/native/nerdcore/src/enum.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | namespace NerdCore::Enum 25 | { 26 | enum Type 27 | { 28 | Null, 29 | Boolean, 30 | Number, 31 | String, 32 | Native, 33 | NativeTPL, 34 | Struct, 35 | FixedArray, 36 | Array, 37 | Object, 38 | Function, 39 | }; 40 | } -------------------------------------------------------------------------------- /self/compiler/native/nerdcore/src/functions.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | NerdCore::VAR getArguments(int argc, char** argv) 25 | { 26 | NerdCore::VAR __NJS_ARGS = new NerdCore::Class::Array(); 27 | for( int i = 0; i < argc; i++) 28 | { 29 | __NJS_ARGS[i] = argv[i]; 30 | } 31 | return __NJS_ARGS; 32 | } 33 | -------------------------------------------------------------------------------- /self/compiler/native/nerdcore/src/native.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | #include "native/int.h" 25 | #include "native/double.h" 26 | -------------------------------------------------------------------------------- /self/compiler/native/nerdcore/src/native_header.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | #include "native/int_header.h" 25 | #include "native/double_header.h" 26 | -------------------------------------------------------------------------------- /self/compiler/native/nerdcore/src/nerd.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | #include "nerd.hpp" 25 | 26 | #include "functions.h" 27 | #include "native.h" 28 | #include "values.h" 29 | #include "class/number.h" 30 | #include "var.h" 31 | #include "objmgmt.h" 32 | #include "classes.h" 33 | #include "operator.h" 34 | #include "stdfn.h" -------------------------------------------------------------------------------- /self/compiler/native/nerdcore/test/array.cpp: -------------------------------------------------------------------------------- 1 | #include "../src/nerd.hpp" 2 | using namespace NerdCore; 3 | using namespace NerdCore::Global; 4 | using namespace NerdCore::Class; 5 | using namespace NerdCore::Functions; 6 | 7 | int main(int argc, char** argv) 8 | { 9 | var arr = new Array(); 10 | println(arr); 11 | 12 | var initArr = new Array(0, "one", 2, "three"); 13 | println(initArr); 14 | 15 | var initArr2 = {"zero", 1, "two", 3}; 16 | println(initArr2); 17 | 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /self/compiler/native/nerdcore/test/cast.cpp: -------------------------------------------------------------------------------- 1 | #include "../src/nerd.hpp" 2 | 3 | using namespace NerdCore; 4 | using namespace NerdCore::Global; 5 | using namespace NerdCore::Class; 6 | using namespace NerdCore::Functions; 7 | 8 | int main() 9 | { 10 | try 11 | { 12 | var _str = "string"; 13 | std::cout << "_str: " << _str << std::endl; 14 | var _nbr = 123; 15 | std::cout << "_nbr: " << _nbr << std::endl; 16 | const char* c = _str; 17 | std::cout << "char: " << c << std::endl; 18 | std::string s = _str; 19 | std::cout << "string: " << s << std::endl; 20 | std::string_view sv = _str; 21 | std::cout << "string_view: " << sv << std::endl; 22 | int i = _nbr; 23 | std::cout << "int: " << i << std::endl; 24 | double d = _nbr; 25 | std::cout << "double: " << d << std::endl; 26 | long long ll = _nbr; 27 | std::cout << "long long: " << ll << std::endl; 28 | bool b = _nbr; 29 | std::cout << "bool: " << b << std::endl; 30 | } 31 | catch(var& error) 32 | { 33 | println(error); 34 | } 35 | return 0; 36 | } -------------------------------------------------------------------------------- /self/compiler/native/nerdcore/test/native.cpp: -------------------------------------------------------------------------------- 1 | #include "../src/nerd.hpp" 2 | using namespace NerdCore; 3 | using namespace NerdCore::Global; 4 | using namespace NerdCore::Class; 5 | using namespace NerdCore::Functions; 6 | 7 | struct s 8 | { 9 | int i = 10; 10 | int j; 11 | }; 12 | 13 | s* typeStruct = new s(); 14 | 15 | int main(int argc, char** argv) 16 | { 17 | try 18 | { 19 | #if __cplusplus > 202002L 20 | auto __fn = []() {std::cout << "Hello" << std::endl;}; 21 | 22 | var _struct = new NativeTPL(new s({3,4})); 23 | std::cout << _struct.toNative(typeStruct)->i << std::endl; 24 | 25 | var _fn = new NativeTPL(__fn); 26 | _fn.toNative(__fn)(); 27 | #else 28 | var _struct = new NativeTPL(new s({3,4})); 29 | std::cout << _struct.toNative(typeStruct)->i << std::endl; 30 | #endif 31 | } 32 | catch(var e) 33 | { 34 | println(e); 35 | } 36 | return 0; 37 | } 38 | -------------------------------------------------------------------------------- /self/compiler/native/nerdcore/test/object.cpp: -------------------------------------------------------------------------------- 1 | #include "../src/nerd.hpp" 2 | using namespace NerdCore; 3 | using namespace NerdCore::Global; 4 | using namespace NerdCore::Class; 5 | using namespace NerdCore::Functions; 6 | 7 | int main(int argc, char** argv) 8 | { 9 | var args = getArguments(argc, argv); 10 | println(args); 11 | 12 | var o = new Object(); 13 | o["int"] = 1; 14 | o["string"] = "str"; 15 | println(o); 16 | 17 | var init = new Object( 18 | { 19 | {"one", 1}, // number 20 | {"two", "2"}, // string 21 | {"three", {1,2,3}}, // array 22 | {"four", new Object("key", "value")}, // sub object with only one key 23 | {"five", new Object({"key", 1})}, // another way with non string value 24 | {"six", new Object({ {"key", 2} })}, // another way with non string value 25 | }); 26 | println(init); 27 | 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /self/compiler/native/squel/wasm.cpp: -------------------------------------------------------------------------------- 1 | #define __NERD_ENV_WASM 2 | #include "nerdcore/src/nerd.hpp" 3 | 4 | using namespace NerdCore::Global; 5 | using namespace NerdCore::Functions; 6 | 7 | var __NERD_ENV = "wasm"; 8 | var __NERD_PLATFORM = "{{__PLATFORM__}}"; 9 | NerdCore::Global::var __NERD_ARGS = new NerdCore::Class::Array(); 10 | 11 | {INCLUDE} 12 | 13 | int main(int __NERD_VARLENGTH, char* __Nerd_Argv[]) 14 | { 15 | {DECL} 16 | 17 | NerdCore::VAR __NERD_VARARGS[__NERD_VARLENGTH]; 18 | for( int i = 0; i < __NERD_VARLENGTH; i++) 19 | { 20 | __NERD_ARGS[i] = __Nerd_Argv[i]; 21 | __NERD_VARARGS[i] = __Nerd_Argv[i]; 22 | } 23 | 24 | try 25 | { 26 | 27 | {INIT} 28 | 29 | #ifdef __NERD_INIT_RAND_SEED 30 | srand (time(NULL)); 31 | #endif 32 | 33 | { 34 | {CODE} 35 | } 36 | 37 | } 38 | catch(NerdCore::VAR __NERD_Global_Exception) 39 | { 40 | __NERD_Log_Console(__NERD_Global_Exception); 41 | exit(1); 42 | } 43 | return 0; 44 | } 45 | -------------------------------------------------------------------------------- /self/compiler/self/base/util/copyRecursive.js: -------------------------------------------------------------------------------- 1 | var copyRecursiveSync = function(src, dest) 2 | { 3 | if(!fs.existsSync(src)) 4 | { 5 | console.log("[!] Warning: " + src + " doesn't exist"); 6 | return; 7 | } 8 | if(fs.lstatSync( src ).isDirectory()) 9 | { 10 | var _newDest = path.dirname(dest); 11 | copyDirSync(src, _newDest, true); 12 | } 13 | else 14 | { 15 | var _path = []; 16 | 17 | var _newDest = path.dirname(dest); 18 | 19 | _path.push(_newDest); 20 | 21 | while(path.dirname(_newDest) != _newDest) 22 | { 23 | _newDest = path.dirname(_newDest); 24 | if(_newDest.indexOf(NERD_PATH) == 0) 25 | { 26 | _path.push(_newDest); 27 | } 28 | } 29 | 30 | for(var i = _path.length; i > -1; i--) 31 | { 32 | try 33 | { 34 | fs.mkdirSync(_path[i]); 35 | } 36 | catch(e){} 37 | } 38 | 39 | fs.copyFileSync(src, dest); 40 | } 41 | }; 42 | 43 | module.exports = copyRecursiveSync; 44 | -------------------------------------------------------------------------------- /self/lib/check/isAssignment.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | function isAssignment(_token) 25 | { 26 | if(ASSIGNMENT_OPERATOR.indexOf(_token) < 0) 27 | { 28 | return {error: false, check: false}; 29 | } 30 | return {error: false, check: true, type: "ASSIGNMENT"}; 31 | } 32 | 33 | module.exports = isAssignment; -------------------------------------------------------------------------------- /self/lib/check/isBoolean.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | function isBoolean(_token) 25 | { 26 | if(BOOLEAN_KEYWORD.indexOf(_token) < 0) 27 | { 28 | return {error: false, check: false}; 29 | } 30 | return {error: false, check: true, type: "BOOLEAN"}; 31 | } 32 | 33 | module.exports = isBoolean; -------------------------------------------------------------------------------- /self/lib/check/isDelimiter.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | function isDelimiter(_token) 25 | { 26 | if(DELIMITER.indexOf(_token) < 0) 27 | { 28 | return {error: false, check: false}; 29 | } 30 | return {error: false, check: true, type: _token}; 31 | } 32 | 33 | module.exports = isDelimiter; -------------------------------------------------------------------------------- /self/lib/check/isIncrement.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | function isIncrement(_token) 25 | { 26 | if(INCREMENT_TOKENS.indexOf(_token) < 0) 27 | { 28 | return {error: false, check: false}; 29 | } 30 | return {error: false, check: true, type: "INCREMENT"}; 31 | } 32 | 33 | module.exports = isIncrement; -------------------------------------------------------------------------------- /self/lib/check/isInitOperator.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | function isInitOperator(_token) 25 | { 26 | if(INIT_OPERATOR.indexOf(_token) < 0) 27 | { 28 | return {error: false, check: false}; 29 | } 30 | return {error: false, check: true, type: _token}; 31 | } 32 | 33 | module.exports = isInitOperator; -------------------------------------------------------------------------------- /self/lib/check/isKeyword.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | function isKeyword(_token) 25 | { 26 | if(KEYWORD.indexOf(_token) < 0) 27 | { 28 | return {error: false, check: false}; 29 | } 30 | return {error: false, check: true, type: _token.toUpperCase()}; 31 | } 32 | 33 | module.exports = isKeyword; -------------------------------------------------------------------------------- /self/lib/check/isObjectOperator.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | function isObjectOperator(_token) 25 | { 26 | if(OBJECT_OPERATOR.indexOf(_token) < 0) 27 | { 28 | return {error: false, check: false}; 29 | } 30 | return {error: false, check: true, type: _token}; 31 | } 32 | 33 | module.exports = isObjectOperator; -------------------------------------------------------------------------------- /self/lib/check/isOperator.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | function isOperator(_token) 25 | { 26 | if(ALL_TOKEN_LOGIC.indexOf(_token) < 0) 27 | { 28 | return {error: false, check: false}; 29 | } 30 | return {error: false, check: true, type: "OPERATOR"}; 31 | } 32 | 33 | module.exports = isOperator; -------------------------------------------------------------------------------- /self/lib/check/isSemi.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | function isSemi(_token) 25 | { 26 | if(_token != ";") 27 | { 28 | return {error: false, check: false}; 29 | } 30 | return {error: false, check: true, type: "SEMI"}; 31 | } 32 | 33 | module.exports = isSemi; -------------------------------------------------------------------------------- /self/lib/check/isUnary.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2021 NerdLang - Adrien THIERRY and contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | 22 | */ 23 | 24 | function isUnary(_token) 25 | { 26 | if(UNARY_TOKENS.indexOf(_token) < 0) 27 | { 28 | return {error: false, check: false}; 29 | } 30 | return {error: false, check: true, type: "UNARY"}; 31 | } 32 | 33 | module.exports = isUnary; -------------------------------------------------------------------------------- /self/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nerdlang", 3 | "version": "0.0.16", 4 | "description": "NerdLang. Simple yet efficient.", 5 | "main": "nerd", 6 | "bin": { 7 | "nerd": "./nerd.js" 8 | }, 9 | "scripts": {}, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/nerdlang/nerd.git" 13 | }, 14 | "keywords": [ 15 | "nerd", 16 | "nerdlang", 17 | "nerd-lang", 18 | "compilation", 19 | "crossplatform", 20 | "simple", 21 | "speed", 22 | "io", 23 | "iot", 24 | "socket", 25 | "android", 26 | "linux", 27 | "windows", 28 | "arduino", 29 | "raspberry", 30 | "stm32", 31 | "nucleo", 32 | "http", 33 | "https", 34 | "bytecode", 35 | "wasm", 36 | "arm", 37 | "arm64", 38 | "msbuild", 39 | "cl", 40 | "webserver", 41 | "webview" 42 | ], 43 | "author": "Adrien THIERRY (https://seraum.com)", 44 | "license": "MIT", 45 | "licenses": [ 46 | { 47 | "type": "MIT", 48 | "url": "https://github.com/nerdlang/nerd/blob/master/LICENSE" 49 | } 50 | ], 51 | "bugs": { 52 | "url": "https://github.com/nerdlang/nerd/issues" 53 | }, 54 | "homepage": "https://nerdlang.org", 55 | "dependencies": { 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /test/accessor.ng: -------------------------------------------------------------------------------- 1 | var a = "abcdef"; 2 | var b = [0,1,2,3]; 3 | var c = 4 | { 5 | "zero": 0, 6 | "one": 1, 7 | }; 8 | 9 | var fn = function(_arg) 10 | { 11 | return _arg; 12 | }; 13 | 14 | fn(a[0]); 15 | 16 | fn(b[0]); 17 | 18 | fn(c["zero"]); -------------------------------------------------------------------------------- /test/builtin.ng: -------------------------------------------------------------------------------- 1 | var str = "abcdef"; 2 | var args = arguments(); 3 | 4 | var obj = { 5 | "1":1, 6 | "2":2, 7 | "3":3, 8 | } 9 | 10 | var length = length_of(str); 11 | var size = size_of(str); 12 | var sizeOfObj = size_of(obj); 13 | var lengthOfObj = length_of(obj); 14 | 15 | {{ 16 | std::cout << "length of('abcdef'): " << length << std::endl; 17 | std::cout << "size of('abcdef'): " << size << std::endl; 18 | std::cout << std::endl; 19 | std::cout << "lengthof(obj): " << lengthOfObj << std::endl; 20 | std::cout << "sizeof(obj): " << sizeOfObj << std::endl; 21 | }} -------------------------------------------------------------------------------- /test/comments.ng: -------------------------------------------------------------------------------- 1 | /* 2 | multiline comment 3 | */ 4 | 5 | // one line comment 6 | 7 | var a = "ok"; 8 | 9 | var fn = function() 10 | { 11 | /* 12 | Multiline comment 13 | */ 14 | // One line comment 15 | }; 16 | 17 | fn(); -------------------------------------------------------------------------------- /test/conditionals.ng: -------------------------------------------------------------------------------- 1 | 2 | 3 | var a = 0; 4 | 5 | if(a == 0) 6 | { 7 | 8 | } 9 | else if(a == 1) 10 | { 11 | 12 | } 13 | else 14 | { 15 | 16 | } -------------------------------------------------------------------------------- /test/function.ng: -------------------------------------------------------------------------------- 1 | var fn = function(_arg, a2, a3, a4) 2 | { 3 | var args = arguments(); 4 | 5 | for(var i = 0; i < length_of(args); i++) 6 | { 7 | {{ 8 | std::cout << args[i] << std::endl; 9 | }} 10 | } 11 | return { 12 | a: _arg, 13 | }; 14 | }; 15 | 16 | fn(); 17 | 18 | fn("a", "b", "c", "d", "e"); -------------------------------------------------------------------------------- /test/loop.ng: -------------------------------------------------------------------------------- 1 | for(var i = 0; i < 10; i++) 2 | { 3 | var a = i + 1; 4 | } 5 | 6 | var a = 3; 7 | 8 | while(a) 9 | { 10 | a--; 11 | } 12 | 13 | 14 | do 15 | { 16 | a++; 17 | }while(a < 3); -------------------------------------------------------------------------------- /test/native.ng: -------------------------------------------------------------------------------- 1 | var _cli = arguments(); 2 | 3 | for(var i = 0; i < length_of(_cli); i++) 4 | { 5 | {{ 6 | std::cout << i << " : " << _cli[i] << " - " << &_cli[i] << std::endl; 7 | }} 8 | } 9 | -------------------------------------------------------------------------------- /test/var.ng: -------------------------------------------------------------------------------- 1 | var a = 0; 2 | 3 | var b = 1.1; 4 | 5 | var c = "Hello"; 6 | 7 | var d = true; 8 | 9 | var e = false; 10 | 11 | var f = 1 < 1; 12 | 13 | var g = null; 14 | 15 | var h = function(){}; 16 | 17 | var i = function(arg, brg, crg) 18 | { 19 | return arg + 1; 20 | }; 21 | 22 | var j = []; 23 | 24 | var k = {}; 25 | 26 | var l = 27 | { 28 | a: "a", 29 | b: "b", 30 | } 31 | 32 | var m = [0,1,2,3,4]; 33 | 34 | m = [[]]; 35 | 36 | a = 1; 37 | 38 | b = 0; 39 | 40 | c = {}; 41 | 42 | d = []; 43 | 44 | e = { 45 | hello: "world" 46 | }; 47 | 48 | f = ["0", 1, "2"]; 49 | 50 | g = function(_arg) 51 | { 52 | return _arg++; 53 | }; 54 | 55 | a = g(1); --------------------------------------------------------------------------------