Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
hikalium
nv
Repository navigation
Code
Issues
1
(1)
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
More
items
Home
Jump to bottom
hikalium edited this page
Sep 1, 2016
·
7 revisions
nv言語へようこそ!
nv言語は,non-volatileな変数,つまり永続変数をネイティブにサポートするプログラミング言語です.
nv言語は,ほとんどの演算子を仕様で定義しません.
演算子は,ユーザーが自由に作成することができ,非常に柔軟な文法を実現可能です.
デフォルトの言語セットは提供されます.
同等のことを目指すほかの実装として,川合秀実氏による
Essen
が存在し,現在はEssenの仕様に基づき独自に実装しています.
nv言語の構文解析
入力はまずトークン列に分割されます.トークン列は,各文字のタイプが分かっていれば生成可能です.
トークン列の中で,演算子だと分かっているトークンすべてを,対応する演算子オブジェクトで置換します.
トークン列の中で,数値だと分かっているトークン全てを,対応する数値オブジェクトで置換します.
トークン列に含まれる演算子の中で,opList中で最も前にある演算子をひとつ選びます.
(opListは優先順位でソートされており,優先順位が等しい場合には,先に追加された演算子のほうが優先的に選択されます.)
結合順(右・左)に基づき,演算子の実行を試みます.
結合順は,演算子の優先順位の偶奇で決定されます.(偶数: 左結合, 奇数: 右結合)
演算子の実行に失敗した場合には,以下の手順に従います.
同じトークンを対象とし,実行を試みた演算子より優先順位が低い演算子があれば,その演算子の演算子オブジェクトで置換します.
上記のような演算子が存在しない場合は, 未定トークンで置換します.
演算子の実行に成功した場合は,その結果に応じてトークン列が変更されます.
上記の作業を,該当する演算子がなくなるまで繰り返します.
繰り返した結果,それでもまだ未定トークン(Unknown)が残っていれば,エラーとします.
エラーでなければ,トークン列の中で最後に存在する値オブジェクトの評価値を,実行結果とします.
実行中にプログラムによる画面への出力が一度も行われていなければ,その実行結果を表示します.
Wiki pages
Pages
12
Loading
Home
nv言語へようこそ!
nv言語の構文解析
Loading
DataTypes
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
LANG00
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
LANG01
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
LANG02
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Memo
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
MemoryManagement
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Node Type とTerm Type
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
prevResearch
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
SimilarityToPlan9
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Structure
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
グラフをたどる道順のパス表記
Uh oh!
There was an error while loading.
Please reload this page
.
Clone this wiki locally
You can’t perform that action at this time.