This document discusses syntax definition and provides examples using various syntax definition formalisms including Backus-Naur Form (BNF), Extended Backus-Naur Form (EBNF), and SDF3. It introduces concepts of lexical syntax, context-free syntax, abstract syntax, disambiguation, and testing syntax definitions. Specific examples are provided for defining the syntax of an expression language using BNF, EBNF, and SDF3. Testing syntax definitions using Spoofax is also discussed with examples of test cases for lexical and context-free syntax.
Declarative Syntax Definition - Grammars and TreesGuido Wachsmuth
This lecture lays the theoretic foundations for declarative syntax formalisms and syntax-based language processors, which we will discuss later in the course. We introduce the notions of formal languages, formal grammars, and syntax trees, starting from Chomsky's work on formal grammars as generative devices.
We start with a formal model of languages and investigate formal grammars and their derivation relations as finite models of infinite productivity. We further discuss several classes of formal grammars and their corresponding classes of formal languages. In a second step, we introduce the word problem, analyse its decidability and complexity for different classes of formal languages, and discuss consequences of this analysis on language processing. We conclude the lecture with a discussion about parse tree construction, abstract syntax trees, and ambiguities.
Declarative Syntax Definition - Grammars and TreesGuido Wachsmuth
This lecture lays the theoretic foundations for declarative syntax formalisms and syntax-based language processors, which we will discuss later in the course. We introduce the notions of formal languages, formal grammars, and syntax trees, starting from Chomsky's work on formal grammars as generative devices.
We start with a formal model of languages and investigate formal grammars and their derivation relations as finite models of infinite productivity. We further discuss several classes of formal grammars and their corresponding classes of formal languages. In a second step, we introduce the word problem, analyse its decidability and complexity for different classes of formal languages, and discuss consequences of this analysis on language processing. We conclude the lecture with a discussion about parse tree construction, abstract syntax trees, and ambiguities.
Declare Your Language: Syntactic (Editor) ServicesEelco Visser
Lecture 3 on compiler construction course on definition of lexical syntax and syntactic services that can be derived from syntax definitions such as formatting and syntactic completion
Slides from my talk at London Perl Mongers on 2018-03-22 covering Perl6 Signatures in detail.
Special bonus slides for Type Checking and Multi methods.
Top down parsers are more restricted than bottom up parsers. However, ANTLR uses a top-down parser. In this chapter parse tables and recursive descent parsers are described.
We start with a linguistic discussion of language, its properties, and the study of language in philosophy and linguistics. We then investigate natural languages, controlled languages, and artificial languages to emphasise the human ability to control and construct languages. At the end, we arrive at the notion of software languages as means to communicate software between people.
Declare Your Language: Syntactic (Editor) ServicesEelco Visser
Lecture 3 on compiler construction course on definition of lexical syntax and syntactic services that can be derived from syntax definitions such as formatting and syntactic completion
Slides from my talk at London Perl Mongers on 2018-03-22 covering Perl6 Signatures in detail.
Special bonus slides for Type Checking and Multi methods.
Top down parsers are more restricted than bottom up parsers. However, ANTLR uses a top-down parser. In this chapter parse tables and recursive descent parsers are described.
We start with a linguistic discussion of language, its properties, and the study of language in philosophy and linguistics. We then investigate natural languages, controlled languages, and artificial languages to emphasise the human ability to control and construct languages. At the end, we arrive at the notion of software languages as means to communicate software between people.
awk is a very versatile programming language for working on text files. It is more powerful than sed but less complex than C. It is an excellent filter and report writer. In this class I will go over the elements and features of gawk, (the Free Software foundation version of awk), examples and a few one-liners.
In this part of the course, meta languages for describing grammars are introduced. Bottom-up and top-down parsers are derivation steps are described. Finally, ambiguous grammars are defined.
Declarative Type System Specification with StatixEelco Visser
In this talk I present the design of Statix, a new constraint-based language for the executable specification of type systems. Statix specifications consist of predicates that define the well-formedness of language constructs in terms of built-in and user-defined constraints. Statix has a declarative semantics that defines whether a model satisfies a constraint. The operational semantics of Statix is defined as a sound constraint solving algorithm that searches for a solution for a constraint. The aim of the design is that Statix users can ignore the execution order of constraint solving and think in terms of the declarative semantics.
A distinctive feature of Statix is its use of scope graphs, a language parametric framework for the representation and querying of the name binding facts in programs. Since types depend on name resolution and name resolution may depend on types, it is typically not possible to construct the entire scope graph of a program before type constraint resolution. In (algorithmic) type system specifications this leads to explicit staging of the construction and querying of the type environment (class table, symbol table). Statix automatically stages the construction of the scope graph of a program such that queries are never executed when their answers may be affected by future scope graph extension. In the talk, I will explain the design of Statix by means of examples.
https://eelcovisser.org/post/309/declarative-type-system-specification-with-statix
Compiler Construction | Lecture 6 | Introduction to Static AnalysisEelco Visser
Lecture introducing the need for static analysis in addition to parsing, the complications caused by names, and an introduction to name resolution with scope graphs
Mobile App Development Company In Noida | Drona InfotechDrona Infotech
Looking for a reliable mobile app development company in Noida? Look no further than Drona Infotech. We specialize in creating customized apps for your business needs.
Visit Us For : https://www.dronainfotech.com/mobile-application-development/
Globus Connect Server Deep Dive - GlobusWorld 2024Globus
We explore the Globus Connect Server (GCS) architecture and experiment with advanced configuration options and use cases. This content is targeted at system administrators who are familiar with GCS and currently operate—or are planning to operate—broader deployments at their institution.
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxrickgrimesss22
Discover the essential features to incorporate in your Winzo clone app to boost business growth, enhance user engagement, and drive revenue. Learn how to create a compelling gaming experience that stands out in the competitive market.
OpenMetadata Community Meeting - 5th June 2024OpenMetadata
The OpenMetadata Community Meeting was held on June 5th, 2024. In this meeting, we discussed about the data quality capabilities that are integrated with the Incident Manager, providing a complete solution to handle your data observability needs. Watch the end-to-end demo of the data quality features.
* How to run your own data quality framework
* What is the performance impact of running data quality frameworks
* How to run the test cases in your own ETL pipelines
* How the Incident Manager is integrated
* Get notified with alerts when test cases fail
Watch the meeting recording here - https://www.youtube.com/watch?v=UbNOje0kf6E
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Łukasz Chruściel
No one wants their application to drag like a car stuck in the slow lane! Yet it’s all too common to encounter bumpy, pothole-filled solutions that slow the speed of any application. Symfony apps are not an exception.
In this talk, I will take you for a spin around the performance racetrack. We’ll explore common pitfalls - those hidden potholes on your application that can cause unexpected slowdowns. Learn how to spot these performance bumps early, and more importantly, how to navigate around them to keep your application running at top speed.
We will focus in particular on tuning your engine at the application level, making the right adjustments to ensure that your system responds like a well-oiled, high-performance race car.
Check out the webinar slides to learn more about how XfilesPro transforms Salesforce document management by leveraging its world-class applications. For more details, please connect with sales@xfilespro.com
If you want to watch the on-demand webinar, please click here: https://www.xfilespro.com/webinars/salesforce-document-management-2-0-smarter-faster-better/
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Crescat
Crescat is industry-trusted event management software, built by event professionals for event professionals. Founded in 2017, we have three key products tailored for the live event industry.
Crescat Event for concert promoters and event agencies. Crescat Venue for music venues, conference centers, wedding venues, concert halls and more. And Crescat Festival for festivals, conferences and complex events.
With a wide range of popular features such as event scheduling, shift management, volunteer and crew coordination, artist booking and much more, Crescat is designed for customisation and ease-of-use.
Over 125,000 events have been planned in Crescat and with hundreds of customers of all shapes and sizes, from boutique event agencies through to international concert promoters, Crescat is rigged for success. What's more, we highly value feedback from our users and we are constantly improving our software with updates, new features and improvements.
If you plan events, run a venue or produce festivals and you're looking for ways to make your life easier, then we have a solution for you. Try our software for free or schedule a no-obligation demo with one of our product specialists today at crescat.io
We describe the deployment and use of Globus Compute for remote computation. This content is aimed at researchers who wish to compute on remote resources using a unified programming interface, as well as system administrators who will deploy and operate Globus Compute services on their research computing infrastructure.
Atelier - Innover avec l’IA Générative et les graphes de connaissancesNeo4j
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Allez au-delà du battage médiatique autour de l’IA et découvrez des techniques pratiques pour utiliser l’IA de manière responsable à travers les données de votre organisation. Explorez comment utiliser les graphes de connaissances pour augmenter la précision, la transparence et la capacité d’explication dans les systèmes d’IA générative. Vous partirez avec une expérience pratique combinant les relations entre les données et les LLM pour apporter du contexte spécifique à votre domaine et améliorer votre raisonnement.
Amenez votre ordinateur portable et nous vous guiderons sur la mise en place de votre propre pile d’IA générative, en vous fournissant des exemples pratiques et codés pour démarrer en quelques minutes.
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Mind IT Systems
Healthcare providers often struggle with the complexities of chronic conditions and remote patient monitoring, as each patient requires personalized care and ongoing monitoring. Off-the-shelf solutions may not meet these diverse needs, leading to inefficiencies and gaps in care. It’s here, custom healthcare software offers a tailored solution, ensuring improved care and effectiveness.
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
As part of the DOE Integrated Research Infrastructure (IRI) program, NERSC at Lawrence Berkeley National Lab and ALCF at Argonne National Lab are working closely with General Atomics on accelerating the computing requirements of the DIII-D experiment. As part of the work the team is investigating ways to speedup the time to solution for many different parts of the DIII-D workflow including how they run jobs on HPC systems. One of these routes is looking at Globus Compute as a way to replace the current method for managing tasks and we describe a brief proof of concept showing how Globus Compute could help to schedule jobs and be a tool to connect compute at different facilities.
Zoom is a comprehensive platform designed to connect individuals and teams efficiently. With its user-friendly interface and powerful features, Zoom has become a go-to solution for virtual communication and collaboration. It offers a range of tools, including virtual meetings, team chat, VoIP phone systems, online whiteboards, and AI companions, to streamline workflows and enhance productivity.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Enterprise Resource Planning System includes various modules that reduce any business's workload. Additionally, it organizes the workflows, which drives towards enhancing productivity. Here are a detailed explanation of the ERP modules. Going through the points will help you understand how the software is changing the work dynamics.
To know more details here: https://blogs.nyggs.com/nyggs/enterprise-resource-planning-erp-system-modules/
11. Syntax Definition 11
lexical syntax
words made from letters
irrelevant structure
literals 42 "foo" true
identifiers x foo
keywords if while
operators + *
whitespace // FIXME
regular expressions
context-free syntax
sentences made from words
relevant structure
context-free grammars
Backus-Naur Form
Extended Backus-Naur Form
computer science
syntax
13. Syntax Definition 13
basics
strings "nil"
character classes [a-zA-Z]
combinators
concatenation E1 E2
option E?
repetition (zero or more) E*
repetition (one or more) E+
alternative E1 | E2
regular expressions
14. Syntax Definition 14
/* factorial function */
let
var x := 0
function fact(n : int) : int =
if n < 1 then 1 else (n * fact(n - 1))
in
for i := 1 to 3 do (
x := x + fact(i);
printint(x);
print(" ")
)
end
Tiger
the lecture language
15. Syntax Definition 15
An identifier is a sequence of letters,
digits, and under-scores, starting with a
letter. Uppercase letters are distinguished
from lowercase.
Tiger
lexical syntax
16. Syntax Definition 15
An identifier is a sequence of letters,
digits, and under-scores, starting with a
letter. Uppercase letters are distinguished
from lowercase.
[a-zA-Z][a-zA-Z0-9_]*
Tiger
lexical syntax
17. Syntax Definition 15
An identifier is a sequence of letters,
digits, and under-scores, starting with a
letter. Uppercase letters are distinguished
from lowercase.
[a-zA-Z][a-zA-Z0-9_]*
A comment may appear between any two
tokens. Comments start with /* and end
with */ and may be nested.
Tiger
lexical syntax
18. Syntax Definition 15
An identifier is a sequence of letters,
digits, and under-scores, starting with a
letter. Uppercase letters are distinguished
from lowercase.
[a-zA-Z][a-zA-Z0-9_]*
A comment may appear between any two
tokens. Comments start with /* and end
with */ and may be nested.
Tiger
lexical syntax
Pumping Lemma
24. Syntax Definition 21
basics
strings "nil"
symbols s
combinators
concatenation E1,E2
option [E]
repetition (zero or more) {E}
alternative E1 | E2
production s = E1 | … | En ;
Extended Backus-Naur Form
29. Syntax Definition 26
basics
strings "nil"
character classes [a-zA-Z]
complements ~[a-zA-Z]
sorts S
combinators
concatenation E1 E2
option E?
repetition (zero or more) E*
with separator {E s}*
repetition (one or more) E+
with separator {E s}+
alternative E1 | E2
production S = E
SDF3
lexical syntax
33. Syntax Definition 30
basics
strings "nil"
sorts S
combinators
concatenation E1 E2
option E?
repetition (zero or more) E*
with separator {E s}*
repetition (one or more) E+
with separator {E s}+
production S = E
SDF3
context-free syntax
38. Syntax Definition 35
tree
leaf
parent node
children are trees
term
constant
constructor
arguments are terms
ATerms
trees - terms
Const
Mul
Const
213 7
Const
Add
Add(
Mul(
Const(3)
, Const(7)
)
, Const(21)
)
62. Syntax Definition 55
module example-suite
language Tiger
start symbol Start
test name
[[...]]
parse succeeds
test another name
[[...]]
parse fails
test suites
63. Syntax Definition 56
test cases
syntax
Language
valid program
test valid program
[[...]]
parse succeeds
64. Syntax Definition 57
test cases
syntax
Language
test invalid program
[[...]]
parse fails
invalid program
65. Syntax Definition 58
module syntax/identifiers
language Tiger start symbol Id
test single lower case [[x]] parse succeeds
test single upper case [[X]] parse succeeds
test single digit [[1]] parse fails
test single lc digit [[x1]] parse succeeds
test single digit lc [[1x]] parse fails
test single uc digit [[X1]] parse succeeds
test single digit uc [[1X]] parse fails
test double digit [[11]] parse fails
test cases
syntax
67. Syntax Definition 60
module precedence
language Tiger start symbol Exp
test parentheses
[[(42)]] parse to [[42]]
test left-associative addition
[[21 + 14 + 7]] parse to [[(21 + 14) + 7]]
test precedence multiplication
[[3 * 7 + 21]] parse to [[(3 * 7) + 21]]
test cases
ambiguities
Note : this does not actually
work in Tiger, since () is a
sequencing construct; but
works fine in Mini-Java
68. Syntax Definition 61
module precedence
language Tiger start symbol Exp
test plus/times priority [[
x + 4 * 5
]] parse to Plus(Var("x"), Times(Int("4"), Int("5")))
test plus/times sequence [[
(x + 4) * 5
]] parse to Times(
Seq([Plus(Var("x"), Int("4"))])
, Int("5")
)
test cases
ambiguities
79. Syntax Definition 72
from ASTs to text
keywords
layout: spaces, line breaks,
indentation
specification
partially defined in grammar
missing layout
language processors
pretty-printing
96. Syntax Definition 89
attribution
slide title author license
1 The Pine, Saint Tropez Paul Signac public domain
2-4, 43, 45, 46, 59, 60, 63,
64, 66, 67
PICOL icons Melih Bilgil CC BY 3.0
8 Programming language textbooks K.lee public domain
9 Latin Grammar Anthony Nelzin
14, 15, 18, 21 Tiger Bernard Landgraf CC BY-SA 3.0